<div dir="ltr">I have a send-only pipeline constructed as follows:<br> "webrtcbin name=sendonly bundle-policy=max-bundle autoaudiosrc ! queue ! audioconvert ! audioresample ! audiomixer name=mix ! volume name=vol ! level message=TRUE ! queue ! opusenc inband-fec=TRUE ! rtpopuspay ! queue ! application/x-rtp,media=audio,encoding-name=OPUS,payload=111,clock-rate=48000 ! sendonly.sink_0 "<br> <br> In response to UI interaction I'd like to play a short sample mixed in. The following code *partially* works: playback starts up to a couple of seconds after user interaction, but only for a long file (nothing if I try sample files of order 2s or less). Log output shows: <br> gst_base_src_start_complete:<filesrc0> pad not activated yet<br> <br>To finish this up, I'd expect to add a probe to detect EOS & then remove the bin. Is a probe and wait for something required as part of startup for the bin?<br><div><br></div><div>GstElement *mixer = gst_bin_get_by_name(GST_BIN (pipeline), "mix");<br>    if (mixer) {<br>        GstPad *mixerSink, *binSrc, *resamplerSrc;<br>        GstElement *bin, *filesrc, *parse, *dec, *convert, *resample;<br>        GstPadLinkReturn ret;<br><br>        bin = gst_bin_new(NULL);<br>        g_assert(bin);<br>        filesrc = gst_element_factory_make("filesrc", NULL);<br>        g_assert (filesrc);<br>        parse = gst_element_factory_make("mpegaudioparse", NULL);<br>        g_assert (parse);<br>        dec = gst_element_factory_make("mpg123audiodec", NULL);<br>        g_assert (dec);<br>        convert = gst_element_factory_make("audioconvert", NULL);<br>        g_assert(convert);<br>        resample = gst_element_factory_make("audioresample", NULL);<br>        g_assert(resample);<br><br>        g_object_set(filesrc, "location", name, NULL);<br>        gst_bin_add_many(GST_BIN (bin), filesrc, parse, dec, convert, resample, NULL);<br><br>        gboolean linkRet = gst_element_link_many(filesrc, parse, dec, convert, resample, NULL);<br>        g_assert (linkRet == TRUE);<br><br>        // create a ghost pad on the bin<br>        resamplerSrc = gst_element_get_static_pad(resample, "src");<br>        gst_element_add_pad(bin, gst_ghost_pad_new("src", resamplerSrc));<br>        gst_object_unref(resamplerSrc);<br><br>        // now add the new bin to the pipeline<br>        gst_bin_add(GST_BIN(pipeline), bin);<br><br>        mixerSink = gst_element_get_request_pad(mixer, "sink_%u");<br>        binSrc = gst_element_get_static_pad(bin, "src");<br>        ret = gst_pad_link(binSrc, mixerSink);<br>        g_assert (ret == GST_PAD_LINK_OK);<br><br>        // OK, start it up...<br>        gst_element_set_state(bin, GST_STATE_READY);<br>        gst_element_set_state(bin, GST_STATE_PLAYING);<br><br>        gst_object_unref(binSrc);<br>        gst_object_unref(mixerSink);<br>        gst_object_unref(mixer);<br>    }<br></div><div><br></div><div>any insight greatly appreciated!</div></div>