Esempio n. 1
0
        private void StartDecoding()
        {
            try {
                if (shareCb.Checked)
                {
                    _frameSink = new AdsbHubClient();
                }
                else
                {
                    _frameSink = new SimpleTcpServer();
                }

                _frameSink.Start(hostnameTb.Text, (int)portNumericUpDown.Value);
            }
            catch (Exception e) {
                StopDecoding();
                MessageBox.Show("Unable to start networking\n" + e.Message);
                return;
            }

            try {
                _rtlDevice.Start(rtl_SamplesAvailable);
            }
            catch (Exception e) {
                StopDecoding();
                MessageBox.Show("Unable to start RTL device\n" + e.Message);
                return;
            }

            _isDecoding = true;
        }
Esempio n. 2
0
 private void StopDecoding()
 {
     _rtlDevice.Stop();
     _frameSink.Stop();
     _frameSink  = null;
     _isDecoding = false;
     _avgFps     = 0f;
     _frameCount = 0;
 }
Esempio n. 3
0
        public FlacWriter(Stream baseStream, bool leaveOpen)
        {
            if (baseStream == null) throw new ArgumentNullException("baseStream");

            this.baseStream = baseStream;
            if (baseStream is IPageble)
                this.pageble = (IPageble)baseStream;
            else
                this.pageble = NullForIPageble.Instance;
            this.leaveOpen = leaveOpen;
            this.sink = NullFrameSink.Instance;
        }
Esempio n. 4
0
        public FlacWriter(Stream baseStream, bool leaveOpen)
        {
            if (baseStream == null)
            {
                throw new ArgumentNullException("baseStream");
            }

            this.baseStream = baseStream;
            if (baseStream is IPageble)
            {
                this.pageble = (IPageble)baseStream;
            }
            else
            {
                this.pageble = NullForIPageble.Instance;
            }
            this.leaveOpen = leaveOpen;
            this.sink      = NullFrameSink.Instance;
        }
Esempio n. 5
0
 private void StopDecoding()
 {
     this._rtlDevice.Stop();
       this._frameSink.Stop();
       this._frameSink = (IFrameSink) null;
       this._isDecoding = false;
       this._avgFps = 0.0f;
       this._frameCount = 0;
 }
Esempio n. 6
0
 private void StartDecoding()
 {
     try
       {
     this._frameSink = !this.shareCb.Checked ? (IFrameSink) new SimpleTcpServer() : (IFrameSink) new AdsbHubClient();
     this._frameSink.Start(this.hostnameTb.Text, (int) this.portNumericUpDown.Value);
       }
       catch (Exception ex)
       {
     this.StopDecoding();
     int num = (int) MessageBox.Show("Unable to start networking\n" + ex.Message);
     return;
       }
       try
       {
     this._rtlDevice.Start(new SamplesReadyDelegate(this.rtl_SamplesAvailable));
       }
       catch (Exception ex)
       {
     this.StopDecoding();
     int num = (int) MessageBox.Show("Unable to start RTL device\n" + ex.Message);
     return;
       }
       this._isDecoding = true;
 }
Esempio n. 7
0
 private void StopDecoding()
 {
     _rtlDevice.Stop();
     _frameSink.Stop();
     _frameSink = null;
     _isDecoding = false;
     _avgFps = 0f;
     _frameCount = 0;
 }
Esempio n. 8
0
        private void StartDecoding()
        {
            try
            {
                if (shareCb.Checked)
                {
                    _frameSink = new AdsbHubClient();
                }
                else
                {
                    _frameSink = new SimpleTcpServer();
                }

                _frameSink.Start(hostnameTb.Text,(int) portNumericUpDown.Value);
            }
            catch (Exception e)
            {
                StopDecoding();
                MessageBox.Show("Unable to start networking\n" + e.Message);
                return;
            }

            try
            {
                _rtlDevice.Start(rtl_SamplesAvailable);
            }
            catch (Exception e)
            {
                StopDecoding();
                MessageBox.Show("Unable to start RTL device\n" + e.Message);
                return;
            }

            _isDecoding = true;
        }