mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
Utils: Add string helper to get last replay
This commit is contained in:
parent
4a00d169e1
commit
4503b6ed05
@ -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();
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user