<div>Hi ,</div>
<div> </div>
<div>first add all the elements in your bins or pipeline , but you need to link them according to certain situations  .</div>
<div> </div>
<div>So first you need to check in the bus call back that your file has audio data of not , that means whether your demuxer or uridecodebin has created an audio src pad or not . If audio src pad is created then only link this pad with the sink pad of tee ( or proxy pad of the respective bin ) . Else just skip it. </div>

<div> </div>
<div>By doing this you can play a container file which does not have audio elementary stream. </div>
<div> </div>
<div> </div>
<div><br> </div>
<div class="gmail_quote">On Mon, Jul 12, 2010 at 3:43 PM, Hecate_Eos <span dir="ltr">&lt;<a href="mailto:xflxmin17@163.com">xflxmin17@163.com</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote"><br>Hi All<br>I use uridecodebin to decode my file. I can play the file with both video<br>and audio, but I have the problem when the file just has video. For example,<br>
I play the webcamera.<br>                              ----------<br>---------------------------------------<br>                       /  -&gt; | tee0 |   -&gt;   |   Video Output to Screen  |<br>----------------------/        ----------<br>
---------------------------------------<br>| uridecodebin |<br>----------------------<br>                     \                ---------<br>------------------------------------------------<br>                        \ ---X---&gt; | tee1 |   -&gt;  |     Audio Output to<br>
sound device |<br>                                     ----------<br>------------------------------------------------<br>First, I have added all the elements to the pipeline.<br>I link uridecodebin with tee0 and tee1 in it&#39;s &quot;pad-added&quot; event. When I<br>
play a file with both audio &amp; video , it can work well.<br>But, I want also playback the file without audio and the webcamera using the<br>same pipeline. You know, the webcamera don&#39;t have the audio, so in the<br>
&quot;pad-added&quot; event , I don&#39;t link uridecodebin to tee1.<br>So, I want to remove tee1 &amp; audio output elements. I do the remove operation<br>in the uridecodebin&#39;s &quot;no-more-pads&quot; event.<br>I have searched on the Internet that I can&#39;t really remove elements in the<br>
&quot;no-more-pads&quot;. So, I just in it post a custom message. I in the bus message<br>process callback to remove the elements. But, I can&#39;t get it work.<br>Please, tell me how to remove the unlinked elements and make the pipeline<br>
run.<br>Or, tell me how I can dynamicly add the tee0, video output, tee1, audio<br>output to the pipeline which just has single element - uridecodebin.<br><br>Thanks in advance . Sincerely.<br><br>--<br>View this message in context: <a href="http://gstreamer-devel.966125.n4.nabble.com/Remove-unlinked-elements-from-pipeline-tp2285949p2285949.html" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/Remove-unlinked-elements-from-pipeline-tp2285949p2285949.html</a><br>
Sent from the GStreamer-devel mailing list archive at Nabble.com.<br><br>------------------------------------------------------------------------------<br>This SF.net email is sponsored by Sprint<br>What will you do first with EVO, the first 4G phone?<br>
Visit <a href="http://sprint.com/first" target="_blank">sprint.com/first</a> -- <a href="http://p.sf.net/sfu/sprint-com-first" target="_blank">http://p.sf.net/sfu/sprint-com-first</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>
</blockquote></div><br><br clear="all"><br>-- <br>Regards,<br><br>Sudarshan Bisht<br>