private async void SelectedCameraChanged(IProperty obj) { if (SelectedCamera.Value == null) { await _controller.Shutdown(); } else { var model = new VideoCameraModel(SelectedCamera.Value); await _controller.UpdateCamera(model); Media = model.Media; Resolutions.Source = _controller.GetSupportedResolutions(); } }
public async Task UpdateCamera(VideoCameraModel model) { if (_controller != null) { await _controller.Shutdown(); } if (model == null) { _controller = null; } else { _controller = new CameraController(model); await _controller.InitializeModel(); } }
public CameraController(VideoCameraModel model) { _model = model; _recording = new ManualResetEvent(false); _cameraOn = new ManualResetEvent(false); }
public AddVideoCameraCommand(User userLoggedIn, VideoCameraModel videoCameraModel) : base(userLoggedIn) { VideoCameraModel = videoCameraModel; }
public VideoCameraAddedEvent(ILogger logger, VideoCameraModel videoCameraModel) : base(logger) { VideoCameraModel = videoCameraModel; }