Utils: Split monitor type util

This commit is contained in:
tt2468 2021-12-28 22:49:58 -08:00
parent 1339202c02
commit e1cb858d2d
2 changed files with 9 additions and 3 deletions

View File

@ -158,6 +158,7 @@ namespace Utils {
std::string GetCurrentProfilePath();
std::string GetCurrentRecordOutputPath();
std::string GetSourceType(obs_source_t *source);
std::string GetInputMonitorType(enum obs_monitoring_type monitorType);
std::string GetInputMonitorType(obs_source_t *input);
std::string GetMediaInputState(obs_source_t *input);
std::string GetLastReplayBufferFilePath();

View File

@ -85,10 +85,8 @@ std::string Utils::Obs::StringHelper::GetSourceType(obs_source_t *source)
}
}
std::string Utils::Obs::StringHelper::GetInputMonitorType(obs_source_t *input)
std::string Utils::Obs::StringHelper::GetInputMonitorType(enum obs_monitoring_type monitorType)
{
obs_monitoring_type monitorType = obs_source_get_monitoring_type(input);
switch (monitorType) {
default:
CASE(OBS_MONITORING_TYPE_NONE)
@ -97,6 +95,13 @@ std::string Utils::Obs::StringHelper::GetInputMonitorType(obs_source_t *input)
}
}
std::string Utils::Obs::StringHelper::GetInputMonitorType(obs_source_t *input)
{
obs_monitoring_type monitorType = obs_source_get_monitoring_type(input);
return GetInputMonitorType(monitorType);
}
std::string Utils::Obs::StringHelper::GetMediaInputState(obs_source_t *input)
{
obs_media_state mediaState = obs_source_media_get_state(input);