mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
Utils: Add helpers to get some current data
This commit is contained in:
parent
136a270473
commit
e15acf9065
@ -38,6 +38,22 @@ std::string Utils::Obs::StringHelper::GetObsVersionString()
|
|||||||
return combined.toStdString();
|
return combined.toStdString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string Utils::Obs::StringHelper::GetCurrentSceneCollection()
|
||||||
|
{
|
||||||
|
char *sceneCollectionName = obs_frontend_get_current_scene_collection();
|
||||||
|
std::string ret = sceneCollectionName;
|
||||||
|
bfree(sceneCollectionName);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string Utils::Obs::StringHelper::GetCurrentProfile()
|
||||||
|
{
|
||||||
|
char *profileName = obs_frontend_get_current_profile();
|
||||||
|
std::string ret = profileName;
|
||||||
|
bfree(profileName);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
std::string Utils::Obs::StringHelper::GetSourceTypeString(obs_source_t *source)
|
std::string Utils::Obs::StringHelper::GetSourceTypeString(obs_source_t *source)
|
||||||
{
|
{
|
||||||
obs_source_type sourceType = obs_source_get_type(source);
|
obs_source_type sourceType = obs_source_get_type(source);
|
||||||
|
@ -30,6 +30,8 @@ namespace Utils {
|
|||||||
namespace Obs {
|
namespace Obs {
|
||||||
namespace StringHelper {
|
namespace StringHelper {
|
||||||
std::string GetObsVersionString();
|
std::string GetObsVersionString();
|
||||||
|
std::string GetCurrentSceneCollection();
|
||||||
|
std::string GetCurrentProfile();
|
||||||
std::string GetSourceTypeString(obs_source_t *source);
|
std::string GetSourceTypeString(obs_source_t *source);
|
||||||
std::string GetInputMonitorTypeString(obs_source_t *input);
|
std::string GetInputMonitorTypeString(obs_source_t *input);
|
||||||
std::string GetMediaInputStateString(obs_source_t *input);
|
std::string GetMediaInputStateString(obs_source_t *input);
|
||||||
|
Loading…
Reference in New Issue
Block a user