[RFC] autoparse element
Olivier Crête
olivier.crete at collabora.com
Thu Dec 5 14:30:35 PST 2013
On Fri, 2013-12-06 at 00:24 +0200, Andrey Utkin wrote:
> > On Thu, 2013-12-05 at 22:23 +0100, Sebastian Dröge wrote:
> >> The idea for such an element sounds good, but the implementation should
> >> not have hardcoded formats but instead do autoplugging like decodebin.
> >> You would use the GstElementFactory API to find appropiate parsers for
> >> the caps you get.
>
> Thanks for the direction. Seems gst_element_factory_list_filter() is
> what you suggested.
> Regarding caps parameter, i guess mediatype should be copied from
> unparsed stream caps, and a property must be set, like "parsed=TRUE".
> The pain is that some parsers (aacparse, ac3parse) have caps property
> name "framed", others (h264parse, mpegvideoparse, mpeg4videoparse)
> have "parsed". Is that a special design (i see audio parsers have
> "framed", and video parsers have "parsed")? How to overcome this
> difference without hardcoding?
If the muxer requires parsed content, then its sink caps should include
the required framed/parsed/etc properties (at least mpegtsdemux doesn't,
but that's a bug that should be fixed).
When you've gotten a list of all parsers, then you can set the list of
GstElementFactories onto autoconvert. You can probably add "identity" at
the top of that list for the case where the data is already parsed (or
doesn't need parsing).
--
Olivier Crête
olivier.crete at collabora.com
More information about the gstreamer-devel
mailing list