<div dir="ltr"><div>Hi,</div><div><br></div><div>i am trying to add a udp src dynamically to a running pipeline.</div><div>e.g</div><div><br></div><div> void addAudioSource(std::string const ip, int const port, int const payloadtype)<br> {<br> std::string description = "autoaudiosrc ! queue ! audioconvert ! audio/x-raw,rate=16000 ! avenc_g722 ! rtpg722pay";<br><br> audiosrc = Gst::Parse::create_bin(description, true);<br><br> pipeline->add(audiosrc);<br> {<br> auto srcpad = audiosrc->get_static_pad("src");<br> auto sinkpad = rtpbin->get_request_pad("send_rtp_sink_1");<br> srcpad->link(sinkpad);<br> }<br><br> rtpudpsinkAudio->set_property("host", ip);<br> rtpudpsinkAudio->set_property("port", port);<br> rtpudpsinkAudio->set_property("sync",true);<br> rtpudpsinkAudio->set_property("async",false);<br> pipeline->add(rtpudpsinkAudio);<br> {<br> auto srcpad = rtpbin->get_static_pad("send_rtp_src_1");<br> auto sinkpad = rtpudpsinkAudio->get_static_pad("sink");<br> srcpad->link(sinkpad);<br> }</div><div> pipeline->set_state(Gst::State::STATE_PLAYING); <br></div><div> }</div><div><br></div><div>--- and ---</div><div><br></div><div> void addAudioSink(std::string const ip, int const port, int const payloadtype)<br> {<br> char const caps[] = "application/x-rtp,media=(string)audio,clock-rate=(int)8000,payload=(int)%d";<br> char buffer[128] = {0};<br> sprintf(buffer,caps,payloadtype);<br> pipeline->add(rtpudpsrcAudio);<br> rtpudpsrcAudio->set_property("caps",<br> Gst::Caps::create_from_string(buffer));<br> {<br> auto srcpad = rtpudpsrcAudio->get_static_pad("src");<br> auto sinkpad = rtpbin->get_request_pad("recv_rtp_sink_1");<br> srcpad->link(sinkpad);<br> }<br> pipeline->set_state(Gst::State::STATE_PLAYING);<br> }</div><div><br></div><div>individually when i am not calling the other function the pipeline works fine.</div><div><br></div><div>if i try to call addAudioSink some time after addAudioSource , i always get this error when i debug through the application<br></div><div><br></div><div>0:00:18.190302584 [334m 6945 [00m 0x555556669450 [36mINFO [00m [00;01;34m GST_EVENT gstevent.c:814:gst_event_new_caps: [00m creating caps event application/x-rtp, media=(string)audio, clock-rate=(int)8000, payload=(int)9, ssrc=(uint)1388635048<br>0:00:18.190323116 [334m 6945 [00m 0x555556669450 [36mINFO [00m [00m basesrc gstbasesrc.c:2965:gst_base_src_loop:<rtpudpsrcaudio-AVP-d80367f9-8361-458d-a52d-23db4d185996> [00m pausing after gst_pad_push() = not-linked<br>0:00:18.190333169 [334m 6945 [00m 0x555556669450 [33;01mWARN [00m [00m basesrc gstbasesrc.c:3055:gst_base_src_loop:<rtpudpsrcaudio-AVP-d80367f9-8361-458d-a52d-23db4d185996> [00m error: Internal data stream error.<br>0:00:18.190337616 [334m 6945 [00m 0x555556669450 [33;01mWARN [00m [00m basesrc gstbasesrc.c:3055:gst_base_src_loop:<rtpudpsrcaudio-AVP-d80367f9-8361-458d-a52d-23db4d185996> [00m error: streaming stopped, reason not-linked (-1)<br>0:00:18.190350252 [334m 6945 [00m 0x555556669450 [36mINFO [00m [00;01;31;47m GST_ERROR_SYSTEM gstelement.c:2145:gst_element_message_full_with_details:<rtpudpsrcaudio-AVP-d80367f9-8361-458d-a52d-23db4d185996> [00m posting message: Internal data stream error.<br>0:00:18.190358717 [334m 6945 [00m 0x555556669450 [36mINFO [00m [00;01;31;47m GST_ERROR_SYSTEM gstelement.c:2172:gst_element_message_full_with_details:<rtpudpsrcaudio-AVP-d80367f9-8361-458d-a52d-23db4d185996> [00m posted error message: Internal data stream error.</div><div><br></div><div><br></div><div>the other thing is that this pipeline works most of the time.</div><div>i am only hit by this error when i debug through the application and sometimes when on release build.</div><div><br></div><div>please help<br></div><div><br>-- <br><div class="gmail_signature"><div dir="ltr">Regards<br><div><font face="arial black, sans-serif" color="#000000"><br></font></div><div><font color="#000000"><font face="'arial black', sans-serif">Ankur Deep Jaiswal</font><br></font><font color="#000000"><br></font></div></div></div>
</div></div>