RTSP Unicast and Multicast on the same pipeline using different mountpoints

Mert Can Ergun mert.ergun at mikro-tasarim.com.tr
Tue Nov 1 15:51:06 UTC 2016


Is it possible to manually set up 2 GstRTSPMedia objects with the same
pipeline and have them listen different paths on the server?
I am trying to explore that possibility but the following code is not
working for me:

payloader = gst_element_factory_make("rtph264pay", "payloader");

rtsp_server = gst_rtsp_server_new();
gst_rtsp_server_set_service(rtsp_server, "8554");

if(!pipeline || !src || !converter || !encoder || !payloader)
g_print("creation failed!\n");

gst_bin_add_many(pipeline, src, converter, encoder, payloader, NULL);
rtsp_media = gst_rtsp_media_new(pipeline);
payloader_sink = gst_element_get_static_pad(payloader, "sink");
uni_stream = gst_rtsp_media_create_stream(rtsp_media, payloader,
payloader_sink);

guint n_cnt = gst_rtsp_media_n_streams(rtsp_media);

g_print("number of streams = %d\n", n_cnt);

GstRTSPMediaStatus status = gst_rtsp_media_get_status(rtsp_media);
g_print("GstRTSPMediaStatus = %d\n", status);

if(!gst_rtsp_media_prepare(rtsp_media, NULL))


I get errors at _prepare():

(mt-gst-auth-rtsp-server:7889): GStreamer-CRITICAL **: gst_element_get_bus:
assertion 'GST_IS_ELEMENT (element)' failed

(mt-gst-auth-rtsp-server:7889): GStreamer-CRITICAL **: gst_bus_create_watch:
assertion 'GST_IS_BUS (bus)' failed

(mt-gst-auth-rtsp-server:7889): GStreamer-CRITICAL **: gst_object_unref:
assertion 'object != NULL' failed

(mt-gst-auth-rtsp-server:7889): GLib-CRITICAL **: g_source_set_callback:
assertion 'source != NULL' failed.

I tried to make sure that pipeline is properly initialized on the RTSPMedia
object by getting the pipeline from it and then using gst_element_get_bus
and it doesn't return any errors.



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/RTSP-Unicast-and-Multicast-on-the-same-pipeline-using-different-mountpoints-tp4680320p4680367.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list