Understanding Bins and Ghost_pads

Tim-Philipp Müller t.i.m at zen.co.uk
Tue Jan 1 15:56:31 PST 2013


On Tue, 2013-01-01 at 17:56 +0000, Ian Davidson wrote:

Hi,

> Question 1.
> I can see the line(s) which outputs the message, but I don't know what
> generates the message.  I tried to use gst_message_src_name - but I
> did not get the usage right.  I thought it would give me a string, but
> evidently not.  I could not get it to compile.  How can I print the
> source of the message?  What line should I write?

It's GST_MESSAGE_SRC_NAME(msg) in upper case (it's a an accessor macro,
which is by convention in upper case), see:
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstMessage.html#GST-MESSAGE-SRC-NAME:CAPS

Though it should be noted that the element posting the message (e.g. a
soruce or demuxer) is not necessarily the element where the error
occured, if it happened further downstream.

a GST_DEBUG=*:3 log might shed some light (once you find the place where
it's posted from, run with GST_DEBUG=*:6 and look at the lines before
that.

> Question 2
> I add source and demuxer into bin1.  Then, later, I link source and
> demuxer.  I am assuming that source and demuxer can only be in one
> place - and that therefore, it is the only copies that are being
> linked.

That was a question? :)

Well, you hold pointers to the elements, and there are only two, and
both are in the same bin, so it should be fine.

 
> Question 3
> I suspect that I have not linked my Ghost Pads.  How/where should I do
> that?

They should get linked via the gst_element_link (bin1, bin2); as far as
I can tell.

Cheers
 -Tim



More information about the gstreamer-devel mailing list