When is pad added for the demuxer in gst-rtsp-server?
Howling wong
watertreader at hotmail.com
Mon Jan 3 08:04:05 UTC 2022
Hi
I have been working with gst-rtsp-server libraries to demux an udpsrc to audio and video gchar *pipeline. Have modelled after the example in test_mp4.c
"https://github.com/GStreamer/gst-rtsp-server/blob/master/examples/test-mp4.c<https://github.com/GStreamer/gst-rtsp-server/blob/master/examples/test-mp4.c>"
Code:
g_strdup_printf ("( udpsrc port=%d name=src0 "
"! queue ! rtpmp2tdepay ! video/mpegts, systemstream=true, packetsize=188 ! aiurdemux name=dm "
" dm.video_0 ! queue ! h264parse name=video ! rtph264pay config-interval=1 name=pay0 pt=96 "
" dm.audio_0 ! queue ! aacparse name=audio ! rtpmp4gpay name=pay1 pt=97 )",
5678);
gst_rtsp_media_factory_set_launch (factory,pipeline );
// to configure pipeline
g_signal_connect (factory, "media-configure",
(GCallback) media_configure_cb, NULL);
And I have added a callback when pad is added for the demuxer at media_configure_cb function (much like in normal gstreamer),
void
l_media_configure_cb (GstRTSPMediaFactory * factory,
GstRTSPMedia * media,
NULL)
{
// other code to configure
pipeline = gst_rtsp_media_get_element (media);
GstElement* demuxer = gst_bin_get_by_name_recurse_up (GST_BIN (pipeline ), "dm");
g_signal_connect (demuxer, "pad-added", G_CALLBACK (on_rtsp_pad_added),rtsp_app.pipeline);
}
The problem I have is that the demuxer only has pad added inconsistently (ie sometimes adding them and sometimes not adding them). Just wondering the following question.
1. When is pad-added for this case? the example seem to suggest pad adding is taken care of by system
2. Should I instead watch for the signal media_prepared ( I believed it is too late?) or other signal ?
3. What should I do otherwise... checking the bus and take appropriate action
I am using Gstreamer 1.14
Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220103/5ffb1125/attachment-0001.htm>
More information about the gstreamer-devel
mailing list