How can I connect "pad-added" signal to id3demux?

Tim Müller tim at centricular.com
Thu Jun 19 04:41:37 PDT 2014


On Thu, 2014-06-19 at 04:20 -0700, meeshel wrote:

Hi,

> I'm using gstreamer 1.0xx and trying to connect signal to id3demux like
> below.
> g_signal_connect (id3demux, "pad-added", G_CALLBACK (pad_added_cb),
> pipeline);
> 
> I know it's work in gstreamer 0.10xx but gstreamer 1.0xx, I can't get any
> signal from id3demux.
> 
> When I check id3demux with gst-inspect, there's no signal in id3demux.
> But, with gstreamer0.10x id3demux has "pad-added" signal.
> 
> It looks inherit from GstElement in GStreamer0.10x but it's not in
> GStreamer1.0x.

In 0.10 tagdemux/id3demux had dynamic source pads. In 1.0 the source pad
always exists. So in short, you don't need to do the whole "pad-added"
any more in 1.0. If you have a static pipeline and just use the pad
added callback to connect id3demux to the next element, you can just
link those elements right away when you build the pipeline. If you add
more elements depending on the caps, you can g_signal_connect
(id3demux_srcpad, "notify::caps", ...) or maybe just use decodebin.

Cheers
 -Tim
 
-- 
Tim Müller, Centricular Ltd - http://www.centricular.com



More information about the gstreamer-devel mailing list