0

这是来自 DirectShowNet 库的代码片段,用于打开视频文件:

this.graphBuilder = (IGraphBuilder) new FilterGraph();
// Have the graph builder construct its the appropriate graph automatically
hr = this.graphBuilder.RenderFile(filename, null);

但 RenderFile 方法失败。同时,Windows Media Player 也能很好地打开同一个文件。可能是什么问题。

我在没有 DirectShowNet 的情况下得到了相同的行为,但是使用了本机 C++ 代码......

4

2 回答 2

0

Windows 媒体播放器使用 WMF sdk 和 MF 以及 directshow。

于 2010-05-14T11:14:12.517 回答
0

正如 Geraint Davies 在评论中指出的那样:“Graphedt 的渲染文件菜单选项调用 RenderFile。如果这些行为不同,那么您可能在不同的环境中运行(例如 x64 与 x86 或管理员与非管理员)。”......实际上问题不在于架构或权限,而是与在视频中搜索相关的代码的其他部分,这在我测试过的视频上表现不佳。

于 2010-05-21T06:08:58.613 回答