MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / getNextTransition

Function getNextTransition

lib/utils/scene-switch-helpers.cpp:39–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39static std::pair<obs_weak_source_t *, int>
40getNextTransition(obs_weak_source_t *scene1, obs_weak_source_t *scene2)
41{
42 obs_weak_source_t *ws = nullptr;
43 int duration = 0;
44 if (scene1 && scene2) {
45 for (SceneTransition &t : switcher->sceneTransitions) {
46 if (!t.initialized()) {
47 continue;
48 }
49
50 if (t.scene == scene1 && t.scene2 == scene2) {
51 ws = t.transition;
52 duration = t.duration * 1000;
53 break;
54 }
55 }
56 }
57 return std::make_pair(ws, duration);
58}
59
60void SetNextTransition(const SceneSwitchInfo &sceneSwitch,
61 obs_source_t *currentSource, TransitionData &td)

Callers 1

SetNextTransitionFunction · 0.85

Calls 1

initializedMethod · 0.45

Tested by

no test coverage detected