/// <summary> /// Releases the capture device /// </summary> private void Release() { log.Trace("Release all references"); // Clean up _graph = null; _sourceObject = null; _grabberObject = null; _grabber = null; _capGrabber = null; _control = null; }
/// <summary>; /// Starts grabbing images from the capture device /// </summary> public void Start() { log.Debug("start CapDevice"); // First check if we have a valid moniker string if (string.IsNullOrEmpty(_monikerString)) return; InitGrabThread(); // Create new grabber _capGrabber = new CapGrabber(); _capGrabber.NewFrameArrived += new EventHandler<TimestampArgs>(capGrabber_NewFrameArrived); // Start the thread addTask(Init); InitCapGrabber(); }