mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
Utils: Add Obs::ListHelper::GetInputKindList()
This commit is contained in:
parent
428e437429
commit
4d77927ceb
@ -231,6 +231,28 @@ std::vector<json> Utils::Obs::ListHelper::GetTransitionList()
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::vector<std::string> Utils::Obs::ListHelper::GetInputKindList(bool unversioned)
|
||||||
|
{
|
||||||
|
std::vector<std::string> ret;
|
||||||
|
|
||||||
|
size_t idx = 0;
|
||||||
|
const char *kind;
|
||||||
|
const char *unversioned_kind;
|
||||||
|
while (obs_enum_input_types2(idx++, &kind, &unversioned_kind)) {
|
||||||
|
uint32_t caps = obs_get_source_output_flags(kind);
|
||||||
|
|
||||||
|
if ((caps & OBS_SOURCE_CAP_DISABLED) != 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (unversioned)
|
||||||
|
ret.push_back(unversioned_kind);
|
||||||
|
else
|
||||||
|
ret.push_back(kind);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
obs_hotkey_t *Utils::Obs::SearchHelper::GetHotkeyByName(std::string name)
|
obs_hotkey_t *Utils::Obs::SearchHelper::GetHotkeyByName(std::string name)
|
||||||
{
|
{
|
||||||
auto hotkeys = ListHelper::GetHotkeyList();
|
auto hotkeys = ListHelper::GetHotkeyList();
|
||||||
|
@ -48,6 +48,7 @@ namespace Utils {
|
|||||||
std::vector<json> GetSceneList();
|
std::vector<json> GetSceneList();
|
||||||
std::vector<json> GetSceneItemList(obs_scene_t *scene, bool basic = false);
|
std::vector<json> GetSceneItemList(obs_scene_t *scene, bool basic = false);
|
||||||
std::vector<json> GetTransitionList();
|
std::vector<json> GetTransitionList();
|
||||||
|
std::vector<std::string> GetInputKindList(bool unversioned = false);
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace SearchHelper {
|
namespace SearchHelper {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user