开发者

Directshow and .NET Interop issue

开发者 https://www.devze.com 2023-02-16 10:26 出处:网络
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

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

0

精彩评论

暂无评论...
验证码 换一张
取 消