From d08295551032674a18bcbbf41d54517e692f310a Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Thu, 2 Jan 2020 16:29:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6#199?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/include/mk_recorder.h | 1 + api/source/mk_recorder.cpp | 2 +- src/Record/Recorder.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/api/include/mk_recorder.h b/api/include/mk_recorder.h index a09b0147..c60e0e54 100644 --- a/api/include/mk_recorder.h +++ b/api/include/mk_recorder.h @@ -79,6 +79,7 @@ API_EXPORT int API_CALL mk_recorder_status(int type, const char *vhost, const ch * @param vhost 虚拟主机 * @param app 应用名 * @param stream 流id + * @param customized_path 录像文件保存自定义目录,默认为空或null则自动生成 * @param wait_for_record 是否等待流注册后再录制,未注册时,置false将返回失败 * @param continue_record 流注销时是否继续等待录制还是立即停止录制 * @return 0代表成功,负数代表失败 diff --git a/api/source/mk_recorder.cpp b/api/source/mk_recorder.cpp index 175a1e78..efd29c42 100644 --- a/api/source/mk_recorder.cpp +++ b/api/source/mk_recorder.cpp @@ -59,7 +59,7 @@ API_EXPORT int API_CALL mk_recorder_status(int type, const char *vhost, const ch API_EXPORT int API_CALL mk_recorder_start(int type, const char *vhost, const char *app, const char *stream,const char *customized_path,int wait_for_record, int continue_record){ assert(vhost && app && stream); - return Recorder::startRecord((Recorder::type)type,vhost,app,stream,customized_path,wait_for_record,continue_record); + return Recorder::startRecord((Recorder::type)type,vhost,app,stream,customized_path ? customized_path : "",wait_for_record,continue_record); } API_EXPORT int API_CALL mk_recorder_stop(int type, const char *vhost, const char *app, const char *stream){ diff --git a/src/Record/Recorder.h b/src/Record/Recorder.h index 84107950..67aef75b 100644 --- a/src/Record/Recorder.h +++ b/src/Record/Recorder.h @@ -69,6 +69,7 @@ public: * @param vhost 虚拟主机 * @param app 应用名 * @param stream_id 流id + * @param customized_path 录像文件保存自定义目录,默认为空则自动生成 * @param waitForRecord 是否等待流注册后再录制,未注册时,置false将返回失败 * @param continueRecord 流注销时是否继续等待录制还是立即停止录制 * @return 0代表成功,负数代表失败