<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">No, in few words: <div>I’ve created a Voip application and I’m using SIP as signalling protocol, the scenario I need to handle is with a Re-INVITE request where the streams are negotiated again, and if I don’t sync the pipelines with my signalling protocol I could receive the new SSRC stream on the previous pipeline. In that case an exception is thrown by GStreamer because the link is already ON.<div>That’s why I need to be sure the rtp pipelines must be closed.</div><div><div>I tried sending the EOS message with this code, but the app hangs because I don’t receive any <span style="color: rgb(61, 29, 129); font-family: Menlo; font-size: 11px;">GST_MESSAGE_EOS messages</span> </div><div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(79, 129, 135);"><span style="color: rgb(187, 44, 162);">if</span><span style="color: rgb(0, 0, 0);">(</span>pPipeline<span style="color: rgb(0, 0, 0);">!=</span><span style="color: rgb(187, 44, 162);">NULL</span><span style="color: rgb(0, 0, 0);">)</span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">        {</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">            <span style="color: rgb(112, 61, 170);">GstMessage</span> *msg;</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">            <span style="color: rgb(112, 61, 170);">GstBus</span> *bus = <span style="color: rgb(61, 29, 129);">gst_element_get_bus</span> (<span style="color: rgb(79, 129, 135);">pPipeline</span>);</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;">            <br class="webkit-block-placeholder"></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(0, 132, 0);"><span style="color: rgb(0, 0, 0);">            </span>/* shut down pipeline (should send EOS message) ... */</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(61, 29, 129);"><span style="color: rgb(0, 0, 0);">            </span>gst_element_send_event<span style="color: rgb(0, 0, 0);"> (</span><span style="color: rgb(79, 129, 135);">pPipeline</span><span style="color: rgb(0, 0, 0);">, </span>gst_event_new_eos<span style="color: rgb(0, 0, 0);"> ());</span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(0, 132, 0);"><span style="color: rgb(0, 0, 0);">            </span>/* ... and wait for the EOS message from the sink */</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">            msg = <span style="color: rgb(61, 29, 129);">gst_bus_poll</span> (bus, <span style="color: rgb(61, 29, 129);">GST_MESSAGE_EOS|</span> <span style="color: rgb(61, 29, 129);">GST_MESSAGE_ERROR</span>, -<span style="color: rgb(39, 42, 216);">1</span>);</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;">          <br class="webkit-block-placeholder"></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(61, 29, 129);"><span style="color: rgb(0, 0, 0);">            </span>gst_element_set_state<span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(79, 129, 135);">pPipeline</span><span style="color: rgb(0, 0, 0);">, </span>GST_STATE_NULL<span style="color: rgb(0, 0, 0);">);</span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(61, 29, 129);"><span style="color: rgb(0, 0, 0);">            </span>gst_object_unref<span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(79, 129, 135);">pPipeline</span><span style="color: rgb(0, 0, 0);">);</span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">            <span style="color: rgb(79, 129, 135);">pPipeline</span> = <span style="color: rgb(187, 44, 162);">NULL</span>;</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">        }</div></div></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"><br></div><div><br></div><div><div><div>On 03 Jan 2014, at 18:43, Andrey Utkin <<a href="mailto:andrey.krieger.utkin@gmail.com">andrey.krieger.utkin@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">2014/1/3 Elio Francesconi <<a href="mailto:elio.francesconi@gmail.com">elio.francesconi@gmail.com</a>>:<br><blockquote type="cite">No valgrind warning,<br>I’m using GStreamer to send/recv audio video rtp streams and sometimes I<br>need to close a pipeline and create a new one.<br>Before create the new one I need to be sure the previous is closed.<br></blockquote><br>So i guess the reason why you want this is because you cannot bind to<br>port which is still in use?<br><br>-- <br>Andrey Utkin<br>_______________________________________________<br>gstreamer-devel mailing list<br><a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel<br></blockquote></div><br></div></div></body></html>