使用Media Foundation解码MPEG1/2视频 [英] decode MPEG1/2 video with Media Foundation

查看:438
本文介绍了使用Media Foundation解码MPEG1/2视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Media Foundation播放视频.在Windows 7上,一些使用Mpeg1/Mpeg2 PS和Windows Media Player编码的视频可以播放,但是Media Foundation无法播放(我尝试注册stub MPEG1Source,但仍然无法正常工作).我注意到其中一些文件可以通过DirectShow播放,但不能以Media Foundation播放(根本无法打开).我猜媒体播放器"不只使用Media Foundation吗?

I am using Media Foundation to play videos. On windows 7 some videos encoded with Mpeg1/Mpeg2 PS and Windows Media Player can play them, but Media Foundation does not(I tried to register a stub MPEG1Source but it still does not work). I noticed some of these files could be played with directshow but not Media foundation(can not be open at all). I guess "media player" does not use Media Foundation only?

是否可以使用Media Foundation播放这些文件?如果不是,那么媒体播放器如何工作?非常感谢.

Is it possible to use Media Foundation to play these file? If it is not, how does Media player work? Thanks a lot.

P.S.我已经阅读了Windows SDK,并注册了伪" mpeg1解码,它显示了没有时间码的空白帧.如果Windows Media Player可以解码它,为什么我们需要一个伪造的mpeg1解码器?

P.S. I have read the windows SDK and I registered a "fake" mpeg1 decode and it shows a blank frame with no time code. Why we need a fake mpeg1 decoder if windows media player can decode it?

该主题是相对于 构建MPEG2传输流图的最佳方法

推荐答案

Media Foundation没有对MPEG-1或MPEG-2的收件箱支持.请参阅: http://msdn.microsoft.com/zh-cn/library/dd757927(v = VS.85).aspx

Media Foundation does not have inbox support for MPEG-1 or MPEG-2. See: http://msdn.microsoft.com/en-us/library/dd757927(v=VS.85).aspx

Windows Media Player使用各种代码路径,包括DShow,Media Foundation和Windows Media Format SDK,具体取决于源内容.

Windows Media Player uses various code paths, including DShow, Media Foundation, and Windows Media Format SDK, depending on the source content.

这篇关于使用Media Foundation解码MPEG1/2视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆