Stopping the rtsp-server
Vineeth
vineeth.tm at samsung.com
Fri Jul 8 09:49:54 UTC 2016
I am already doing it..
Please find the below code snippet
creating server:
gst_server = gst_rtsp_server_new ();
g_object_set (gst_server, "service", port, NULL);
mounts = gst_rtsp_server_get_mount_points (gst_server);
factory = gst_rtsp_media_factory_uri_new ();
gst_rtsp_media_factory_uri_set_uri (factory, uri);
gst_rtsp_media_factory_set_shared (factory, TRUE);
gst_rtsp_mount_points_add_factory (mounts, file_name,
GST_RTSP_MEDIA_FACTORY (factory));
g_object_unref (mounts);
if ((gst_server_id=gst_rtsp_server_attach (gst_server, NULL)) == 0)
goto failed;
while stopping server:
g_source_remove (gst_server_id);
GstRTSPMountPoints *mounts = NULL;
mounts = gst_rtsp_server_get_mount_points(gst_server);
gst_rtsp_mount_points_remove_factory (mounts, file_name);
g_object_unref (mounts);
int serv_ref_cnt = GST_OBJECT_REFCOUNT_VALUE(gst_server);
int i;
for (i = 0; i < serv_ref_cnt; i++)
g_object_unref(gst_server);
PS: i am using 1.6.1 version of gstreamer
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Stopping-the-rtsp-server-tp4659945p4678532.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list