[gst-devel] where is the error,please?

Volter Yen volter619 at 163.com
Wed Sep 12 10:26:46 CEST 2007


 Hi,  Thank your reply first, and I have do another try:not use the audio out bin, and it works properly:)so I can judge that the error is caused by the elment linkink between the a_dec and the audio out bin which used a ghost pad.but I have  not found the detailed reason at present, so where is it?... Volter  
在2007-09-12,"Benoit Fouet" <benoit.fouet at purplelabs.com> 写道:
Hi, (this is just my guess) Volter Yen wrote: [...] > g_signal_connect (ts_demux, "pad-added", G_CALLBACK (new_pad), NULL); > [...] > static void new_pad (GstElement *element, GstPad *pad, gpointer data) > { > GstPad *srcpad; > g_print ("Dynamic pad created, linking demuxer and a_queue\n"); > > srcpad = gst_element_get_pad (a_queue, "sink"); > gst_pad_link (pad, srcpad); > > gst_object_unref (srcpad); > } > > static void new_pad2 (GstElement *element, GstPad *pad, gpointer data) > { > GstPad *srcpad; > g_print ("Dynamic pad created, linking demuxer and v_queue\n"); > > srcpad = gst_element_get_pad (v_queue, "sink"); > gst_pad_link (pad, srcpad); > > gst_object_unref (srcpad); > } you don't know which pad the demuxer created triggered the callback. you have to check the caps of this pad to know whether it is the audio or the video one. and as a general remark, check the return values from functions that have one (such as gst_pad_link() for instance), that will help you *a lot* to spot your problems... -- Ben Purple Labs S.A. www.purplelabs.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20070912/3f70a13a/attachment.htm>


More information about the gstreamer-devel mailing list