Understanding Bins and Ghost_pads

Ian Davidson id012c3076 at blueyonder.co.uk
Wed Jan 2 01:02:35 PST 2013


Thanks, Tim,

It shows ogg-demuxer as the source of the message.  I have done a debug 
trace which I now have the joy of wading through :-).

I notice that the helloworld program links the demuxer with the convert 
when it is notified that a dynamic pad has been added.  Is there a 
possibility that my code raises such a signal from more than one place?  
The program does not check which pad has been added.

Ian

On 01/01/2013 23:56, Tim-Philipp Müller wrote:
> 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
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>

-- 
--
Ian Davidson
--
Facts used in this message may or may not reflect an underlying 
objective reality. Facts are supplied for personal use only.
Recipients quoting supplied information do so at their own risk. Facts 
supplied may vary in whole or part from widely accepted standards.
While painstakingly researched, facts may or may not be indicative of 
actually occurring events or natural phenomena.
The author accepts no responsibility for personal loss or injury 
resulting from memorisation and subsequent use.


More information about the gstreamer-devel mailing list