[gst-devel] How can I know that playbin2 has created rtspsrc element, as soon as possible?

Tim-Philipp Müller t.i.m at zen.co.uk
Wed Sep 8 12:25:42 CEST 2010


On Wed, 2010-09-08 at 02:52 -0700, wl2776 wrote:

> Till now I was experimenting with the element-added signal.
> Just for the information - how can I catch all "element-added" signals
> non-depending of their source?

What's wrong with g_signal_connect (obj, "element-added", ...) ?

Not sure if there's a good way to get element-added signals from
grand-children though (maybe deep-notify::parent works, maybe not).

> And more specific - what is the GType of the GstBin? (wonder if this my
> question is correct at all :)) )

GST_TYPE_BIN is the GType of a generic bin. You shouldn't rely on the
GType name of any element though, it sometimes changes.

In the notify::source callback it's best to check if the source element
has certain properties by name and then set them, and not check the
GType.

> I've found g_signal_add_emission_hook() function. 
> It requires signal-ID and signal-details Quark.
> I could get them from g_signal_parse_name, but its second parameter is 
> "GType itype - The interface/instance type that introduced "signal-name".
> So, how should I fill this parameter? 

Not sure what you are asking here, or what the context is.

Cheers
 -Tim







More information about the gstreamer-devel mailing list