Purpose of obs_transition_swap_begin / obs_transition_swap_end #9273
Unanswered
PeterAkakpo
asked this question in
Development Questions
Replies: 1 comment
-
To start things off: The behavior of creating scene items directly from transition sources is generally considered undefined and may break OBS. If I remember correctly, the transition swap functions are there to prevent flicker when one transition is swapped out with another. Since idx 0 in the OBS main view is a transition source, with the current scene being a child of that transition, if the transition is swapped out, there may be a few frames where the current scene is not rendered to the output. Doing this swap procedure ensures that the actual swapout is queued and gets performed between frames. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
from the obs UI source code, the only time obs_transition_swap_begin / obs_transition_swap_end are used is when changing the output source with obs_output_set_source . is there any other use case for these two functions?
i have a scene item that is a transition, how can i swap this scene item's transition to another transition. lets say the scene item was created with a fade_transition, now i want to replace it with a slide_transition without affecting the video output.
is there a function like obs_sceneitem_set_source. so that i can so something like
OBSSourceAutoRelease oldTransition=obs_sceneitem_get_source(item);
obs_transition_swap_begin(newTransition, oldTransition);
obs_sceneitem_set_source(iten, newTransition);
obs_transition_swap_end(newTransition, oldTransition);
MY USE CASE:
at the start of the application a create a fixed number of scene items from a cut_transition . each scene item is called a layer.
obs_sceneitem_set_show_transition is not going to help my use case
Beta Was this translation helpful? Give feedback.
All reactions