[RFC] autoparse element

Sebastian Dröge sebastian at centricular.com
Thu Dec 5 13:39:14 PST 2013


On Do, 2013-12-05 at 16:32 -0500, Olivier Crête wrote:
> On Thu, 2013-12-05 at 22:23 +0100, Sebastian Dröge wrote:
> > On Do, 2013-12-05 at 23:14 +0200, Andrey Utkin wrote:
> > > I think i need such element, which allows to pass streams uniformly
> > > (codec-independently) from demuxer to muxer, to provide easy remuxing.
> > > For example:
> > > 
> > > udpsrc ! tsdemux name=demux
> > > mpegtsmux name=mux ! udpsink
> > > demux.video_0100 ! autoparse ! .mux
> > > demux.audio_0101 ! autoparse ! .mux
> > > demux.audio_0102 ! autoparse ! .mux
> > > 
> > > I think it should be GstBin subclass, and contain one of existing
> > > parsers, chosen by incoming buf (or pad?) format. The choise probably
> > > will be a large if-elseif-elseif... block.
> > > 
> > > Is the proposed plan valid? Any comments?
> > > Thanks in advance.
> > 
> > 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.
> 
> Or you can just set the template caps from the muxer and set these as
> the "caps" property on decodebin. then you can do
> udpsrc ! video/mpeg-ts ! decodebin caps="the template caps from mpegtsmux" ! mpegtsmux ! udpsink

True, but for such an autoparse element you probably also want to
consider parsers that have a rank<MARGINAL (e.g. vorbisparse).

-- 
Sebastian Dröge <sebastian at centricular.com>
Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 966 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20131205/e4a7e951/attachment.pgp>


More information about the gstreamer-devel mailing list