DirectShow - how to debug pin connection errors

I am using IGraphBuilder to render a video capture device to the screen. The process involves adding a capture filter to the graph, then adding the VideoMixingRenderer to the graph (which uses its own distributor), and finally calling the .Render () graph to use Intelligent Connect to connect the contacts. In some cases, this works well, and my user distributor is loaded correctly (and InitializeDevice is called), but in other cases the user distributor is not used, and I get an ActiveMovie window displaying the capture device instead of my VMR, which has been added to the graph, It looks like the smart connection does not want to connect the capture device filter to the VMR and instead creates its own renderer. Are there any tools or methods for debugging this? Call graph.Render () succeeds with HR 0, so I don't get any information from DirectShow about a connection failure. Hopefully there is a diagnostic tool that can give me a better overview of what is going on in DirectShow.

+3
source share
1 answer

Intelligent connection logic will create a log file that you can use to track errors. Use IGraphBuilder :: SetLogFile (or the graphedt menu item). This records all activity during the plotting.

The most common reason for not connecting to vmr is that the upstream filter insists on using its own allocator, as well as vmr. It is possible that in some cases you get a conversion (e.g. color space conversion) between them, and this copies the buffers, and therefore will use the vmr allocator. Anyway, this is something like this.

WITH

+7

Source: https://habr.com/ru/post/1730439/


All Articles