Commit cd27e5a9 by xiongziliang

注意!hls mp4录制的customized path字段改成录制根目录 相当于配置文件中hls mp4录制根目录相关设置

parent 8b7c792e
......@@ -31,7 +31,7 @@ string Recorder::getRecordPath(Recorder::type type, const string &vhost, const s
}
//Here we use the customized file path.
if (!customized_path.empty()) {
m3u8FilePath = customized_path + "/hls.m3u8";
return File::absolutePath(m3u8FilePath, customized_path);
}
return File::absolutePath(m3u8FilePath, hlsPath);
}
......@@ -46,15 +46,8 @@ string Recorder::getRecordPath(Recorder::type type, const string &vhost, const s
}
//Here we use the customized file path.
if (!customized_path.empty()) {
/*开始删除*/
// mp4FilePath = customized_path + "/";
/*删除结束*/
/*开始添加*/
//@子悦,你上次说这里为了安全不能跳出目录,但实际操作过程中因为存储挂载位置不由流媒体决定,为了方便保存到挂载存储上,我这边做成可以跳出自已目录,你看是否合适,或者有其他办法可以处理这事
return customized_path + "/"+mp4FilePath;
/*开始添加*/
return File::absolutePath(mp4FilePath, customized_path);
}
return File::absolutePath(mp4FilePath, recordPath);
}
default:
......
......@@ -45,7 +45,7 @@ public:
* @param vhost 虚拟主机
* @param app 应用名
* @param stream_id 流id
* @param customized_path 录像文件保存自定义目录,默认为空则自动生成
* @param customized_path 录像文件保存自定义根目录,为空则采用配置文件设置
* @return 录制文件绝对路径
*/
static string getRecordPath(type type, const string &vhost, const string &app, const string &stream_id,const string &customized_path = "");
......@@ -56,7 +56,7 @@ public:
* @param vhost 虚拟主机
* @param app 应用名
* @param stream_id 流id
* @param customized_path 录像文件保存自定义目录,默认为空则自动生成
* @param customized_path 录像文件保存自定义根目录,为空则采用配置文件设置
* @return 对象指针,可能为nullptr
*/
static std::shared_ptr<MediaSinkInterface> createRecorder(type type, const string &vhost, const string &app, const string &stream_id, const string &customized_path = "");
......@@ -77,7 +77,7 @@ public:
* @param vhost 虚拟主机
* @param app 应用名
* @param stream_id 流id
* @param customized_path 录像文件保存自定义目录,默认为空则自动生成
* @param customized_path 录像文件保存自定义根目录,为空则采用配置文件设置
* @return 成功与否
*/
static bool startRecord(type type, const string &vhost, const string &app, const string &stream_id,const string &customized_path);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论