<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 valgrind warning,<div>I’m using GStreamer to send/recv audio video rtp streams and sometimes I need to close a pipeline and create a new one.</div><div>Before create the new one I need to be sure the previous is closed.</div><div><br></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: #bb2ca2">if</span><span style="color: #000000">(</span>pPipeline<span style="color: #000000">!=</span><span style="color: #bb2ca2">NULL</span><span style="color: #000000">)</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: #703daa">GstMessage</span> *msg;</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">            <span style="color: #703daa">GstBus</span> *bus = <span style="color: #3d1d81">gst_element_get_bus</span> (<span style="color: #4f8187">pPipeline</span>);</div><p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;">            <br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(0, 132, 0);"><span style="color: #000000">            </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: #000000">            </span>gst_element_send_event<span style="color: #000000"> (</span><span style="color: #4f8187">pPipeline</span><span style="color: #000000">, </span>gst_event_new_eos<span style="color: #000000"> ());</span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(0, 132, 0);"><span style="color: #000000">            </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: #3d1d81">gst_bus_poll</span> (bus, <span style="color: #3d1d81">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><p style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;">          <br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(61, 29, 129);"><span style="color: #000000">            </span>gst_element_set_state<span style="color: #000000">(</span><span style="color: #4f8187">pPipeline</span><span style="color: #000000">, </span>GST_STATE_NULL<span style="color: #000000">);</span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(61, 29, 129);"><span style="color: #000000">            </span>gst_object_unref<span style="color: #000000">(</span><span style="color: #4f8187">pPipeline</span><span style="color: #000000">);</span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">            <span style="color: #4f8187">pPipeline</span> = <span style="color: #bb2ca2">NULL</span>;</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">        }</div></div><div><br></div><div><br><div><div>On 03 Jan 2014, at 17:51, 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">I noticed the pipeline is closed correctly but I need to wait for the<br>pipeline destruction. Which is the best way to do that?<br></blockquote><br>Why are you disturbed with it? You get valgrind warnings?<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></body></html>