Accord.Video.DirectShow.VideoCaptureDevice.Start C# (CSharp) Метод

Start() публичный Метод

Start video source.
Starts video source and return execution to caller. Video source object creates background thread and notifies about new frames with the help of NewFrame event.
public Start ( ) : void
Результат void
        public void Start()
        {
            if (!IsRunning)
            {
                // check source
                if (string.IsNullOrEmpty(deviceMoniker))
                    throw new ArgumentException("Video source is not specified.");

                framesReceived = 0;
                bytesReceived = 0;
                isCrossbarAvailable = null;
                needToSetVideoInput = true;

                // create events
                stopEvent = new ManualResetEvent(false);

                lock (sync)
                {
                    // create and start new thread
                    thread = new Thread(new ThreadStart(WorkerThread));
                    thread.Name = deviceMoniker; // mainly for debugging
                    thread.Start();
                }
            }
        }