Aw: Re: link demux
Brendan Long
self at brendanlong.com
Wed Jun 26 12:46:04 PDT 2013
On 06/26/2013 01:37 PM, "Simon Krütt" wrote:
> srcpad = gst_element_get_static_pad (demux, "video_%u");
According to gst-inspect-1.0 qtdemux:
> SRC template: 'video_%u'
> Availability: *Sometimes*
> Capabilities:
> ANY
You can't use gst_element_get_static_pad on a dynamic pad.
You should probably read this
<http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-pads.html>:
> Some elements might not have all of their pads when the element is
> created. This can happen, for example, with an Ogg demuxer element.
> The element will read the Ogg stream and create dynamic pads for each
> contained elementary stream (vorbis, theora) when it detects such a
> stream in the Ogg stream. Likewise, it will delete the pad when the
> stream ends. This principle is very useful for demuxer elements, for
> example.
I assume qtdemux works similarly to oggdemux.
You should be able to use g_signal_connect
<https://developer.gnome.org/gobject/stable/gobject-Signals.html#g-signal-connect>
to wait for the "pad-added" signal (its callback will give you the new
pad, just make sure it's a video pad before connecting it).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130626/23314c0f/attachment.html>
More information about the gstreamer-devel
mailing list