精通
英语
和
开源
,
擅长
开发
与
培训
,
胸怀四海
第一信赖
I've modified in Taygeta.MainSample the following lines:在Taygeta.MainSample的如下代码行里进行修改
private void openToolStripMenuItem_Click(object sender, EventArgs e) { /* Comment loading local file OpenFileDialog ofd = new OpenFileDialog(); if (ofd.ShowDialog() == DialogResult.OK) { m_media = m_factory.CreateMedia<IMedia>(ofd.FileName); m_player.Open(m_media); }*/ m_media = m_factory.CreateMedia<IMedia>("rtsp://192.168.0.23:8554/cam1/20110808100000"); m_player.Open(m_media); } private void OnVideoFrame(PlanarFrame frame) { Parallel.ForEach(m_renders, rnd => rnd.Display(frame.Planes[0], frame.Planes[1], frame.Planes[2], true)); // Exception is thrown here /* Display play time in milliseconds */ m_renders[0].RemoveOverlay(0); m_renders[0].AddTextOverlay(0, m_player.Time.ToString(), new Rectangle(20, 20, 100, 40), 24, Color.Red, "Sans serif", 255); }
The program crashes after some time playing the media with System.OutOfMemoryException. What can be happening?在播放媒体文件一段时间后,程序崩溃,产生System.OutOfMemoryException异常。发生了什么事?
And just another question, is IVideoPlayer.Time refered to the current displayed frame or to the time at it was started and current time? I.E IVideoPlayer.Time refers to frame being displayed or not.另外一个问题是 IVideoPlayer.Time是指向当前显示桢还是开始时间,或是当前时间?