private void OnLive(object sender, EventArgs e)
 {
     if (comboBoxStream.SelectedItem != null)
     {
         VideoOS.Platform.Data.DataType dataType = comboBoxStream.SelectedItem as VideoOS.Platform.Data.DataType;
         if (dataType != null)
         {
             _bitmapSource.StreamId = dataType.Id;
         }
     }
     _bitmapSource.LiveStart();
     buttonPlayback.Enabled     = true;
     buttonLive.Enabled         = false;
     buttonLine.Enabled         = true;
     buttonPreviewImage.Enabled = true;
     _playbackUserControl.SetEnabled(false);
     _inLiveMode = true;
 }
        public void Init()
        {
            ConfigurationItem privacyFolder = _configApiClient.GetItem(_item.ParentPath);
            ConfigurationItem camera        = _configApiClient.GetItem(privacyFolder.ParentPath);
            Property          cameraId      = camera.Properties.FirstOrDefault <Property>(p => p.Key == "Id");

            Item cameraItem = Configuration.Instance.GetItem(new Guid(cameraId.Value), Kind.Camera);

            _bitmapSource = new BitmapSource();
            _bitmapSource.Init();
            _bitmapSource.Item            = cameraItem;
            _bitmapSource.NewBitmapEvent += BitmapSource_NewBitmapEvent;
            _bitmapSource.LiveStart();
        }
Esempio n. 3
0
 private void OnModeChange(object sender, EventArgs e)
 {
     if (radioLive.Checked)
     {
         _playbackController.PlaybackMode = PlaybackController.PlaybackModeType.Stop;
         _bitmapSource.LiveStart();
         panelPlayback.Visible = false;
         panelLoop.Visible     = false;
     }
     else
     {
         _bitmapSource.LiveStop();
         panelPlayback.Visible = true;
         panelLoop.Visible     = true;
     }
 }