Utils: Add string helper to get last replay

This commit is contained in:
tt2468 2021-06-12 20:34:08 -07:00
parent 4a00d169e1
commit 4503b6ed05
2 changed files with 13 additions and 0 deletions

View File

@ -96,6 +96,18 @@ std::string Utils::Obs::StringHelper::GetMediaInputStateString(obs_source_t *inp
}
}
std::string Utils::Obs::StringHelper::GetLastReplayBufferFilePath()
{
obs_output_t *output = obs_frontend_get_replay_buffer_output();
calldata_t cd = {0};
proc_handler_t *ph = obs_output_get_proc_handler(output);
proc_handler_call(ph, "get_last_replay", &cd);
std::string ret = calldata_string(&cd, "path");
calldata_free(&cd);
obs_output_release(output);
return ret;
}
std::vector<std::string> Utils::Obs::ListHelper::GetSceneCollectionList()
{
char** sceneCollections = obs_frontend_get_scene_collections();

View File

@ -35,6 +35,7 @@ namespace Utils {
std::string GetSourceTypeString(obs_source_t *source);
std::string GetInputMonitorTypeString(obs_source_t *input);
std::string GetMediaInputStateString(obs_source_t *input);
std::string GetLastReplayBufferFilePath();
}
namespace ListHelper {