注意!hls mp4录制的customized path字段改成录制根目录 相当于配置文件中hls mp4录制根目录相关设置
This commit is contained in:
parent
8b7c792e44
commit
cd27e5a9f9
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue