DirectShow中的源过滤器异常(0x80040241)

时间:2022-07-01 16:03:30
var m_FilterGraph = (IFilterGraph2)new FilterGraph();
int hr = m_FilterGraph.AddSourceFilter(file, "Ds.NET FileFilter", out capFilter);

When my project is x64 it will throw System.Runtime.InteropServices.COMException (0x80040241): The source filter for this file could not be loaded. With x86 everything is OK.

当我的项目是x64时,它将抛出System.Runtime.InteropServices.COMException(0x80040241):无法加载此文件的源过滤器。使用x86一切都还可以。

It's c# code but the problem is present in every x64 app i've got to build ds graphs. examples: https://code.google.com/p/graph-studio-next/ http://www.codeproject.com/Articles/21105/DSGraphEdit-A-Reasonable-Facsimile-of-Microsoft-s

它是c#代码,但问题出现在我必须构建ds图的每个x64应用程序中。示例:https://code.google.com/p/graph-studio-next/ http://www.codeproject.com/Articles/21105/DSGraphEdit-A-Reasonable-Facsimile-of-Microsoft-s

When i build graph by hand (ex. File source async. -> LavSplitter -> some decoder -> Enhanced Video Render) it's working. So it's rather system problem than code, but x64 video players that i've got are working ok o.O so i don't know... Maybe somebody has an idea what could be wrong?

当我手动构建图形时(例如文件源异步。 - > LavSplitter - >某些解码器 - >增强视频渲染)它正在工作。所以这是系统问题而不是代码,但是我得到的x64视频播放器工作正常o.O所以我不知道......也许有人知道可能出错了什么?

1 个解决方案

#1


2  

32 and 64 bit environments have their own set of filters. They start with similar stock filters and then you install additional filters for 32 bit, 64 bit or both. When you have 32 bit filter installed, and there is no corresponding 64 bit filter, then you you have situation as described in question: Win32 works fine, x64 does not work. Install missing 64-bit filters to have it resolved.

32位和64位环境都有自己的一组过滤器。它们从类似的库存过滤器开始,然后为32位,64位或两者安装其他过滤器。如果你安装了32位过滤器,并且没有相应的64位过滤器,那么你有问题所描述的情况:Win32工作正常,x64不起作用。安装缺少的64位过滤器以解决它。

#1


2  

32 and 64 bit environments have their own set of filters. They start with similar stock filters and then you install additional filters for 32 bit, 64 bit or both. When you have 32 bit filter installed, and there is no corresponding 64 bit filter, then you you have situation as described in question: Win32 works fine, x64 does not work. Install missing 64-bit filters to have it resolved.

32位和64位环境都有自己的一组过滤器。它们从类似的库存过滤器开始,然后为32位,64位或两者安装其他过滤器。如果你安装了32位过滤器,并且没有相应的64位过滤器,那么你有问题所描述的情况:Win32工作正常,x64不起作用。安装缺少的64位过滤器以解决它。