How to wait for the pipeline destruction

Elio Francesconi elio.francesconi at gmail.com
Fri Jan 3 09:39:57 PST 2014


No valgrind warning,
I’m using GStreamer to send/recv audio video rtp streams and sometimes I need to close a pipeline and create a new one.
Before create the new one I need to be sure the previous is closed.

I tried sending the EOS message with this code, but the app hangs because I don’t receive any GST_MESSAGE_EOS messages 
if(pPipeline!=NULL)
        {
            GstMessage *msg;
            GstBus *bus = gst_element_get_bus (pPipeline);
            
            /* shut down pipeline (should send EOS message) ... */
            gst_element_send_event (pPipeline, gst_event_new_eos ());
            /* ... and wait for the EOS message from the sink */
            msg = gst_bus_poll (bus, GST_MESSAGE_EOS| GST_MESSAGE_ERROR, -1);
          
            gst_element_set_state(pPipeline, GST_STATE_NULL);
            gst_object_unref(pPipeline);
            pPipeline = NULL;
        }


On 03 Jan 2014, at 17:51, Andrey Utkin <andrey.krieger.utkin at gmail.com> wrote:

> 2014/1/3 Elio Francesconi <elio.francesconi at gmail.com>:
>> I noticed the pipeline is closed correctly but I need to wait for the
>> pipeline destruction. Which is the best way to do that?
> 
> Why are you disturbed with it? You get valgrind warnings?
> 
> -- 
> Andrey Utkin
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140103/289f7f4b/attachment.html>


More information about the gstreamer-devel mailing list