[gst-devel] Media type probing
msmith at xiph.org
Wed Dec 24 19:41:10 CET 2008
On Wed, Dec 24, 2008 at 3:49 AM, Sergey Yakimenko <starshiy at apriorit.com> wrote:
> Hello all,
> I wonder if there is a way to determine whether there are gstreamer elements
> in a certain gstreamer configuration on a certain system that support certain
> media type? In other words, if there is a mechanism, or a way to implement
> such a mechanism similar to DirectShow's IGraphBuilder::Render() or
> IFilterGraph2::RenderEx() functions? I now that there is a way of recognizing
> media type - decodebin, etc.; but I need to do the opposite operation: I have
> a media stream with fully specified mediatype, and I'd like to know whether I
> can play the stream, but to know this before I start playing, i.e. without
> playing the stream.
Yes, this is basically what decodebin does internally - it uses a
typefind element to find out what type of media it is, then iterates
over the element factories to find a compatible decoder/demuxer.
You can look at the code for that to figure out the details of how to do it.
More information about the gstreamer-devel