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

Function getWeakSceneSourceByName

lib/utils/scene-selection.cpp:52–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52static OBSWeakSource getWeakSceneSourceByName(const OBSWeakCanvas &weakCanvas,
53 const char *name)
54{
55#if LIBOBS_API_VER < MAKE_SEMANTIC_VERSION(31, 1, 0)
56 return GetWeakSourceByName(name);
57#else
58 if (!weakCanvas) {
59 return nullptr;
60 }
61
62 OBSCanvasAutoRelease canvas = obs_weak_canvas_get_canvas(weakCanvas);
63 if (!canvas) {
64 return nullptr;
65 }
66
67 OBSSourceAutoRelease source =
68 obs_canvas_get_source_by_name(canvas, name);
69 OBSWeakSource scene = OBSGetWeakRef(source);
70 return scene;
71#endif
72}
73
74void SceneSelection::Load(obs_data_t *obj, const char *name,
75 const char *typeName)

Callers 3

LoadMethod · 0.85
GetSceneMethod · 0.85
CurrentSelectionMethod · 0.85

Calls 2

GetWeakSourceByNameFunction · 0.85

Tested by

no test coverage detected