implement layer level AUTO_LENGTH override to support AUTO play for all producers #1650
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds layer level AUTO_LENGTH to PLAY, LOADBG and LOAD to override auto play behavior at the layer level. This allows auto play functionality with infinite length producers (decklink, bluefish, looping content, etc.). Previously, infinite length producers couldn't use timed auto play since their nb_frames() returns infinity. With this change, users can now specify AUTO_LENGTH with any producer to override nb_franes. The implementation tracks separate auto_length overrides for foreground and background producers at the layer level.
This PR also adds a layer level CALL FRAMES_LEFT that allows you to query, set and clear the AUTO_LENGTH overide to augment auto play functionality at runtime.
CALL 1-0 FRAMES_LEFT 200
will change the AUTO_LENGTH override so that the auto transition will occur 200 frames from when the command was executed, effectively starting a countdown clock of the specified frames. It will also set AUTO play to true if there is a background producer loaded.CALL 1-0 FRAMES LEFT CLEAR
will remove any AUTO_LENGTH override and also disable auto play.notable autoplay behavior
closes #1644