Rtsp server doesn't stop pipeline on client disconnect

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Rtsp server doesn't stop pipeline on client disconnect

pasifus
Hi,

I'm using example from
https://github.com/GStreamer/gst-rtsp-server/blob/master/examples/test-appsrc2.c
and I replaced pipeline: videotestsrc is-live=true ... to playbin and
appsink.  I interesting how to continue playing pipeline when all clients
disconnected. So new connection should continue from correct timestamp and
not from begin.

Also I'm interesting to start play from begin when playbin file go to EOS.
(loop mode)


thanks for help.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Rtsp server doesn't stop pipeline on client disconnect

Mathieu Duponchelle
Re looping with playbin, the easiest way is probably to set the same URI again
from an about-to-finish[1] handler. You should be able to find examples for that
fairly easily.

[1]: https://gstreamer.freedesktop.org/documentation/playback/playbin.html?gi-language=c#playbin::about-to-finish

On 2/25/20 10:21 PM, pasifus wrote:

> Hi,
>
> I'm using example from
> https://github.com/GStreamer/gst-rtsp-server/blob/master/examples/test-appsrc2.c
> and I replaced pipeline: videotestsrc is-live=true ... to playbin and
> appsink.  I interesting how to continue playing pipeline when all clients
> disconnected. So new connection should continue from correct timestamp and
> not from begin.
>
> Also I'm interesting to start play from begin when playbin file go to EOS.
> (loop mode)
>
>
> thanks for help.
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Rtsp server doesn't stop pipeline on client disconnect

pasifus
Tried to add on signal "about-to-finish"

g_object_set(playbin, "uri", "file:///mycli.mp4", NULL);

so gst_app_sink_pull_sample() success get the next sample after the last
sample (loop is working) but rtsp server get stuck on last sample.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Rtsp server doesn't stop pipeline on client disconnect

pasifus
After some research I fond that appsrc should get buffer pts started from 0
and monotone increment.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel