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. |
Hello,
Sounds like a initialization problem. Did you recreating ALL the object your using?
And there is no need to do init every time.
Mikl From: gstreamer-devel <[hidden email]> on behalf of aydogmusmt <[hidden email]>
Sent: Wednesday, November 9, 2016 2:17:19 PM To: [hidden email] Subject: gst_rtsp_server does not stop 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. _______________________________________________ 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 |
I am using exactly same procedure to start again as 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); and all of objects are initializing here, it runs without any problem at first time but after destroy it doesn't . yes, I am using gst_init function only once. |
Free forum by Nabble | Edit this page |