libobs: Add obs_source_is_scene()

This commit is contained in:
jp9000 2021-04-09 04:13:41 -07:00
parent 33c5563c1e
commit d332a8ea76
2 changed files with 7 additions and 0 deletions

View File

@ -3349,6 +3349,11 @@ bool obs_source_is_group(const obs_source_t *source)
return source && strcmp(source->info.id, group_info.id) == 0;
}
bool obs_source_is_scene(const obs_source_t *source)
{
return source && strcmp(source->info.id, scene_info.id) == 0;
}
bool obs_scene_is_group(const obs_scene_t *scene)
{
return scene ? scene->is_group : false;

View File

@ -1591,6 +1591,8 @@ obs_scene_reorder_items2(obs_scene_t *scene,
struct obs_sceneitem_order_info *item_order,
size_t item_order_size);
EXPORT bool obs_source_is_scene(const obs_source_t *source);
/** Adds/creates a new scene item for a source */
EXPORT obs_sceneitem_t *obs_scene_add(obs_scene_t *scene, obs_source_t *source);