<br><br><div class="gmail_quote">2009/10/14 Chen, Weian <span dir="ltr">&lt;<a href="mailto:weian.chen@intel.com">weian.chen@intel.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">












<div lang="ZH-CN" link="blue" vlink="purple">

<div style="layout-grid:15.6pt">

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt">Hi</span></font></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt"> </span></font></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt">Currently, I will create two src pads, one is ALWAYS,
and the other is SOMETIMES, but when both of the pads are created, it will hang
on _chain() when calling gst_pad_push for the first src pad, seems something
wrong with preproll. But it works well when the SOMETIMES pad is not created.</span></font></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt"> </span></font></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt">Could anybody here give me some hint?</span></font></p></div></div></blockquote><div>You&#39;re probably missing a queue after each of the src pads on your pipeline.</div>

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div lang="ZH-CN" link="blue" vlink="purple"><div style="layout-grid:15.6pt">

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt"> </span></font></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt">Thanks in advance.</span></font></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt"> </span></font></p>

<p><font size="2" color="blue" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;"> </span></font></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt">Following is some of the code:</span></font></p>

<p><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext"> </span></font></p>

<p><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext">static
GstStaticPadTemplate src00_factory = GST_STATIC_PAD_TEMPLATE (&quot;src_00&quot;,</span></font></p>

<p><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext">       
GST_PAD_SRC,</span></font></p>

<p><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext">       
GST_PAD_ALWAYS,</span></font></p>

<p><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext">       
GST_STATIC_CAPS (&quot;video/mpeg;&quot; </span></font></p>

<p><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext">       
&quot;video/x-h264&quot;)</span></font></p>

<p><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext">       
);</span></font></p>

<p><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext"> </span></font></p>

<p><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext">static
GstStaticPadTemplate src01_factory = GST_STATIC_PAD_TEMPLATE
(&quot;src_01&quot;,</span></font></p>

<p><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext">       
GST_PAD_SRC,</span></font></p>

<p><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext">       
GST_PAD_SOMETIMES,</span></font></p>

<p><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext">   
    GST_STATIC_CAPS (&quot;video/x-raw-yuv&quot;)</span></font></p>

<p><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext">       
);</span></font></p>

<p><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext">………</span></font></p>

<p><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext">srcpad_00
= gst_pad_new_from_static_template (&amp;src00_factory, &quot;src_00&quot;);</span></font></p>

<p><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext">gst_element_add_pad
(GST_ELEMENT(filter), srcpad_00);</span></font></p>

<p><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext"> </span></font></p>

<p><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext">gst_pad_set_caps
(srcpad_00, outcaps00);</span></font></p>

<p><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext"> </span></font></p>

<p><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext">if
(create_sometime) {</span></font></p>

<p><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext">   
srcpad_01 = gst_pad_new_from_static_template (&amp;src01_factory,
&quot;src_01&quot;);</span></font></p>

<p style="text-indent:18.0pt"><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext">gst_element_add_pad (GST_ELEMENT(filter), srcpad_01);</span></font></p>



<p style="text-indent:18.0pt"><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext">gst_pad_set_caps (srcpad_01, outcaps01);</span></font></p>



<p><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext">}</span></font></p>

<p><font size="2" color="black" face="Arial"><span lang="EN-US" style="font-size:10.0pt;color:windowtext">…….</span></font></p>

<p style="text-indent:18.0pt"><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext"> </span></font></p>

<p><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext">_chain()</span></font></p>

<p><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext">{</span></font></p>

<p><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext">………</span></font></p>

<p style="text-indent:18.0pt"><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext"> </span></font></p>

<p style="text-indent:20.0pt"><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext">ret = gst_pad_push (mixvideoenc-&gt;srcpad_00, out_buf_00);   
</span></font><font color="red" face="Courier New"><span lang="EN-US" style="font-family:&quot;Courier New&quot;;color:red">//if will hang here, if both of the
src pad is created.</span></font></p>

<p style="text-indent:18.0pt"><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext"> </span></font></p>

<p style="text-indent:18.0pt"><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext">if (srcpad_01 &amp;&amp; create_sometim) {</span></font></p>



<p style="text-indent:18.0pt"><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext">     ret = gst_pad_push
(mixvideoenc-&gt;srcpad_01, out_buf_01);     </span></font></p>

<p style="text-indent:18.0pt"><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext"> }</span></font></p>

<p><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext">………</span></font></p>

<p><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:windowtext">}</span></font></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt"> </span></font></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt">thanks,</span></font></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt">Weian</span></font></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt"> </span></font></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt">-----Original Message-----<br>
From: Michael Smith [mailto:<a href="mailto:msmith@xiph.org" target="_blank">msmith@xiph.org</a>] <br>
Sent: 2009</span></font><font face="宋体"><span>年</span></font><span lang="EN-US">10</span><font face="宋体"><span>月</span></font><span lang="EN-US">14</span><font face="宋体"><span>日</span></font><span lang="EN-US"> 13:42<br>


To: Discussion of the development of GStreamer<br>
Subject: Re: [gst-devel] Question on the element who will have two pad types</span></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt"> </span></font></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt">&gt; </span></font></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt">&gt; No way to give advice about that - we don&#39;t know
anything about your</span></font></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt">&gt; element. But there&#39;s nothing intrinsically
difficult about what you&#39;ve</span></font></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt">&gt; described - just push data on the pads you have!</span></font></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt">&gt; </span></font></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt">&gt; I mean do we need two _chain functions or we can
push data to the 2 pads in the same _chain function (the data push to the 2
pads is different).</span></font></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt"> </span></font></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt">No - what you&#39;ve described is just like any normal
demuxer. You</span></font></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt">wouldn&#39;t have multiple chain functions, since you don&#39;t
have multiple</span></font></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt">sinkpads.</span></font></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt"> </span></font></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt">Mike</span></font></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt"> </span></font></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt">------------------------------------------------------------------------------</span></font></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt">Come build with us! The BlackBerry(R) Developer
Conference in SF, CA</span></font></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt">is the only developer event you need to attend this
year. Jumpstart your</span></font></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt">developing skills, take BlackBerry mobile applications
to market and stay </span></font></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt">ahead of the curve. Join us from November 9 - 12,
2009. Register now!</span></font></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt"><a href="http://p.sf.net/sfu/devconference" target="_blank">http://p.sf.net/sfu/devconference</a></span></font></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt">_______________________________________________</span></font></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt">gstreamer-devel mailing list</span></font></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt"><a href="mailto:gstreamer-devel@lists.sourceforge.net" target="_blank">gstreamer-devel@lists.sourceforge.net</a></span></font></p>

<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt"><a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a></span></font></p>



</div>

</div>


<br>------------------------------------------------------------------------------<br>
Come build with us! The BlackBerry(R) Developer Conference in SF, CA<br>
is the only developer event you need to attend this year. Jumpstart your<br>
developing skills, take BlackBerry mobile applications to market and stay<br>
ahead of the curve. Join us from November 9 - 12, 2009. Register now!<br>
<a href="http://p.sf.net/sfu/devconference" target="_blank">http://p.sf.net/sfu/devconference</a><br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Thiago Sousa Santos<br>