【问题标题】:Video is not rendered in accord videoSourcePlayer control视频未按照 videoSourcePlayer 控件呈现
【发布时间】:2019-08-17 02:48:15
【问题描述】:

我的表单中有一个一致的 videoSourcePlayer 控件。为什么它没有呈现我选择的视频?请参阅下面的代码:

// Open video file using DirectShow
        private void openVideoFileusingDirectShowToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (openFileDialog.ShowDialog() == DialogResult.OK)
            {
                // create video source
                FileVideoSource = new FileVideoSource(openFileDialog.FileName);

                // open it
                sourceInitialiization = true;
                OpenVideoSource(FileVideoSource);
            }
        }

// Open video source
        private void OpenVideoSource(IVideoSource source)
        {
            // set busy cursor
            this.Cursor = Cursors.WaitCursor;

            // close previous video source
            CloseVideoSource();

            // start new video source
            videoSourcePlayer.VideoSource = new AsyncVideoSource(source);
            videoSourcePlayer.Start();

            // reset statistics
            statIndex = statReady = 0;

            // start timers
            timer.Start();
            alarmTimer.Start();
            //alarmTimer1.Start();

            videoSource = source;

            this.Cursor = Cursors.Default;
        }

在我最初编写此程序的笔记本电脑上,它运行良好,但如果我将它转移到另一台机器上,比如台式机或另一台笔记本电脑,代码就不再工作了。它运行但不渲染视频,调试器中也没有检测到错误。 我尝试从accord 框架下载一个示例视频项目,但除了在我的笔记本电脑上之外,我仍然无法让它在桌面上播放视频。我错过了什么?谢谢。

【问题讨论】:

    标签: c# accord.net


    【解决方案1】:

    您是否订阅了 NewFrameReceived 事件?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-05-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-12-14
      • 2018-01-08
      • 2012-09-27
      • 1970-01-01
      相关资源
      最近更新 更多