Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
ZLMediaKit
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
张翔宇
ZLMediaKit
Commits
cd27e5a9
Commit
cd27e5a9
authored
Oct 01, 2020
by
xiongziliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
注意!hls mp4录制的customized path字段改成录制根目录 相当于配置文件中hls mp4录制根目录相关设置
parent
8b7c792e
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
5 行增加
和
12 行删除
+5
-12
src/Record/Recorder.cpp
+2
-9
src/Record/Recorder.h
+3
-3
没有找到文件。
src/Record/Recorder.cpp
查看文件 @
cd27e5a9
...
...
@@ -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
:
...
...
src/Record/Recorder.h
查看文件 @
cd27e5a9
...
...
@@ -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
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论