private void OpenStream(Item _selectItem)
        {
            _jpegLiveSource = new JPEGLiveSource(_selectItem);

            int width  = 800;
            int height = 600;

            try
            {
                _jpegLiveSource.Width  = width;
                _jpegLiveSource.Height = height;
                _jpegLiveSource.SetWidthHeight();
                SetStreamType();
                _jpegLiveSource.LiveModeStart = true;
                _jpegLiveSource.Init();
                _jpegLiveSource.LiveContentEvent += JpegLiveSource1LiveNotificationEvent;
                textBoxCount.Text = "0";
                _count            = 0;
            }
            catch (Exception ex)
            {
                System.Windows.MessageBox.Show("Could not Init:" + ex.Message);
                _jpegLiveSource = null;
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Изменить размеры картинки
 /// </summary>
 public void Resize(int width, int height)
 {
     this._Width  = width;
     this._Height = height;
     if (_JpegLiveSource != null)
     {
         _JpegLiveSource.Width  = width;
         _JpegLiveSource.Height = height;
         _JpegLiveSource.SetWidthHeight();
     }
 }
Ejemplo n.º 3
0
        private void SetResolution()
        {
            int width = 0, height = 0;

            switch (comboBoxResolution.SelectedIndex)
            {
            case 0:
                width  = 160;
                height = 120;
                break;

            case 1:
                width  = 320;
                height = 240;
                break;

            case 2:
                width  = 640;
                height = 480;
                break;

            case 3:
                width  = 1024;
                height = 780;
                break;

            case 4:
                width  = 1920;
                height = 1080;
                break;
            }
            _jpegLiveSource.Width  = width;
            _jpegLiveSource.Height = height;
            _jpegLiveSource.SetWidthHeight();

            SetStreamType(width, height);
        }