mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-20 04:42:18 +02:00
libobs: Add obs_scene_get_ref()
This commit is contained in:
parent
b77ccceae7
commit
f29e5ffbc7
@ -1649,6 +1649,15 @@ void obs_scene_addref(obs_scene_t *scene)
|
||||
obs_source_addref(scene->source);
|
||||
}
|
||||
|
||||
obs_scene_t *obs_scene_get_ref(obs_scene_t *scene)
|
||||
{
|
||||
if (!scene)
|
||||
return NULL;
|
||||
if (obs_source_get_ref(scene->source) != NULL)
|
||||
return scene;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void obs_scene_release(obs_scene_t *scene)
|
||||
{
|
||||
if (scene)
|
||||
|
@ -1593,6 +1593,8 @@ EXPORT obs_scene_t *obs_scene_duplicate(obs_scene_t *scene, const char *name,
|
||||
EXPORT void obs_scene_addref(obs_scene_t *scene);
|
||||
EXPORT void obs_scene_release(obs_scene_t *scene);
|
||||
|
||||
EXPORT obs_scene_t *obs_scene_get_ref(obs_scene_t *scene);
|
||||
|
||||
/** Gets the scene's source context */
|
||||
EXPORT obs_source_t *obs_scene_get_source(const obs_scene_t *scene);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user