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
d2d84680
Commit
d2d84680
authored
Jan 19, 2020
by
liuziloong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
temp
parent
81d3e54d
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
55 行增加
和
1 行删除
+55
-1
server/Process.cpp
+1
-1
server/WebApi.cpp
+54
-0
没有找到文件。
server/Process.cpp
查看文件 @
d2d84680
...
...
@@ -53,7 +53,7 @@ void Process::run(const string &cmd, const string &log_file_tmp) {
ZeroMemory
(
&
si
,
sizeof
(
si
));
//结构体初始化;
ZeroMemory
(
&
pi
,
sizeof
(
pi
));
LPTSTR
lpDir
=
const_cast
<
char
*>
(
cmd
.
data
());
LPTSTR
lpDir
=
const_cast
<
char
*>
(
cmd
.
data
());
if
(
CreateProcess
(
NULL
,
lpDir
,
NULL
,
NULL
,
FALSE
,
0
,
NULL
,
NULL
,
&
si
,
&
pi
)){
//下面两行关闭句柄,解除本进程和新进程的关系,不然有可能 不小心调用TerminateProcess函数关掉子进程
...
...
server/WebApi.cpp
查看文件 @
d2d84680
...
...
@@ -771,6 +771,60 @@ void installWebApi() {
val
[
"status"
]
=
(
int
)
status
;
});
//获取录像列表(按月)
//http://127.0.0.1/index/api/getMp4RecordMonthly?app=pzstll&stream=stream_4&period=2020-01
API_REGIST
(
api
,
getMp4RecordMonthly
,
{
CHECK_SECRET
();
CHECK_ARGS
(
"app"
,
"stream"
,
"period"
);
GET_CONFIG
(
string
,
recordAppName
,
Record
::
kAppName
);
GET_CONFIG
(
string
,
recordPath
,
Record
::
kFilePath
);
GET_CONFIG
(
bool
,
enableVhost
,
General
::
kEnableVhost
);
auto
_vhost
=
allArgs
[
"vhost"
];
auto
_app
=
allArgs
[
"app"
];
auto
_stream
=
allArgs
[
"stream"
];
auto
_period
=
allArgs
[
"period"
];
//TODO:判断日期格式
//Vhost为空的话,存储路径不一样
if
(
_vhost
.
empty
())
{
_vhost
=
DEFAULT_VHOST
;
}
string
strMp4RecordPath
;
if
(
enableVhost
)
{
strMp4RecordPath
=
recordPath
+
"/"
+
_vhost
+
"/"
+
recordAppName
+
"/"
+
_app
+
"/"
+
_stream
;
}
else
{
strMp4RecordPath
=
recordPath
+
"/"
+
recordAppName
+
"/"
+
_app
+
"/"
+
_stream
;
}
DebugL
<<
strMp4RecordPath
;
Json
::
Value
nVal
;
nVal
[
"vhost"
]
=
_vhost
.
data
();
nVal
[
"app"
]
=
_app
.
data
();
nVal
[
"stream"
]
=
_stream
.
data
();
nVal
[
"app"
]
=
_app
.
data
();
val
[
"data"
]
=
nVal
;
});
//获取录像列表(按天)
//http://127.0.0.1/index/api/getMp4RecordDaily?app=pzstll&stream=stream_4&period=2020-01-17
API_REGIST
(
api
,
getMp4RecordDaily
,
{
CHECK_SECRET
();
CHECK_ARGS
(
"app"
,
"stream"
,
"period"
);
});
////////////以下是注册的Hook API////////////
API_REGIST
(
hook
,
on_publish
,{
//开始推流事件
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论