Пример #1
0
        void StopRenders()
        {
            _videoRender = null;

            if (null != _audioRender)
            {
                _audioRender.Stop();
                _audioRender.Dispose();
                _audioRender = null;
            }

            _mainForm.Dispose();
        }
Пример #2
0
        void StarRenders()
        {
            _mainForm             = new MainForm();
            _mainForm.FormClosed += MainForm_FormClosed;
            _mainForm.Show();

            _videoRender = _mainForm.OpenGLVideoRender;

            if (_videoStreamInfo != null)
            {
                _videoRender.SetDisplayAspect(_videoStreamInfo.DisplayRatioWidth, _videoStreamInfo.DisplayRatioHeight);
                _videoRender.Start();
            }

            if (_audioStreamInfo != null)
            {
                _audioRender = new WinMMAudioRender();
                _audioRender.Start(this, _audioStreamInfo.SampleRate, _audioStreamInfo.Channels, _audioStreamInfo.BitsPerSample);
            }
        }