Stopping the rtsp-server

marcin at saepia.net marcin at saepia.net
Fri Jul 8 23:24:10 UTC 2016


Try the most recent version first.

m.

2016-07-08 11:49 GMT+02:00 Vineeth <vineeth.tm at samsung.com>:

> 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.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160709/4dc97b00/attachment.html>


More information about the gstreamer-devel mailing list