[gst-devel] typefind and modifying a running stream (python bindings)

Tim Müller t.i.m at zen.co.uk
Tue Sep 11 10:45:15 CEST 2007


> So, as long as I modify the pipeline inside the
> callbacks, I should be okay?  Is there somewhere in the gstreamer
> manual that explains the details?

There should be a section about dynamic pads or "pad-added" signals or
decodebin's "new-decoded-pad" signal somewhere, what you need to do
follows the same pattern.  IIRC Jono Bacon also has a short python-based
tutorial about dynamic pads in his blog somewhere.


> Yes, that's it.  The problem is that if I run many MP3 files through
> typefind, I get application/x-id3, and NOT audio/mpeg... is this a bug
> or is there something I am doing wrong in the have-type callback?

It's not a bug, this is expected behaviour.  In this case we treat an
ID3 tag like a container format - you only get the container type and
not the media type of the stream(s) within the container.  In this case,
id3demux will give you the media type of the content after the tag on
its source pad (which it will add dynamically).

The decodebin2 element could make things easier for you here, since it
has an "autoplug-continue" signal which you can use to make it stop
plugging an mp3 decoder before it does so.  The drawback of this
approach is that decodebin2 will always plug a tag demuxer if there is a
tag, so if you don't abort transcoding in the case of mp3 you need to
plug an ID3 tag writer again at the end, which means your tags might get
mangled a bit (ie. some hardware players seem to have problems with
ID3v2.4 tags, and id3v2mux only writes ID3v2.4 tags currently).

Cheers
 -Tim






More information about the gstreamer-devel mailing list