<div style="font-family: arial; font-size: 14px;"><div style="font-family: arial; font-size: 14px;">Hello,<br></div><div style="font-family: arial; font-size: 14px;"><br></div><div style="font-family: arial; font-size: 14px;">I am writing an app which needs to mix several live HTTP audio streams and then output them to several sinks. I am trying to use the audiomixer element for such purpose.<br></div><div style="font-family: arial; font-size: 14px;"><br></div><div style="font-family: arial; font-size: 14px;">Initially I spawn a simple pipeline with  audiotestsrc  -> audiomixer -> tee -> autoaudiosink plus some queues and caps filters and it works fine. I hear a beep in the speakers.<br></div><div style="font-family: arial; font-size: 14px;"><br></div><div style="font-family: arial; font-size: 14px;">Then I try to dynamically add branches with HTTP sources. Each branch is a bin with souphttpsrc -> decodebin -> audioresample -> audioconvert -> capsfilter plus some queues to keep it on a separate thread. <br></div><div style="font-family: arial; font-size: 14px;"><br></div><div style="font-family: arial; font-size: 14px;">As soon as the branch is added the whole data flow stops and queue placed before autoaudiosink reports underruns. The pipeline after it happens looks like on attached graph. In the logs (log level *:4) there's no "task stopped", no EOS - nothing that could indicate a problem.<br></div><div style="font-family: arial; font-size: 14px;"><br></div><div style="font-family: arial; font-size: 14px;">I tried multiple methods of adding HTTP sources:<br></div><div style="font-family: arial; font-size: 14px;"><br></div><div style="font-family: arial; font-size: 14px;">- adding downloadbuffer right after source and blocking output using pad probe until buffering is done, before linking to the mixer,<br></div><div style="font-family: arial; font-size: 14px;">- adding branch and setting state to PAUSED and then linking upon buffering is done,<br></div><div style="font-family: arial; font-size: 14px;">- adding branch, calling sync_state_with_parent, then linking,<br></div><div style="font-family: arial; font-size: 14px;"><br></div><div style="font-family: arial; font-size: 14px;">...and nothing works as expected. I noticed that if I add a source which is immediately available, e.g. use filesrc instead of souphttpsrc it works flawlessly.<br></div><div style="font-family: arial; font-size: 14px;"><br></div><div style="font-family: arial; font-size: 14px;">Can anyone give me a hint what is the right procedure to add dynamically a branch to the audiomixer or share a working code snippet?<br></div><div style="font-family: arial; font-size: 14px;"><br></div><div style="font-family: arial; font-size: 14px;">Thanks,</div><div style="font-family: arial; font-size: 14px;"><br></div><div style="font-family: arial; font-size: 14px;">PS. I am using GStreamer 1.18.5 on Mac OS X but similar behaviour is observed on 1.14 on ubuntu focal.</div><div style="font-family: arial; font-size: 14px;" class="protonmail_signature_block protonmail_signature_block-empty"><div class="protonmail_signature_block-user protonmail_signature_block-empty"><div><br></div></div></div><div style="font-family: arial; font-size: 14px;">Marcin</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><div style="font-family: arial; font-size: 14px;"><br></div>