<div dir="ltr"><div>Hi Tomasz,</div><div><br></div><div>Thank you for your message, but nope, even with those properties the pipeline still hangs.</div><div>I uploaded a debug log with the warning: <a href="https://pastebin.com/XdRWrGDk">https://pastebin.com/XdRWrGDk</a></div><div><br></div><div>Forgot to mention, but I set the following properties on the appSrc:</div><div>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(192,192,192)">        </span><span style="color:rgb(0,128,0)">/*</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">set</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">up</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">appsrc</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">*/</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(192,192,192)">        </span>g_object_set(<span style="color:rgb(0,0,128)">G_OBJECT</span>(m_appSrc.get()),</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(192,192,192)">            </span><span style="color:rgb(0,128,0)">"stream-type"</span>,<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">0</span>,</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(192,192,192)">            </span><span style="color:rgb(0,128,0)">"format"</span>,<span style="color:rgb(192,192,192)"> </span>GST_FORMAT_TIME,</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(192,192,192)">            </span><span style="color:rgb(0,128,0)">"is-live"</span>,<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">true</span>,</pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(192,192,192)">            </span><span style="color:rgb(128,128,0)">nullptr</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(192,192,192)">        </span>);<br></pre><pre style="margin:0px;text-indent:0px"><font face="arial,sans-serif"><br>Thanks,<br></font></pre><pre style="margin:0px;text-indent:0px"><font face="arial,sans-serif">Adam<br></font></pre><pre style="margin:0px;text-indent:0px"><br></pre></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Tomasz Mikolajczyk <<a href="mailto:tmmikolajczyk@gmail.com">tmmikolajczyk@gmail.com</a>> ezt írta (időpont: 2022. júl. 21., Cs, 9:10):<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Adam,<div><br>I would also try to set appsrc's "is-live" property to true and also autoaudiosink's "sync" property to false.<br><br>Regards,</div><div>Tomasz</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 20, 2022 at 2:50 PM Ádám Balázs via gstreamer-devel <<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div><div>I have the following pipelines:</div><div><span style="font-family:monospace">gst_parse_launch(R"(udpsrc port=4000 ! application/x-rtp,payload=96,encoding-name=OPUS ! queue ! rtpopusdepay ! appsink name=appsink)", nullptr)}</span></div><div>and <br></div><div><span style="font-family:monospace">gst_parse_launch(R"(appsrc name=appsrc caps="audio/x-opus" ! queue ! opusdec ! autoaudiosink)", nullptr)}</span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace"><font face="arial,sans-serif">For the appsink in the first pipeline I set </font>"emit-signals", true <span style="font-family:arial,sans-serif">and connect <span style="font-family:monospace">"new-sample"</span> to a callback that pushes the buffer into a queue.</span></span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif">For the appsrc in the second pipeline I connect callbacks to its <span style="font-family:monospace">"need-data"</span> and <span style="font-family:monospace">"enough-data" </span>signals. Those callbacks set or reset the <span style="font-family:monospace">g_main_loop</span>'s idle function to a function that reads a buffer from the queue (filled by the appsink of the first pipeline) and pushes it to appsrc with<span style="font-family:monospace"> "push-buffer"</span>.</span></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif"><br></span></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif">Unfortunately the second pipeline fails as soon as the first buffer is pushed to it with the following log:</span></span></div><div><span style="font-family:monospace">0:00:00.045154855 57060 0x55a09f976700 INFO               GST_EVENT gstevent.c:900:gst_event_new_segment: creating segment event bytes segment start=0, offset=0, stop=-1, rate=1.000000, applied_rate=1.000000, flags=0x00, time=0, base=0, position 0, duration -1<br>0:00:00.045165391 57060 0x55a09f976700 INFO                 basesrc gstbasesrc.c:2962:gst_base_src_loop:<appsrc> marking pending DISCONT<br>0:00:00.045180104 57060 0x55a09f976700 WARN                 basesrc gstbasesrc.c:3072:gst_base_src_loop:<appsrc> error: Internal data stream error.<br>0:00:00.045183271 57060 0x55a09f976700 WARN                 basesrc gstbasesrc.c:3072:gst_base_src_loop:<appsrc> error: streaming stopped, reason not-negotiated (-4)<br>0:00:00.045196292 57060 0x55a09f976700 INFO        GST_ERROR_SYSTEM gstelement.c:2140:gst_element_message_full_with_details:<appsrc> posting message: Internal data stream error.<br>0:00:00.045212868 57060 0x55a09f976700 INFO        GST_ERROR_SYSTEM gstelement.c:2167:gst_element_message_full_with_details:<appsrc> posted error message: Internal data stream error.<br>0:00:00.045225606 57060 0x55a09f976700 INFO                    task gsttask.c:312:gst_task_func:<appsrc:src> Task going to paused</span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace"><font face="arial,sans-serif">Without the appsink -> appsrc detour (if I chain the elements into one pipeline) everything works. If I remove the opusdec and autoaudiosink from the end of the second pipeline and I replace it with another appsink it sees the data and the pipeline works well.</font></span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace"><font face="arial,sans-serif">Is there any trick I should do to be able to feed </font><span style="font-family:monospace">opusdec <font face="arial,sans-serif">from an <span style="font-family:monospace">appsrc</span>?</font><br></span></span></div><div><span style="font-family:monospace"><span style="font-family:monospace"><br></span></span></div><div><span style="font-family:arial,sans-serif">Thanks a lot,</span></div><div><span style="font-family:monospace"><span style="font-family:monospace"><span style="font-family:arial,sans-serif">Adam</span><br></span></span></div></div>
</blockquote></div>
</blockquote></div>