RTSP server streaming problem

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

RTSP server streaming problem

Tran Tu
Dear all,

I am a new bee in Gstreamer and need your support for my problem recently.

Currently, I create a streaming server by using gstreamer RTSP server.
My intention is that for each pipeline constructed after calling gst_rtsp_media_factory_set_launch(), only one client can access to the stream. I use gst_rtsp_media_factory_set_shared (media, FALSE) but it is not affected.

Is there anyone know how to configure this constraint?

Thanks for your great support.

Best regards,
Tran Tu
Reply | Threaded
Open this post in threaded view
|

Re: RTSP server streaming problem

bomba
Hello Tran Tu,

My intention is that for each pipeline constructed after calling gst_rtsp_media_factory_set_launch(), only one client can access to the stream. I use gst_rtsp_media_factory_set_shared (media, FALSE) but it is not affected.
What do you mean with "it is not affected"?

https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-rtsp-server/html/GstRTSPMediaFactory.html
Configure if media created from this factory can be shared between clients.
Setting this to FALSE, will not allow a second client to play the media.
Reply | Threaded
Open this post in threaded view
|

Re: RTSP server streaming problem

Tran Tu
Hi Bomba,

When I run the "test-video" in examples of package gst-rtsp-server plugin with this setting added
gst_rtsp_media_factory_set_shared (media, FALSE)

If I access to the stream twice (one is localhost) one from another LAN pc. I can view two streams successfully, I wonder the way to configure that if there is already one connection of client, another cannot access to see the stream anymore.


Reply | Threaded
Open this post in threaded view
|

Re: RTSP server streaming problem

Michael Gruner
Hi Tran Tu

You may try limiting the number of sessions to 1. To do so, try the following:

guint num_sessions = 1;

GstRTSPSessionPool *pool = gst_rtsp_server_get_session_pool(server);
gst_rtsp_session_pool_set_max_sessions (pool, num_sessions);

g_object_unref (pool);


Regards
Michael

Michael Gruner <[hidden email]>
Embedded Linux and GStreamer solutions
RidgeRun Engineering

On May 17, 2016, at 15:44, Tran Tu <[hidden email]> wrote:

Hi Bomba,

When I run the "test-video" in examples of package gst-rtsp-server plugin
with this setting added
gst_rtsp_media_factory_set_shared (media, FALSE)

If I access to the stream twice (one is localhost) one from another LAN pc.
I can view two streams successfully, I wonder the way to configure that if
there is already one connection of client, another cannot access to see the
stream anymore.






--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/RTSP-server-streaming-problem-tp4677595p4677622.html
Sent from the GStreamer-devel mailing list archive at 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 streaming problem

Tran Tu
Dear Michael Gruner,

Thanks for your suggestion. From which now I can limit the client number to 1 only.

Best regards,
Tran Tu