[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gstreamer-devel
Subject:    Re: [gst-devel] where is the error,please?
From:       "Volter Yen" <volter619 () 163 ! com>
Date:       2007-09-12 8:26:46
Message-ID: 31383447.793761189585606943.JavaMail.coremail () bj163app15 ! 163 ! com
[Download RAW message or body]

[Attachment #2 (multipart/Alternative)]


 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@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


[Attachment #5 (text/html)]

<DIV>&nbsp;</DIV>
<DIV>Hi,</DIV>
<DIV>&nbsp; Thank your reply first, and I have do another try:</DIV>
<DIV>not use the audio out bin, and it works properly:)</DIV>
<DIV>so I&nbsp;can&nbsp;judge&nbsp;that the error is&nbsp;caused by the elment \
linkink between the a_dec and the audio out bin which used a ghost pad. </DIV> \
<DIV>but I have&nbsp; not&nbsp;found the detailed reason at present, so where is \
it?...</DIV> <DIV>&nbsp;</DIV>
<DIV>Volter</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV ></DIV><BR>ÔÚ2007-09-12£¬"Benoit Fouet" &lt;benoit.fouet@purplelabs.com&gt; \
дµÀ£º<BR> <BLOCKQUOTE id=isReplyContent style="PADDING-LEFT: 1ex; MARGIN: 0px 0px \
0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><PRE>Hi,

(this is just my guess)

Volter Yen wrote:

[...]

&gt; g_signal_connect (ts_demux, "pad-added", G_CALLBACK (new_pad), NULL);
&gt;

[...]

&gt; static void new_pad (GstElement *element, GstPad *pad, gpointer data)
&gt; {
&gt;     GstPad *srcpad;
&gt;     g_print ("Dynamic pad created, linking demuxer and a_queue\n");
&gt;   
&gt;     srcpad = gst_element_get_pad (a_queue, "sink");
&gt;     gst_pad_link (pad, srcpad);
&gt;  
&gt;     gst_object_unref (srcpad);
&gt;  }
&gt;  
&gt; static void new_pad2 (GstElement *element, GstPad *pad, gpointer data)
&gt; {
&gt;     GstPad *srcpad;
&gt;     g_print ("Dynamic pad created, linking demuxer and v_queue\n");
&gt;   
&gt;     srcpad = gst_element_get_pad (v_queue, "sink");
&gt;     gst_pad_link (pad, srcpad);
&gt;  
&gt;     gst_object_unref (srcpad);
&gt;  }

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
</PRE></BLOCKQUOTE><br><!-- footer --><br> 
<hr>
<font style="font-size:12px;line-height:15px;">¶ÀÓС°Õ˺ű£ÏÕ¹ñ¡±±£»¤ÃÜ ë£¬</font><a \
style="font-size:12px;line-height:15px; color:blue; text-decoration:underline;" \
href="http://adclient.163.com/event.ng/Type=click&FlightID=94603&AdID=96090&TargetID=1 \
200&Values=31,43,51,60,72,85,91,100,110,312,332,499,587,701,702,733,734&Redirect=http://www.rising.com.cn/2008/trial/index.htm">¡°ÈðÐÇ08°æ¡±¿ªÊ¼Ãâ·Ñ</a>




-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
gstreamer-devel mailing list
gstreamer-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic