Ejemplo n.º 1
0
 private void ConnectUSBCamera_Click(object sender, RoutedEventArgs e)
 {
     _webCamera = new WebCamera();
     _mediaConnector.Connect(_webCamera.VideoChannel, _imageProvider);
     _videoViewer.SetImageProvider(_imageProvider);
     _webCamera.Start();
     _videoViewer.Start();
 }
 private void SetVideoViewer()
 {
     _videoViewerWpf = new VideoViewerWPF
     {
         HorizontalAlignment = HorizontalAlignment.Stretch,
         VerticalAlignment   = VerticalAlignment.Stretch,
         Background          = Brushes.Black
     };
     CameraBox.Children.Add(_videoViewerWpf);
     _videoViewerWpf.SetImageProvider(_provider);
 }