[gst-devel] Filtering with catch-all mime type video/*?

cascardo at holoscopio.com cascardo at holoscopio.com
Wed Oct 4 00:26:49 CEST 2006

On Tue, Oct 03, 2006 at 09:39:33PM +0300, Ville Syrj?l? wrote:
> Hi,
> I'm trying to insert a capsfilter element to my pipeline. I'd like the 
> element to limit the caps as little as possible (eg. just width and 
> height for video). I see the plugin writers guide mentions video/* and 
> audio/* types, but if I use them the caps go empty. If I use 
> video/x-raw-yuv things work but then I've already limited the incoming 
> format unnecessarily. Are these catch-all video/* and audio/* types 
> supposed to work here or do I have to explicitly list all video formats 
> that could pass through the element?
> -- 
> Ville Syrj?l?
> syrjala at sci.fi
> http://www.sci.fi/~syrjala/

I've come to this same question this weekend while working on an
application that would search for all element factories that can source
some video and some audio (I guess you would want any video).

Unfortunately, when computing the caps subset, intersect, etc., the code
compare for equal names (where 'video/*' would be a name). So, in your
case, you'd better enumerate every video type, whereas I came to a
solution where I search for the substrings "video/" and "audio/" in the
string representation of a caps.

However, I think it would be interesting to have a "video/*" or "video"
caps match as a superset of "video/something" caps. Is there any reason
for not doing this in GStreamer? I would be willing to write a patch if
it would be accepted.

Thadeu Cascardo.

More information about the gstreamer-devel mailing list