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();
 }
Ejemplo n.º 2
0
        private void ConnectUSBCamera_Click(object sender, RoutedEventArgs e)
        {
            _webCamera = WebCamera.GetDefaultDevice();
            if (_webCamera == null)
            {
                return;
            }
            _connector.Connect(_webCamera, _provider);
            _videoSender = _webCamera;

            _webCamera.Start();
            _videoViewerWpf.Start();

            OnConnectEnabled();
        }
        private void ConnectIPCamera_Click(object sender, RoutedEventArgs e)
        {
            var host = HostTextBox.Text;
            var user = UserTextBox.Text;
            var pass = Password.Password;

            _ipCamera = IPCameraFactory.GetCamera(host, user, pass);
            if (_ipCamera == null)
            {
                return;
            }
            _connector.Connect(_ipCamera.VideoChannel, _provider);
            _videoSender = _ipCamera.VideoChannel;
            _ipCamera.Start();
            _videoViewerWpf.Start();
        }