<br><br><div class="gmail_quote">2009/10/14 Chen, Weian <span dir="ltr"><<a href="mailto:weian.chen@intel.com">weian.chen@intel.com</a>></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'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:"Courier New""> </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:"Courier New";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:"Courier New";color:windowtext">static
GstStaticPadTemplate src00_factory = GST_STATIC_PAD_TEMPLATE ("src_00",</span></font></p>
<p><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";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:"Courier New";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:"Courier New";color:windowtext">
GST_STATIC_CAPS ("video/mpeg;" </span></font></p>
<p><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:windowtext">
"video/x-h264")</span></font></p>
<p><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";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:"Courier New";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:"Courier New";color:windowtext">static
GstStaticPadTemplate src01_factory = GST_STATIC_PAD_TEMPLATE
("src_01",</span></font></p>
<p><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";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:"Courier New";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:"Courier New";color:windowtext">
GST_STATIC_CAPS ("video/x-raw-yuv")</span></font></p>
<p><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";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:"Courier New";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:"Courier New";color:windowtext">srcpad_00
= gst_pad_new_from_static_template (&src00_factory, "src_00");</span></font></p>
<p><font size="2" color="black" face="Courier New"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";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:"Courier New";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:"Courier New";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:"Courier New";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:"Courier New";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:"Courier New";color:windowtext">
srcpad_01 = gst_pad_new_from_static_template (&src01_factory,
"src_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:"Courier New";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:"Courier New";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:"Courier New";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:"Courier New";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:"Courier New";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:"Courier New";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:"Courier New";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:"Courier New";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:"Courier New";color:windowtext">ret = gst_pad_push (mixvideoenc->srcpad_00, out_buf_00);
</span></font><font color="red" face="Courier New"><span lang="EN-US" style="font-family:"Courier New";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:"Courier New";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:"Courier New";color:windowtext">if (srcpad_01 && 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:"Courier New";color:windowtext"> ret = gst_pad_push
(mixvideoenc->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:"Courier New";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:"Courier New";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:"Courier New";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">> </span></font></p>
<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt">> No way to give advice about that - we don'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">> element. But there's nothing intrinsically
difficult about what you've</span></font></p>
<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt">> 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">> </span></font></p>
<p><font size="2" color="blue" face="Arial"><span lang="EN-US" style="font-size:10.0pt">> 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'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't have multiple chain functions, since you don'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>