/// <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; }
/// <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(); }
public ImageCaptureService(IClock clock, ILocationService locationService, ICaptureSource captureSource) { _clock = clock; _locationService = locationService; _captureSource = captureSource; }