Hi there,
I am trying to use a SampleGrabber within an automatically rendered filter graph.
When I create the filter graph I add the SampleGrabber with the following media type,
mt.majortype = MEDIATYPE_Video;
mt.subtype = GUID_NULL;
mt.formattype = FORMAT_VideoInfo;
Unfortunately I have to set the subtype to GUID_NULL as it will not connect into every graph automatically othewise. I am registering the filter graph with graphedit so that I can view it to make sure that it has all connected correctly.
Unfortunately when connected like this it does not appear in the correct place, instead it ends up coming before the decoder so I end up with gibberish being put through the sample grabber.
Basically what I am trying to achieve is the *simplest* way to connect a Sample Grabber to *any* filter graph.
One method I thought of was to render the graph then add the sample grabber after by placing it before the video renderer. Which to me; makes perfect sense. Unfortunately, firstly I could not disconnect the the pin between the last 2 filters even though I was informed that the disconnection was a success. And secondly I would then need some way of converting any input YUV, YUV2 etc to RGB24 (my desired bitmap format).
If anyone has some advice on this It would be greatly appreciated!
Start Free Trial