No rtsp teardown with fakesink or appsink.
Tim Müller
tim at centricular.com
Tue Sep 15 06:20:31 PDT 2015
On Tue, 2015-09-15 at 13:27 +0200, Thibault Jochem wrote:
Hi Thibault,
> I'm having an issue where I can't have gstreamer to send rtsp teardown
> when I'm using an appsink to grab pictures from the stream.
>
>
> I wrote a small test program, trying several sinks, and everythings
> seems Ok using d3dvideosink, but as soon as I plug a fakesink or an
> appsink, the rtsp socket seems to be closed before the session is
> cleanly closed. This is how I close the stream.
>
>
> gst_element_send_event(pipeline, gst_event_new_eos());
> gst_element_set_state (pipeline, GST_STATE_NULL);
> gst_object_unref (pipeline);
> gst_object_unref (bus);
>
>
> Setting the gst-debug-level to 4 seems to work around the problem so
> it make me think of a race condition.
>
>
> Is it a bug, or am I missing something to cleanly close the pipeline ?
I don't know if it helps, but sending the EOS event and then immediately
setting state to NULL may not be what you want. You'd have to wait for
the EOS event to make it through the pipeline and arrive at all the
sinks, which will happen asynchronously. So perhaps you should wait for
an EOS message on the pipeline bus before shutting down the pipeline.
(Note that there may be a bug in rtpbin or rtpjitterbuffer that it
doesn't forward the eos event properly, I'm not sure if that has been
fixed or not right now).
Cheers
-Tim
--
Tim Müller, Centricular Ltd - http://www.centricular.com
Join us at the GStreamer Conference: 8-9 October 2015 in Dublin, Ireland
More information about the gstreamer-devel
mailing list