diff --git a/source/obs/obs-source-factory.hpp b/source/obs/obs-source-factory.hpp index b1e6ea01..b06072a3 100644 --- a/source/obs/obs-source-factory.hpp +++ b/source/obs/obs-source-factory.hpp @@ -115,13 +115,20 @@ namespace obs { } void set_have_child_sources(bool v) + { + if (v) { + _info.enum_all_sources = _enum_all_sources; + } else { + _info.enum_all_sources = nullptr; + } + } + + void set_have_active_child_sources(bool v) { if (v) { _info.enum_active_sources = _enum_active_sources; - _info.enum_all_sources = _enum_all_sources; } else { _info.enum_active_sources = nullptr; - _info.enum_all_sources = nullptr; } } diff --git a/source/obs/obs-tools.hpp b/source/obs/obs-tools.hpp index acccea3b..56bd1572 100644 --- a/source/obs/obs-tools.hpp +++ b/source/obs/obs-tools.hpp @@ -40,6 +40,26 @@ namespace obs { bool obs_properties_remove_by_name(obs_properties_t* props, const char* name); } // namespace tools + + static void obs_source_deleter(obs_source_t* v) + { + obs_source_release(v); + } + + static void obs_scene_deleter(obs_scene_t* v) + { + obs_scene_release(v); + } + + static void obs_sceneitem_releaser(obs_scene_item* v) + { + obs_sceneitem_release(v); + } + + static void obs_sceneitem_remover(obs_scene_item* v) + { + obs_sceneitem_remove(v); + } } // namespace obs #endif