Skip to content

gst-validate-scenario: Make waits optional in appsrc-push

While in many cases it's desirable to wait for a buffer to be pushed downstream when using appsrc-push, in some cases this is not possible as such pushing action is dependent on following actions that would not be executed if we wait.

An example for this is prerolling:

appsrc ! qtdemux ! video/x-h264 ! decodebin name=dec ! %(videosink)s
description, seek=false, handles-states=true
appsrc-push, target-element-name=appsrc0, file-name="raw_h264.0.mp4", wait=false
set-state, state=playing
appsrc-eos, target-element-name=appsrc0

In order for the preroll to occur, both the appsrc needs to push the buffer and the state needs to reach PLAYING. But set-state cannot finish if the buffer has not been pushed (the state transition does not finish) and conversely pushing the buffer will not finish until the state has reached.

Making appsrc-push not wait for the buffer solves this problem. A new wait property is added for this purpose. The default value is true, so there is no behavior change for existing tests.

Edited by Alicia Boya García

Merge request reports

Loading