Hi, gstreamer-devel:<br><br>&nbsp;&nbsp;&nbsp; Thanks, Arnout! I got it.<br><br>Eric Zhang<br><br><div class="gmail_quote">2008/11/10 Arnout Vandecappelle <span dir="ltr">&lt;<a href="mailto:arnout@mind.be">arnout@mind.be</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">On Monday 10 November 2008 03:58:18 Eric Zhang wrote:<br>
&gt; &nbsp; &nbsp; So could you explain a little bit why we should add this extra<br>
&gt; capsfilter to make decodebin works? Thanks a lot.<br>
<br>
</div>&nbsp;If you think a bit about it, it&#39;s easy enough to understand. &nbsp;gst-launch is<br>
completely agnostic about what all the pipeline elements do, but it somehow<br>
has to choose which sink pad to connect to which source pad of the rtspsrc.<br>
Look at the gst-launch command:<br>
<div class="Ih2E3d"><br>
gst-launch rtspsrc location=&quot;rtsp://xxxxxx&quot; name=d<br>
 &nbsp;d. ! decodebin ! ffmpegcolorspace ! xvimagesink<br>
 &nbsp;d. ! decodebin ! audioconvert ! alsasink<br>
<br>
</div>When rtspsrc creates a video source pad, gst-launch has to choose which of the<br>
two decodebins to connect to it. &nbsp;Since they look identical (gst-launch can&#39;t<br>
look into the rest of the pipeline, who knows what decodebin will do<br>
anyway?), gst-launch randomly connect the video source to one of the<br>
decodebins. &nbsp;After prerolling, the decodebin creates a source pad for the<br>
video and gst-launch has to connect it to the next element. &nbsp;Now, if you&#39;re<br>
lucky, gst-launch had select the first decodebin and all goes well. &nbsp;If<br>
you&#39;re unlucky, however, it has chosen the second decodebin, and gst-launch<br>
connects the audioconvert to the decodebin&#39;s video source pad... &nbsp;That<br>
doesn&#39;t work, so the linking fails.<br>
<br>
&nbsp;That doesn&#39;t crash your application yet. &nbsp;It&#39;s only when the pipeline goes<br>
into PLAYING and the source starts pushing data in the decodebin, that it<br>
turns out that the decodebin doesn&#39;t have anywhere to send the data to.<br>
That&#39;s what triggers the &#39;Not linked&#39; error.<br>
<br>
<br>
&nbsp;When you use the depayloader and decoder explicitly instead of decodebin, the<br>
linking works correctly:<br>
<div class="Ih2E3d"><br>
gst-launch rtspsrc location=&quot;rtsp://xxxxxx&quot; name=d<br>
 &nbsp;d. ! rtph263pdepay ! ffdec_h263 ! ffmpegcolorspace ! xvimagesink<br>
 &nbsp;d. ! rtpamrdepay ! amrnbdec ! audioconvert ! alsasink<br>
<br>
</div>Now, the two branches of the pipeline are no longer identical. &nbsp;gst-launch<br>
looks at the caps of rtph263pdepay and rtpamrdepay to see which one matches<br>
the video source. &nbsp;It will therefore always select the right one. &nbsp;You get<br>
the same behaviour with a decodebin by providing caps explicitly.<br>
<br>
<br>
&nbsp;Regards,<br>
&nbsp;Arnout<br>
<font color="#888888"><br>
--<br>
Arnout Vandecappelle &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; arnout at mind be<br>
Senior Embedded Software Architect &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +32-16-286540<br>
Essensium/Mind &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.mind.be" target="_blank">http://www.mind.be</a><br>
G.Geenslaan 9, 3001 Leuven, Belgium &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;BE 872 984 063 RPR Leuven<br>
LinkedIn profile: <a href="http://www.linkedin.com/in/arnoutvandecappelle" target="_blank">http://www.linkedin.com/in/arnoutvandecappelle</a><br>
GPG fingerprint: &nbsp;D206 D44B 5155 DF98 550D &nbsp;3F2A 2213 88AA A1C7 C933<br>
</font><div><div></div><div class="Wj3C7c"><br>
-------------------------------------------------------------------------<br>
This SF.Net email is sponsored by the Moblin Your Move Developer&#39;s challenge<br>
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes<br>
Grand prize is a trip for two to an Open Source event anywhere in the world<br>
<a href="http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/" target="_blank">http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/</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>
</div></div></blockquote></div><br>