gst_rtsp_server does not stop

aydogmusmt abdulaziz.aydogmus at mikro-tasarim.com.tr
Wed Nov 9 13:17:19 UTC 2016


I am trying to make a tiny cpp program module that makes live stream from
camera, I am using gstreamer1.0 and I have plugins 1.6 and
gst-rtsp-server-1.6.0 . I am able to start stream but when I try to stop and
start again it does not start again. my pipeline is:

std_pipeline = "videotestsrc ! video/x-raw  ! "
                     "videoconvert ! x264enc ! rtph264pay name=pay0"

and I am initializing with functions below:

gst_rtsp_server_new();
gst_rtsp_server_get_mount_points(server);
gst_rtsp_media_factory_new();
gst_rtsp_media_factory_set_launch(factory, std_pipeline);
gst_rtsp_mount_points_add_factory(mounts, "/stream", factory);
gst_rtsp_server_attach(server, NULL);

to start stream I call in another thread:

g_main_loop_run(loop);

and I am try to destroy everything with:

GstRTSPSessionPool *pool
gst_rtsp_server_get_session_pool (server);
gst_rtsp_session_pool_filter (pool,
  (GstRTSPSessionPoolFilterFunc) remove_func, server);
g_object_unref (pool);
g_source_remove(server_id);
mounts = gst_rtsp_server_get_mount_points(server);
gst_rtsp_mount_points_remove_factory(mounts, "/stream");
gst_object_unref(mounts);
g_main_loop_quit(loop);

and the stream stops but when I try to init and start stream again it does
not start.



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/gst-rtsp-server-does-not-stop-tp4680579.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list