sebastian at centricular.com
Wed Jun 17 00:21:48 PDT 2015
On Mi, 2015-06-17 at 09:13 +0200, Christian Sell wrote:
> since nobody answers I will close this subject with my own
> there is no way to achieve this. Again, my goal was to re-initiate
> the full negotation circle which would lead to set_caps being called
> on the final sink. This should happen sonchronously. This cannot be
> done via gst_event_new_reconfigure()), because
This is correct
> - the event as such only sets markers on the pads upstream. Actual
> processing happens when the processing loop is restarted, which
> requires a state change (e.g. PLAY)
This is not correct. Elements are supposed to check the RECONFIGURE
flag on their pads whenever they can, and e.g. most converters will do
so before every buffer they process.
Try running videotestsrc ! ximagesink and resize the window. The source
will get RECONFIGURE events from the sink, and then sends different
sized video frames next. (For extra fun add a videoscale between both
elements, then the renegotiation will happen in two steps sometimes:
first videoscale renegotiates, then videotestsrc renegotiates)
However the sink *must* continue to accept the old caps for a while as
there still might be buffers queued up with the old caps. Especially if
queues are used.
And queues and threading in general are the reason why renegotiation
can't happen synchronous. There might already be data with the old caps
that you would have to handle, or would have to drop yourself.
> - even when re-negotiation happens, it may not reach the final sink
> with a set_caps call - at least it did not in my case (custom src
> ->playsink->custom videosink)
That would mean that your sink did not actually request to get new
caps. See the ximagesink get_caps() implementation to see how that is
done (hint: ordering of the structures in the caps).
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 949 bytes
Desc: This is a digitally signed message part
More information about the gstreamer-devel