Directshow and .NET Interop issue
I am facing a strange issue. I have a directshow based player that is wrapped as a COM object.
I use this player in a C# form. Actually two instances so that two clips c开发者_如何学运维an be played side by side.
Now in the player, when I first load a file, I let the graph render, then traverse the graph, find the renderer and the filter that the renderer pin is connected to, and then insert a custom filter between the two.
It works most of the time, but on certain occasions, when I connect the output of my custom filter to the render, the call to GraphBuilder.ConnectDirect returns E_NOINTERFACE.
Has anyone seen similar behavior?
To get more information on what is going on, create a log file using IGraphBuilder::SetlogFile.
E_NOINTERFACE is not listed a standard value returned by IGraphBuilder ConnectDirect but it could be that a filter is returning E_NOINTERFACE to DirectShow due to some internal problem with that particular filter. The error code by itself is probably not enough information to diagnose the problem.
E_NOINTERFACE has a very particular meaning but that doesn't prevent component authors from returning it erroneously. See "Do not overload the E_NOINTERFACE error" on Raymond Chen's blog: http://blogs.msdn.com/b/oldnewthing/archive/2006/12/08/1239911.aspx
精彩评论