Hi,<br><br>i don&#39;t know if this is your problem, but when having multiple udpsinks or even one sink (audio/video) + a udpsink, if you don&#39;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">&lt;<a href="mailto:xflxmin17@163.com">xflxmin17@163.com</a>&gt;</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 &#39;gstrtpbin&#39;.<br>
The pipeline, I used, as the following.<br>
<br>
diagram 1:<br>
                                                   +------+      +--------------------+      +------------+       +-------------+<br>
                                           +----&gt; |queue |---&gt;|ffmpegcolorspace |---&gt;| videoscale |---&gt;|autovideosink|<br>
                                          /        +------+      +---------------------+     +------------+      +-------------+<br>
+----------------+       +---------+ /<br>
|                  |-----&gt; | tee     |       |+---------------------------------------------------------------------------------------------------&gt; will link for transmit video<br>
|                  |       +---------+ \    |      +----------------------------+<br>
|                  |                       \ +----&gt;|                             |<br>
|                  |                                 |                             |<br>
| uridecodebin |                                 |      transmit bin       |<br>
|                 |                                  |                             |<br>
|                 |                        /+----&gt; |                             |<br>
|                 |                      /   |       +----------------------------+<br>
|                 |       +----------+      |+------------------------------------------------------------------------------------------------------&gt;will link for transmit audio<br>
|                 |-----&gt;|  tee     |<br>
+--------------+       +----------+<br>
                                     \<br>
                                       \         +------+    +-------------+       +-------------+<br>
                                         +----&gt;|queue |---&gt;|audioconvert |---&gt;|autoaudiosink|<br>
                                                 +------+    +-------------+        +-------------+<br>
<br>
diagram 2 (transmit bin):<br>
+------------------------------------------------------------------------------------------------------------------------------------------------------------+<br>
|                                                                                                                                                             |<br>
|        +------+     +----------------+         +--------+     +----------+       +-----+               +---------+    +-------+                   |<br>
|        |queue |---&gt;|ffmpegcolorspace|--&gt;|x264enc |--&gt;|rtph264pay|--&gt;|queue|--+           |          | --&gt;|udpsink| rtp for video  | <br>
|        +------+     +----------------+         +--------+     +----------+      +-----+     \          |          |    +-------+                    |<br>
|--+    /                                                                                             \ +--&gt; |gstrtpbin|    +-------+                    |<br>
|  |   /                                                                                                        |           | --&gt; |udpsink| rtcp for video|<br>
|  |&lt;-+ ghost pad &quot;video_sink&quot;                                             +------+                   |          |      +-------+                   |<br>
|  |                                                              rtcp for video |udpsrc|---------------&gt;  |          |                                    |<br>
|--+                                                                               +------+                   |          |                                    |<br>
|                                                                                                               |          |                                    |<br>
|--+                                                                                +------+                  |          |     +-------+                    |<br>
|  |                                                               rtcp for audio |udpsrc|---------------&gt; |          |---&gt;|udpsink| rtp for audio  |<br>
|  |&lt;-+ ghost pad &quot;audio_sink&quot;                                             +------+                   |          |    +-------+                    |<br>
|  |   \                                                                                             +------&gt;  |          |    +-------+                    |<br>
|--+    \                                                                                        /             |          |---&gt;|udpsink| rtcp for audio |<br>
|        +-----+   +------------+       +----+   +--------------+    +-----+            /                |          |    +-------+                     |<br>
|        |queue|--&gt;|audioconvert|--&gt;|faac|--&gt;|rtpmp4apay |--&gt;|queue|-----------+               +----------+                                   |<br>
|        +-----+   +------------+       +----+   +---------------+   +-----+                                                                             |<br>
|                                                                                                                                                               |<br>
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+<br>
<br>
<br>
1)I create a pipeline to playback the media for previewing. As diagram 1. But it hasn&#39;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&#39;s sink pad, and request a src pad.<br>
3.block audio tee element&#39;s sink pad, and request a src pad.<br>
4.link video tee&#39;s source pad to transmit bin&#39;s &quot;video_sink&quot; ghost pad.<br>
5.link audio tee&#39;s source pad to transmit bin&#39;s &quot;audio_sink&quot; ghost pad.<br>
6.change the transmit bin&#39;s state to running.<br>
7.unblock the double tee&#39;s sink pad.  <br>
<br>
In order to receive the media in the recevier end, I need the video and audio&#39;s caps.So I set up a signal handle to the &#39;udpsink&#39;.<br>
I can get the video&#39;s caps correctly, but I can&#39;t get the audio&#39;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) &amp;&amp; !gst_pad_set_blocked(tee1_pad_sink, TRUE) )<br>
        {<br>
            g_printerr(&quot;pad block failed&quot;);<br>
        }<br>
        if( GST_PAD_LINK_FAILED( gst_pad_link(tee0_pad_src1, transmit_bin_video_sink) ) &amp;&amp;<br>
            GST_PAD_LINK_FAILED( gst_pad_link(tee1_pad_src1, transmit_bin_audio_sink) ) )<br>
        {<br>
            g_printerr(&quot;tee1 pad link transmit_bin&#39;s video/audio sink failed\n&quot;); <br>
        }<br>
        gst_element_set_state(transmit_bin, GST_STATE_PLAYING);<br>
<br>
        if( !gst_pad_set_blocked(tee0_pad_sink, FALSE) &amp;&amp; !gst_pad_set_blocked(tee1_pad_sink, FALSE) )<br>
        {<br>
            g_printerr(&quot;pad unblock failed&quot;);<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&#39;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>