Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2015-04-14 11:36:58 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
02a2cb7e1a3b9f2b049eabc4fa2b115091af563f
02a2cb7e
1 parent
a4216cc5
for #381, refine the hls notify, report one by one.
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
11 行增加
和
6 行删除
trunk/conf/full.conf
trunk/src/app/srs_app_hls.cpp
trunk/conf/full.conf
查看文件 @
02a2cb7
...
...
@@ -794,6 +794,7 @@ vhost hooks.callback.srs.com {
# [stream], replace with the stream.
# [ts_url], replace with the ts url.
# ignore any return data of server.
# @remark random select a url to report, not report all.
on_hls_notify
http
://
127
.
0
.
0
.
1
:
8085
/
api
/
v1
/
hls
/[
app
]/[
stream
][
ts_url
];
}
}
...
...
trunk/src/app/srs_app_hls.cpp
查看文件 @
02a2cb7
...
...
@@ -240,13 +240,17 @@ int SrsDvrAsyncCallOnHlsNotify::call()
return
ret
;
}
std
::
string
url
;
if
(
true
)
{
static
u_int32_t
nb_call
=
0
;
int
index
=
nb_call
++
%
on_hls
->
args
.
size
();
url
=
on_hls
->
args
.
at
(
index
);
}
int
nb_notify
=
_srs_config
->
get_vhost_hls_nb_notify
(
req
->
vhost
);
for
(
int
i
=
0
;
i
<
(
int
)
on_hls
->
args
.
size
();
i
++
)
{
std
::
string
url
=
on_hls
->
args
.
at
(
i
);
if
((
ret
=
SrsHttpHooks
::
on_hls_notify
(
url
,
req
,
ts_url
,
nb_notify
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"hook client on_hls_notify failed. url=%s, ts=%s, ret=%d"
,
url
.
c_str
(),
ts_url
.
c_str
(),
ret
);
return
ret
;
}
if
((
ret
=
SrsHttpHooks
::
on_hls_notify
(
url
,
req
,
ts_url
,
nb_notify
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"hook client on_hls_notify failed. url=%s, ts=%s, ret=%d"
,
url
.
c_str
(),
ts_url
.
c_str
(),
ret
);
return
ret
;
}
}
#endif
...
...
请
注册
或
登录
后发表评论