Setting up rtsp-server for a multi-branch pipeline

nishitha nishitha.a at ignitarium.com
Wed May 13 06:22:34 UTC 2020


Hello 

I need to stream my video using rtsp-server , but without using
gst_rtsp_media_factory_set_launch api. 
I have developed a subclass of rtspmediafactory so that I can pass my
pipeline to it.

My pipeline is 
appsrc ! tee ! x264enc  ! h264parse ! video/x-h264,
stream-format=byte-stream ! rtph264pay name=pay0

In the app, I pass this pipeline as follows:

factory = GST_RTSP_MEDIA_FACTORY (gst_rtsp_pipeline_new ());
gst_rtsp_media_factory_set_shared (factory, TRUE);
g_object_set(factory, "rtspbin", GST_BIN(pipeline), NULL);

This works . But now when I take a branch out of tee, as given below, it
does not work. Please help me to know why. 


appsrc ! tee name=tee tee.src_0 ! x264enc  ! h264parse ! video/x-h264,
stream-format=byte-stream ! rtph264pay name=pay0  tee.src_1 ! fakesink

The logs from rtsp server is below: 

rtspmedia rtsp-media.c:1454:    gst_rtsp_media_collect_streams: found stream
0 with payloader 0x12a84a0
rtspmedia rtsp-media.c:1551:    gst_rtsp_media_create_stream: media
0x129e7e0: creating stream with index 0
rtspmediafactory rtsp-media-factory.c:1092:  
gst_rtsp_media_factory_construct: constructed media 0x129e7e0 for url /test
rtspmedia rtsp-media.c:2669:    gst_rtsp_media_prepare: preparing media
0x129e7e0
 rtspmedia rtsp-media.c:1821:   gst_rtsp_media_set_status: setting new
status to 2
rtspmedia rtsp-media.c:2448:    wait_preroll: wait to preroll pipeline
rtspmedia rtsp-media.c:1846:    gst_rtsp_media_get_status: waiting for
status change
 rtspmedia rtsp-media.c:2402:   start_preroll: setting pipeline to PAUSED
for media 0x129e7e0
rtspmedia rtsp-media.c:2071:    set_target_state: set target state to PAUSED
for media 0x129e7e0
rtspmedia rtsp-media.c:2058:     set_state: set state to PAUSED for media
0x129e7e0
rtspmedia rtsp-media.c:2417:    start_preroll: NO_PREROLL state change: live
media 0x129e7e0
rtspmedia rtsp-media.c:1809:      media_streams_set_blocked: media 0x129e7e0
set blocked 1
 rtspmedia rtsp-media.c:2058:  set_state: set state to PLAYING for media
0x129e7e0
rtspmedia rtsp-media.c:2106:    default_handle_message: 0x129e7e0: went from
NULL to READY (pending PAUSED)
rtspmedia rtsp-media.c:2106:    default_handle_message: 0x129e7e0: went from
READY to PAUSED (pending VOID_PENDING)
rtspmedia rtsp-media.c:2225:    default_handle_message: 0x129e7e0: got
message type 2048 (new-clock)
rtspmedia rtsp-media.c:1848:    gst_rtsp_media_get_status: timeout, assuming
error status
rtspmedia rtsp-media.c:1854:    gst_rtsp_media_get_status: got status 5
rtspmedia rtsp-media.c:2459:    wait_preroll: failed to preroll pipeline






--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list