精通
英语
和
开源
,
擅长
开发
与
培训
,
胸怀四海
第一信赖
Hi Roman
Thanks for all the great work on this, it's given quite a head start.伟大的作品,引导方向。
I have a couple of questions though please.有问题。
I need to decode multiple files at once (say around 10). I have created a global IMediaPlayerfactory and then each movie has it's own IVideoPlayer and IMedia object. I am coding in VB .Net under WinForms, so each movie is playing out into a picture box and I use its handle for the IVideoPlayer window handle.我需要同时解码多个文件(大概10个)。我已经创建了全局IMediaPlayerfactory,且每个电影有它自己的IVideoPlayer和IMedia对象。我用VB.NET开发窗体程序,所以每个电影播放到了图片控件上,我用图片控件的句柄当做IVideoPlayer窗体句柄。
The videos are 1280x720 H264 files, and I seem to run into decoding problems once I get over 2 files. Making the files 1024x576 means I can run around 4, and making them smaller means I can run more before the output starts dropping frames. I am on Quad core system, and nothing is maxing out, CPU all around 40 - 50%. There are multiple threads being created as the movies start. Any ideas what maybe going wrong?视频是1280x720 H264文件,一旦我处理了2个文件,就好像遇到了解码问题。让文件变为 1024x576格式,就可以处理4个,变小后在开始丢桢前会让我处理更多文件。我基于Quad内核系统,且没有混用,CPU使用率在40-50%。在视频开始处理时,有多个线程。谁有好建议?
Next question:
Once I load a file into a media object I want the first frame of the movie cued up and displayed, but not have the movie running. I have tried running the movie on loading and trapping various events to then pause the movie, but nothing works!一旦我加载文件到媒体对象时,我想让首桢提示且显示,但是没运行成功。我在加载时运行了暂停,在捕获不同事件时也进行了暂停,但不成功。
And finally:
How to you use the IMedia options flags? I am trying to get movies to loop, and doing
mvarMedia.AddOptionFlag("--loop",0) doesn't work. Can you loop movies, or do I have to trap it in the events handlers? I have tried setting the IVideoPlayer.Setposition to zero on the media has ended event, but that doesn't work either.你使用了IMedia 选项标志了吗?为了实现视频循环,用mvarMedia.AddOptionFlag("--loop",0) 不起作用。你能循环视频,或在事件处理函数里捕获了吗?我尝试对有结束事件的媒体设置IVideoPlayer.Setposition为0,但是也不起作用。
Sorry for the long post!
Thanks