How to wait for the pipeline destruction
Elio Francesconi
elio.francesconi at gmail.com
Fri Jan 3 09:52:43 PST 2014
No, in few words:
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.
That’s why I need to be sure the rtp pipelines must be 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 18:43, Andrey Utkin <andrey.krieger.utkin at gmail.com> wrote:
> 2014/1/3 Elio Francesconi <elio.francesconi at gmail.com>:
>> 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.
>
> So i guess the reason why you want this is because you cannot bind to
> port which is still in use?
>
> --
> 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/d406b033/attachment-0001.html>
More information about the gstreamer-devel
mailing list