Exemplo n.º 1
0
        /// <summary>
        /// Drop the association of this screen with the camera.
        /// </summary>
        private void UnloadCamera()
        {
            if (!cameraLoaded)
            {
                return;
            }

            if (cameraConnected)
            {
                Disconnect();
            }

            cameraGrabber = null;

            delayer.Free();
            delayCompositer.Free();
            UpdateDelayMaxAge();

            UpdateTitle();
            cameraLoaded = false;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Associate this screen with a camera.
        /// </summary>
        /// <param name="_cameraSummary"></param>
        public void LoadCamera(CameraSummary _cameraSummary)
        {
            if (cameraLoaded)
            {
                UnloadCamera();
            }

            cameraSummary = _cameraSummary;
            cameraManager = cameraSummary.Manager;
            cameraGrabber = cameraManager.CreateCaptureSource(cameraSummary);

            if (cameraGrabber == null)
            {
                return;
            }

            UpdateTitle();
            cameraLoaded = true;

            OnActivated(EventArgs.Empty);

            // Automatically connect to the camera upon association.
            Connect();
        }
Exemplo n.º 3
0
 public ImageCaptureService(IClock clock, ILocationService locationService, ICaptureSource captureSource)
 {
     _clock           = clock;
     _locationService = locationService;
     _captureSource   = captureSource;
 }