提交 8fc48633 编写于 作者: J jp9000

obs-ffmpeg: Add proc to get last replay buffer

Allows getting the path of the last replay buffer saved via the
procedure handler of the FFmpeg muxer output.
上级 f06c0dd7
......@@ -531,6 +531,12 @@ static void save_replay_proc(void *data, calldata_t *cd)
UNUSED_PARAMETER(cd);
}
static void get_last_replay(void *data, calldata_t *cd)
{
struct ffmpeg_muxer *stream = data;
calldata_set_string(cd, "path", stream->path.array);
}
static void *replay_buffer_create(obs_data_t *settings, obs_output_t *output)
{
UNUSED_PARAMETER(settings);
......@@ -544,6 +550,8 @@ static void *replay_buffer_create(obs_data_t *settings, obs_output_t *output)
proc_handler_t *ph = obs_output_get_proc_handler(output);
proc_handler_add(ph, "void save()", save_replay_proc, stream);
proc_handler_add(ph, "void get_last_replay(out string path)",
get_last_replay, stream);
return stream;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册