Question

I have written a WPF application that can open, edit and render .GRF files. When rendering, I did not want it to open a new window (like GraphEdit does), so I found a solution that uses the Sample Grabber to render samples into a WPF brush.

Before rendering, my application replaces the Video Renderer in the .GRF file with the SampleGrabber. This worked fine, until I met the Microsoft DTV-DVD Video Decoder. For some reason, it only connects to the Video Renderer, and NOT to my Sample Grabber... so currently my application can't handle MPEG2.

Can someone explain to me: why? What restricts these filters from connecting?

And how am I supposed to grab decoded MPEG2 samples then?

Was it helpful?

Solution

Sample Grabber Filter will only connect to video media types described by VIDEOINFOHEADER structure (check MSDN link for details on that in Remarks section). You have video output with MPEG2VIDEOINFO and Sample Grabber rejects it.

Old SDKs have source code for Sample Grabber-like filter, which you can improve to add support for missing format structures. Sample Grabber filter alone is pretty simple on its own. You can also fit some additional decoder (third party, freeware, deinterlacer etc) for it to bring you VIDEOINFOHEADER media type on its output.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top