Re: Different media types for sample grabber

On Tue, 17 May 2005 17:38:53 +0200, Piotr Gutkowski wrote:

> Hello,
> In my application I need to grab samples from the input stream in YUY2,
> and extract certain features. This can be easily achieved using Sample
> Grabber. However, I need the output stream of a different media type
> (RGB24) that the input stream. Is it possible to create such a filter
> graph? Or is it better to connect the output pin of the Sample Grabber
> to null renderer and build another graph with a push source filter for
> which I will be able to set any media type I want? Which one is better
> in case of creating two output streams?
> regards,
> Piotr

So you want the sample grabber to connect in YUY2, then go through a
converter to output RGB. If you just connect grabber -> colour
converter->vr, they will re-negotiate a suitable type. You need to build a
pass-through filter that only accepts YUY2, and place this after the
grabber. This filter will do nothing except force the media type of the
stream at that point.