<div dir="ltr">Hi Sebastian,<div><br></div><div>The problem is not with the content of the buffers, thats something that can be solved easily, the problem is that the source raises a not negotiated error to the bus and stops the streaming thread. It seems that the source pad of the queue has a problem sending the sticky events to its peer (the one that sends the reconfigure event):</div>
<div><br></div><div><div>0:00:00.031095032 3140 0x2547450 WARN GST_PADS gstpad.c:3726:gst_pad_peer_query:<queue1:src> could not send sticky events</div></div><div>.......</div><div>0:00:00.032475711 3140 0x2613b50 ERROR negotiation_test negotiation_test/main.c:130:bus_message: Error: error message: 0x7fd114002280, time 99:99:99.999999999, seq-num 91, element 'audiotestsrc1', GstMessageError, gerror=(GError)NULL, debug=(string)"gstbasesrc.c\(2933\):\ gst_base_src_loop\ \(\):\ /GstPipeline:negotiation_test_1/GstAudioTestSrc:audiotestsrc1:\012streaming\ task\ paused\,\ reason\ not-negotiated\ \(-4\)";<br>
</div><div><br></div><div>...</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-06-06 11:42 GMT+02:00 Sebastian Dröge <span dir="ltr"><<a href="mailto:sebastian@centricular.com" target="_blank">sebastian@centricular.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Fr, 2014-06-06 at 10:54 +0200, Jose Antonio Santos Cadenas wrote:<br>
> Hi,<br>
><br>
> I've been investigating about reconfiguration of pipelines dynamically and<br>
> I run into negotiation problems while changing the caps of a stream while<br>
> playing.<br>
><br>
> I've developed a program to test the issue, you can download it here:<br>
><br>
> <a href="https://github.com/jcaden/negotiation_test" target="_blank">https://github.com/jcaden/negotiation_test</a><br>
><br>
> Let me explain the test a little bit (copied from the repo README):<br>
><br>
> This test creates a simple pipeline and forces caps renegotiation once the<br>
> GST_MESSAGE_STREAM_START is received on bus. It terminates correctly if<br>
> the<br>
> appsink receives a buffer with the renegotiated format.<br>
><br>
> This program runs a test continuously until it fails or it is executed a<br>
> number of times selected by the used with -n option (1000000 by default).<br>
><br>
> If option -q is given, the pipeline is this:<br>
><br>
> -------------- ------- ---------<br>
> | audiotestsrc | -> | queue | -> | appsink |<br>
> -------------- ------- ---------<br>
><br>
> This test frequently fails (1 on 15?), because audiotestsrc receive a<br>
> not negotiated error while pushing a buffer or because no buffer with<br>
> the new format is received.<br>
><br>
> If -q option is not present the pipeline is this:<br>
><br>
> -------------- ---------<br>
> | audiotestsrc | -> | appsink |<br>
> -------------- ---------<br>
><br>
> This second pipeline works properly and renegotiates correctly.<br>
><br>
> I'd like to know if I am suppose to do something else to perform the<br>
> renegotiation, currently I am blocking the appsink:sink pad to change the<br>
> appsink caps and send a reconfigure event, then I unblock the pad again.<br>
<br>
</div></div>Renegotiation and the RECONFIGURE event in GStreamer are only "hints",<br>
not something that makes sure you immediately only get buffers in the<br>
new format. And especially if a queue is used it can be possible that<br>
there are still buffers with the old format inside the queue.<br>
<br>
Your sink must be able to handle (or at least silently drop) buffers in<br>
the old format after a reconfigure event.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Sebastian Dröge, Centricular Ltd - <a href="http://www.centricular.com" target="_blank">http://www.centricular.com</a><br>
Expertise, Straight from the Source<br>
</font></span><br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br></div>