<div dir="ltr"><div><span style="font-size:14px">Update: previous post code was wrong.</span></div><div><span style="font-size:14px"><br></span></div><span style="font-size:14px">Hi, </span><div><span style="font-size:14px">I'm trying to monitoring the pad-added signal from demux, but the callback function was not been triggered.</span><br style="font-size:14px"><span style="font-size:14px">Here's part of my source code:</span><br style="font-size:14px"><br style="font-size:14px"><span style="font-size:14px">> _pipeline = gst_pipeline_new("receiver");</span><br style="font-size:14px"><span style="font-size:14px">> dataSource = gst_element_factory_make("</span><span style="font-size:14px">rtspsrc", "rtsp-source");</span><br style="font-size:14px"><span style="font-size:14px">> g_object_set(G_OBJECT(</span><span style="font-size:14px">dataSource), "location", "rtsp://</span><a href="http://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov" target="_blank" style="font-size:14px">184.72.239.149/vod/mp4:BigBuckBunny_115k.mov</a><span style="font-size:14px">", NULL);</span><div style="font-size:14px"><br></div><div style="font-size:14px">> demux = gst_element_factory_make("rtph264depay", "rtp-h264-depacketizer");<br>> parser = gst_element_factory_make("h264parse", "h264-parser");<br>> decoder = gst_element_factory_make("avdec_h264", "h264-decoder");<br>> videosink = gst_element_factory_make("autovideosink", "default-videosink");<br>> gst_bin_add_many(GST_BIN(_pipeline), dataSource, demux, NULL);<br>> gst_bin_add_many(GST_BIN(_pipeline), parser, NULL);<br>> g_signal_connect(dataSource, "pad-added", G_CALLBACK(cb_new_rtspsrc_pad), demux);<br>> g_signal_connect(demux, "pad-added", G_CALLBACK(cb_new_demux_pad), NULL);<br>> gst_element_link_pads (demux, "src", parser, "sink");<br>> gst_bin_add_many(GST_BIN(_pipeline), decoder, videosink, NULL);<br>> gst_element_link_many(parser, decoder, videosink, NULL);<br>> gst_element_set_state(_pipeline, GST_STATE_PLAYING);<br><div><pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"></pre></div></div><div style="font-size:14px"><br></div><span style="font-size:14px">CALLBACK:</span><br style="font-size:14px"><span style="font-size:14px">> static void cb_new_rtspsrc_pad(GstElement *element, GstPad *pad, gpointer  data) {</span><br style="font-size:14px"><span style="font-size:14px">> gchar *name;</span><br style="font-size:14px"><span style="font-size:14px">> GstCaps * p_caps;</span><br style="font-size:14px"><span style="font-size:14px">> gchar * description;</span><br style="font-size:14px"><span style="font-size:14px">> GstElement *p_rtph264depay;</span><br style="font-size:14px"><span style="font-size:14px">> </span><br style="font-size:14px"><span style="font-size:14px">> name = gst_pad_get_name(pad);</span><br style="font-size:14px"><span style="font-size:14px">> p_caps = gst_pad_get_pad_template_caps (pad);</span><br style="font-size:14px"><span style="font-size:14px">> description = gst_caps_to_string(p_caps);</span><br style="font-size:14px"><span style="font-size:14px">> g_free(description);</span><br style="font-size:14px"><span style="font-size:14px">> p_rtph264depay = GST_ELEMENT(data);</span><br style="font-size:14px"><span style="font-size:14px">> </span><br style="font-size:14px"><span style="font-size:14px">> gst_element_link_pads(</span><span style="font-size:14px">element, name, p_rtph264depay, "sink”);</span><br style="font-size:14px"><span style="font-size:14px">> g_free(name);</span><br style="font-size:14px"><span style="font-size:14px">> }</span><div style="font-size:14px"><br></div><div style="font-size:14px">I'd like to know if there is any setting should be setup for monitoring the signal through the specific element.</div><div style="font-size:14px"><br><div>Thanks for your prompt reply.</div></div></div></div>