<div dir="ltr">Hi, zhangal:<br><br> Maybe the element `selector' can do some help for you.<br><br>Eric Zhang<br><br><div class="gmail_quote">2008/9/5 zhangal <span dir="ltr"><<a href="mailto:alzhang03@hotmail.com">alzhang03@hotmail.com</a>></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>Hi, <br> <br> I met some movies(like *.mkv and *.avi files) which include multi audio tracks and then my application can not switch audio when playback. <br> <br> I tried to just unlink the demuxer and the audio decoder and then called gst-element-get-pad() to get another audio pad which will be linked to the audio decoder that is able to decode the audio. But I can not hear anything. The code looks like following <br>
<br>GstPad *src_pad, *sink_pad, *demux_src; <br> <br>FAIL_CHECK (NULL == (demux_src = gst_element_get_pad(demuxer,"audio_01")));//Get anotherdemuxer source pad<br>FAIL_CHECK (NULL == (sink_pad = gst_element_get_pad(a_decoder, "sink")));// Get audio decoder sink pad<br>
<br>src_pad = gst_pad_get_peer(sink_pad);//get the audio pad connected to decoder sink pad<br>gst_element_set_state(player_status->bin, GST_STATE_PAUSED); <br><br>gst_pad_unli
nk (src_pad, sink_pad);<br><br>gst_pad_link(demux_src, sink_pad);<br><br>gst_object_unref(src_pad); <br>gst_object_unref(sink_pad); <br>gst_object_unref(demux_src);<br><br>gst_element_set_state(player_status->bin, GST_STATE_PLAYING);<br>
<br>//End<br>
<br>
It seems that does not work well. Does anyone have the idea about this?<br>
<br>
Thanks a lot<br>
<br>
<br><br><hr>MSN上小游戏,工作休闲两不误! <a href="http://im.live.cn/minigame" target="_blank">马上就开始玩!</a></div>
<br>-------------------------------------------------------------------------<br>
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge<br>
Build the coolest Linux based applications with Moblin SDK & 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&url=/" target="_blank">http://moblin-contest.org/redirect.php?banner_id=100&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>
<br></blockquote></div><br></div>