示例#1
0
        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();
            }
        }
示例#2
0
        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();
            }
        }
示例#3
0
 public CameraController(VideoCameraModel model)
 {
     _model     = model;
     _recording = new ManualResetEvent(false);
     _cameraOn  = new ManualResetEvent(false);
 }
示例#4
0
 public AddVideoCameraCommand(User userLoggedIn, VideoCameraModel videoCameraModel)
     : base(userLoggedIn)
 {
     VideoCameraModel = videoCameraModel;
 }
示例#5
0
 public VideoCameraAddedEvent(ILogger logger, VideoCameraModel videoCameraModel)
     : base(logger)
 {
     VideoCameraModel = videoCameraModel;
 }