Example #1
0
        private void CompleteStopMrvcCapture()
        {
            if (this.captureEngine == null)
            {
                return;
            }

            // unsubscribe to events
            this.captureEngine.CaptureStateChanged -= this.OnCaptureStateChanged;

            DestroyImmediate(this.captureEngine, true);

            this.captureEngine = null;

            this.ComponentState = ComponentState.CaptureStopped;
        }
Example #2
0
        private void StartMrvcCapture(Connection connection)
        {
            if (connection == null)
            {
                return;
            }

            this.ComponentState = ComponentState.CaptureStarting;

            if (this.captureEngine == null)
            {
                this.captureEngine = this.gameObject.AddComponent <MrvcCapture>();
                if (this.captureEngine != null)
                {
                    this.captureEngine.CaptureStateChanged += this.OnCaptureStateChanged;
                    this.captureEngine.EnableMRC            = this.EnableMRC;
                    this.captureEngine.StopOnPaused         = this.StopOnPaused;
                    this.captureEngine.Initialize(connection);
                }
            }
        }