Hi,<br><br>i don't know if this is your problem, but when having multiple udpsinks or even one sink (audio/video) + a udpsink, if you don't set the async propertie of the udpsink to false the pipeline will stay blocked on prerroling.<br>
<br>hope this helps :-).<br><br>Best regards,<br>Tiago Katcipis<br><br><div class="gmail_quote">On Fri, Aug 6, 2010 at 9:55 AM, 刘兴民 <span dir="ltr"><<a href="mailto:xflxmin17@163.com">xflxmin17@163.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi,All<br>
Now, I have a problem puzzled me several days. I want to transmit the video and audio to the other computer by 'gstrtpbin'.<br>
The pipeline, I used, as the following.<br>
<br>
diagram 1:<br>
+------+ +--------------------+ +------------+ +-------------+<br>
+----> |queue |--->|ffmpegcolorspace |--->| videoscale |--->|autovideosink|<br>
/ +------+ +---------------------+ +------------+ +-------------+<br>
+----------------+ +---------+ /<br>
| |-----> | tee | |+---------------------------------------------------------------------------------------------------> will link for transmit video<br>
| | +---------+ \ | +----------------------------+<br>
| | \ +---->| |<br>
| | | |<br>
| uridecodebin | | transmit bin |<br>
| | | |<br>
| | /+----> | |<br>
| | / | +----------------------------+<br>
| | +----------+ |+------------------------------------------------------------------------------------------------------>will link for transmit audio<br>
| |----->| tee |<br>
+--------------+ +----------+<br>
\<br>
\ +------+ +-------------+ +-------------+<br>
+---->|queue |--->|audioconvert |--->|autoaudiosink|<br>
+------+ +-------------+ +-------------+<br>
<br>
diagram 2 (transmit bin):<br>
+------------------------------------------------------------------------------------------------------------------------------------------------------------+<br>
| |<br>
| +------+ +----------------+ +--------+ +----------+ +-----+ +---------+ +-------+ |<br>
| |queue |--->|ffmpegcolorspace|-->|x264enc |-->|rtph264pay|-->|queue|--+ | | -->|udpsink| rtp for video | <br>
| +------+ +----------------+ +--------+ +----------+ +-----+ \ | | +-------+ |<br>
|--+ / \ +--> |gstrtpbin| +-------+ |<br>
| | / | | --> |udpsink| rtcp for video|<br>
| |<-+ ghost pad "video_sink" +------+ | | +-------+ |<br>
| | rtcp for video |udpsrc|---------------> | | |<br>
|--+ +------+ | | |<br>
| | | |<br>
|--+ +------+ | | +-------+ |<br>
| | rtcp for audio |udpsrc|---------------> | |--->|udpsink| rtp for audio |<br>
| |<-+ ghost pad "audio_sink" +------+ | | +-------+ |<br>
| | \ +------> | | +-------+ |<br>
|--+ \ / | |--->|udpsink| rtcp for audio |<br>
| +-----+ +------------+ +----+ +--------------+ +-----+ / | | +-------+ |<br>
| |queue|-->|audioconvert|-->|faac|-->|rtpmp4apay |-->|queue|-----------+ +----------+ |<br>
| +-----+ +------------+ +----+ +---------------+ +-----+ |<br>
| |<br>
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+<br>
<br>
<br>
1)I create a pipeline to playback the media for previewing. As diagram 1. But it hasn't contain the transmit bin.<br>
2)I hang the transmit bin to the pipeline which is in the running state.<br>
<br>
In order to add the transmit bin dynamicly, I do several steps.<br>
1.add transmit bin to the running pipeline.<br>
2.block video tee element's sink pad, and request a src pad.<br>
3.block audio tee element's sink pad, and request a src pad.<br>
4.link video tee's source pad to transmit bin's "video_sink" ghost pad.<br>
5.link audio tee's source pad to transmit bin's "audio_sink" ghost pad.<br>
6.change the transmit bin's state to running.<br>
7.unblock the double tee's sink pad. <br>
<br>
In order to receive the media in the recevier end, I need the video and audio's caps.So I set up a signal handle to the 'udpsink'.<br>
I can get the video's caps correctly, but I can't get the audio's caps. Note that, the pipeline can playback the video and audio very well.<br>
<br>
I guess the probem may be in the blocking pad section. I change the blocking order, sometimes I can get the audio caps, but the video caps not .<br>
<br>
if( !gst_pad_set_blocked(tee0_pad_sink, TRUE) && !gst_pad_set_blocked(tee1_pad_sink, TRUE) )<br>
{<br>
g_printerr("pad block failed");<br>
}<br>
if( GST_PAD_LINK_FAILED( gst_pad_link(tee0_pad_src1, transmit_bin_video_sink) ) &&<br>
GST_PAD_LINK_FAILED( gst_pad_link(tee1_pad_src1, transmit_bin_audio_sink) ) )<br>
{<br>
g_printerr("tee1 pad link transmit_bin's video/audio sink failed\n"); <br>
}<br>
gst_element_set_state(transmit_bin, GST_STATE_PLAYING);<br>
<br>
if( !gst_pad_set_blocked(tee0_pad_sink, FALSE) && !gst_pad_set_blocked(tee1_pad_sink, FALSE) )<br>
{<br>
g_printerr("pad unblock failed");<br>
} <br>
<br>
<br>
Please help me. Thanks in advance.<br>
------------------------------------------------------------------------------<br>
This SF.net email is sponsored by<br>
<br>
Make an app they can't live without<br>
Enter the BlackBerry Developer Challenge<br>
<a href="http://p.sf.net/sfu/RIM-dev2dev" target="_blank">http://p.sf.net/sfu/RIM-dev2dev</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><a href="http://www.getgnulinux.org/windows">http://www.getgnulinux.org/windows</a><br>