如何让 Windows Media Center 理解新的 WMF 文件?
我正处于创建 MFT 来解码“新”容器格式视频的早期阶段。我正在使用 Media Foundation SDK 中的 MPEG1Source 示例,并且我有一个 mpeg1 示例。我将两者的扩展名都更改为“.test”并注册了 dll。
Windows Media Player 可以打开该文件(我的断点被命中并播放视频),但 Windows Media Center 无法打开该文件 - 当文件为 .mpg 时,从命令行打开可以,但不能为 .test。我的断点没有被击中;它看起来甚至没有尝试加载 dll(Visual Studio 不会报告我的 dll 正在输出窗口中加载)。
这是 64 位 Windows 7;该 dll 是本机 64 位的。
在 Media Center 理解新文件类型之前是否需要进行一些额外的注册?
I'm in the early stages of creating a MFT to decode a "new" container format video. I'm using the MPEG1Source sample from the Media Foundation SDK, and I have a mpeg1 sample. I changed the extensions in both to ".test" and registered the dll.
Windows Media Player can open the file (my breakpoints are hit and the video plays), but Windows Media Center doesn't- opening from the command line works when the file is .mpg, but not as .test. My breakpoints aren't hit; it doesn't look like it even tries to load the dll (Visual Studio doesn't report my dll being loaded in the output window).
This is 64-bit Windows 7; the dll is native 64-bit.
Is there some additional registration that needs to happen before Media Center will understand a new file type?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我尝试使用MFTrace 追踪媒体基金会的电话 -
我什么也没尝试使用事件查看器跟踪媒体基金会-什么都没有
最后,我尝试了过程监控 - 非常成功! Media Center 对
HKCU\Software\Classes\.test
、HKCR\.test
等进行注册表扫描,并查找名为“PerceivedType”的密钥 - 如果它是“视频”,然后就会播放。因此,我添加了注册表项
HKEY_CLASSES_ROOT\.test\PerceivedType = video
并且它有效!I tried using MFTrace to trace the Media Foundation calls- nothing
I tried using Event Viewer to trace Media Foundation- nothing
Finally, I tried Process Monitor- great success! Media Center does a registry scan of
HKCU\Software\Classes\.test
,HKCR\.test
, etc, and looks for a key called "PerceivedType"- if it's "video", then it will play.So I added the registry key
HKEY_CLASSES_ROOT\.test\PerceivedType = video
and it works!