<div dir="ltr">The only issue that i have been able to find out is.<div>sometimes it says 

rtpssrcdemux0:src_2345243 not linked, and then udpsrc audio fails with 

<span style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span> </span>gst_pad_push() = not-linked.</span></div><div>there is this issue that i dont understand, that the pipeline works most of the time, it fails for 25 % of time.</div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 2, 2018 at 10:14 PM, Ankur Deep Jaiswal <span dir="ltr"><<a href="mailto:ankur@techgentsia.com" target="_blank">ankur@techgentsia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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(<wbr>description, true);<br><br>        pipeline->add(audiosrc);<br>        {<br>          auto srcpad = audiosrc->get_static_pad("src"<wbr>);<br>          auto sinkpad = rtpbin->get_request_pad("send_<wbr>rtp_sink_1");<br>          srcpad->link(sinkpad);<br>        }<br><br>        rtpudpsinkAudio->set_property(<wbr>"host", ip);<br>        rtpudpsinkAudio->set_property(<wbr>"port", port);<br>        rtpudpsinkAudio->set_property(<wbr>"sync",true);<br>        rtpudpsinkAudio->set_property(<wbr>"async",false);<br>        pipeline->add(rtpudpsinkAudio)<wbr>;<br>        {<br>          auto srcpad = rtpbin->get_static_pad("send_<wbr>rtp_src_1");<br>          auto sinkpad = rtpudpsinkAudio->get_static_<wbr>pad("sink");<br>          srcpad->link(sinkpad);<br>        }</div><div>        pipeline->set_state(Gst::<wbr>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=(<wbr>string)audio,clock-rate=(int)<wbr>8000,payload=(int)%d";<br>        char buffer[128] = {0};<br>        sprintf(buffer,caps,<wbr>payloadtype);<br>        pipeline->add(rtpudpsrcAudio);<br>        rtpudpsrcAudio->set_property("<wbr>caps",<br>            Gst::Caps::create_from_string(<wbr>buffer));<br>        {<br>          auto srcpad = rtpudpsrcAudio->get_static_<wbr>pad("src");<br>          auto sinkpad = rtpbin->get_request_pad("recv_<wbr>rtp_sink_1");<br>          srcpad->link(sinkpad);<br>        }<br>        pipeline->set_state(Gst::<wbr>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_<wbr>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_<wbr>src_loop:<rtpudpsrcaudio-AVP-<wbr>d80367f9-8361-458d-a52d-<wbr>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_<wbr>src_loop:<rtpudpsrcaudio-AVP-<wbr>d80367f9-8361-458d-a52d-<wbr>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_<wbr>src_loop:<rtpudpsrcaudio-AVP-<wbr>d80367f9-8361-458d-a52d-<wbr>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_<wbr>message_full_with_details:<<wbr>rtpudpsrcaudio-AVP-d80367f9-<wbr>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_<wbr>message_full_with_details:<<wbr>rtpudpsrcaudio-AVP-d80367f9-<wbr>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<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><div><br>-- <br><div class="m_3735580985039498859gmail_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></font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="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></font><font color="#000000"><br></font></div></div></div>
</div></div></div>