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
2014-04-13 13:31:59 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
bb87272c39b1c780d6ba7165d9b79b5c2188c338
bb87272c
1 parent
dc3c3cff
refine reload, rename some vhost specified to add vhost prefix
隐藏空白字符变更
内嵌
并排对比
正在显示
5 个修改的文件
包含
30 行增加
和
30 行删除
trunk/src/app/srs_app_config.cpp
trunk/src/app/srs_app_reload.cpp
trunk/src/app/srs_app_reload.hpp
trunk/src/app/srs_app_source.cpp
trunk/src/app/srs_app_source.hpp
trunk/src/app/srs_app_config.cpp
查看文件 @
bb87272
...
...
@@ -793,7 +793,7 @@ int SrsConfig::reload_vhost(SrsConfDirective* old_root)
if
(
!
srs_directive_equals
(
new_vhost
->
get
(
"atc"
),
old_vhost
->
get
(
"atc"
)))
{
for
(
it
=
subscribes
.
begin
();
it
!=
subscribes
.
end
();
++
it
)
{
ISrsReloadHandler
*
subscribe
=
*
it
;
if
((
ret
=
subscribe
->
on_reload_atc
(
vhost
))
!=
ERROR_SUCCESS
)
{
if
((
ret
=
subscribe
->
on_reload_
vhost_
atc
(
vhost
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"vhost %s notify subscribes atc failed. ret=%d"
,
vhost
.
c_str
(),
ret
);
return
ret
;
}
...
...
@@ -804,7 +804,7 @@ int SrsConfig::reload_vhost(SrsConfDirective* old_root)
if
(
!
srs_directive_equals
(
new_vhost
->
get
(
"gop_cache"
),
old_vhost
->
get
(
"gop_cache"
)))
{
for
(
it
=
subscribes
.
begin
();
it
!=
subscribes
.
end
();
++
it
)
{
ISrsReloadHandler
*
subscribe
=
*
it
;
if
((
ret
=
subscribe
->
on_reload_gop_cache
(
vhost
))
!=
ERROR_SUCCESS
)
{
if
((
ret
=
subscribe
->
on_reload_
vhost_
gop_cache
(
vhost
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"vhost %s notify subscribes gop_cache failed. ret=%d"
,
vhost
.
c_str
(),
ret
);
return
ret
;
}
...
...
@@ -815,7 +815,7 @@ int SrsConfig::reload_vhost(SrsConfDirective* old_root)
if
(
!
srs_directive_equals
(
new_vhost
->
get
(
"queue_length"
),
old_vhost
->
get
(
"queue_length"
)))
{
for
(
it
=
subscribes
.
begin
();
it
!=
subscribes
.
end
();
++
it
)
{
ISrsReloadHandler
*
subscribe
=
*
it
;
if
((
ret
=
subscribe
->
on_reload_queue_length
(
vhost
))
!=
ERROR_SUCCESS
)
{
if
((
ret
=
subscribe
->
on_reload_
vhost_
queue_length
(
vhost
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"vhost %s notify subscribes queue_length failed. ret=%d"
,
vhost
.
c_str
(),
ret
);
return
ret
;
}
...
...
@@ -826,7 +826,7 @@ int SrsConfig::reload_vhost(SrsConfDirective* old_root)
if
(
!
srs_directive_equals
(
new_vhost
->
get
(
"forward"
),
old_vhost
->
get
(
"forward"
)))
{
for
(
it
=
subscribes
.
begin
();
it
!=
subscribes
.
end
();
++
it
)
{
ISrsReloadHandler
*
subscribe
=
*
it
;
if
((
ret
=
subscribe
->
on_reload_forward
(
vhost
))
!=
ERROR_SUCCESS
)
{
if
((
ret
=
subscribe
->
on_reload_
vhost_
forward
(
vhost
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"vhost %s notify subscribes forward failed. ret=%d"
,
vhost
.
c_str
(),
ret
);
return
ret
;
}
...
...
@@ -837,7 +837,7 @@ int SrsConfig::reload_vhost(SrsConfDirective* old_root)
if
(
!
srs_directive_equals
(
new_vhost
->
get
(
"hls"
),
old_vhost
->
get
(
"hls"
)))
{
for
(
it
=
subscribes
.
begin
();
it
!=
subscribes
.
end
();
++
it
)
{
ISrsReloadHandler
*
subscribe
=
*
it
;
if
((
ret
=
subscribe
->
on_reload_hls
(
vhost
))
!=
ERROR_SUCCESS
)
{
if
((
ret
=
subscribe
->
on_reload_
vhost_
hls
(
vhost
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"vhost %s notify subscribes hls failed. ret=%d"
,
vhost
.
c_str
(),
ret
);
return
ret
;
}
...
...
@@ -945,7 +945,7 @@ int SrsConfig::reload_transcode(SrsConfDirective* new_vhost, SrsConfDirective* o
if
(
changed
)
{
for
(
it
=
subscribes
.
begin
();
it
!=
subscribes
.
end
();
++
it
)
{
ISrsReloadHandler
*
subscribe
=
*
it
;
if
((
ret
=
subscribe
->
on_reload_transcode
(
vhost
))
!=
ERROR_SUCCESS
)
{
if
((
ret
=
subscribe
->
on_reload_
vhost_
transcode
(
vhost
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"vhost %s notify subscribes transcode failed. ret=%d"
,
vhost
.
c_str
(),
ret
);
return
ret
;
}
...
...
trunk/src/app/srs_app_reload.cpp
查看文件 @
bb87272
...
...
@@ -105,32 +105,32 @@ int ISrsReloadHandler::on_reload_vhost_removed(string /*vhost*/)
return
ERROR_SUCCESS
;
}
int
ISrsReloadHandler
::
on_reload_atc
(
string
/*vhost*/
)
int
ISrsReloadHandler
::
on_reload_
vhost_
atc
(
string
/*vhost*/
)
{
return
ERROR_SUCCESS
;
}
int
ISrsReloadHandler
::
on_reload_gop_cache
(
string
/*vhost*/
)
int
ISrsReloadHandler
::
on_reload_
vhost_
gop_cache
(
string
/*vhost*/
)
{
return
ERROR_SUCCESS
;
}
int
ISrsReloadHandler
::
on_reload_queue_length
(
string
/*vhost*/
)
int
ISrsReloadHandler
::
on_reload_
vhost_
queue_length
(
string
/*vhost*/
)
{
return
ERROR_SUCCESS
;
}
int
ISrsReloadHandler
::
on_reload_forward
(
string
/*vhost*/
)
int
ISrsReloadHandler
::
on_reload_
vhost_
forward
(
string
/*vhost*/
)
{
return
ERROR_SUCCESS
;
}
int
ISrsReloadHandler
::
on_reload_hls
(
string
/*vhost*/
)
int
ISrsReloadHandler
::
on_reload_
vhost_
hls
(
string
/*vhost*/
)
{
return
ERROR_SUCCESS
;
}
int
ISrsReloadHandler
::
on_reload_transcode
(
string
/*vhost*/
)
int
ISrsReloadHandler
::
on_reload_
vhost_
transcode
(
string
/*vhost*/
)
{
return
ERROR_SUCCESS
;
}
...
...
trunk/src/app/srs_app_reload.hpp
查看文件 @
bb87272
...
...
@@ -55,12 +55,12 @@ public:
virtual
int
on_reload_vhost_http_updated
();
virtual
int
on_reload_vhost_added
(
std
::
string
vhost
);
virtual
int
on_reload_vhost_removed
(
std
::
string
vhost
);
virtual
int
on_reload_atc
(
std
::
string
vhost
);
virtual
int
on_reload_gop_cache
(
std
::
string
vhost
);
virtual
int
on_reload_queue_length
(
std
::
string
vhost
);
virtual
int
on_reload_forward
(
std
::
string
vhost
);
virtual
int
on_reload_hls
(
std
::
string
vhost
);
virtual
int
on_reload_transcode
(
std
::
string
vhost
);
virtual
int
on_reload_vhost_atc
(
std
::
string
vhost
);
virtual
int
on_reload_vhost_gop_cache
(
std
::
string
vhost
);
virtual
int
on_reload_vhost_queue_length
(
std
::
string
vhost
);
virtual
int
on_reload_vhost_forward
(
std
::
string
vhost
);
virtual
int
on_reload_vhost_hls
(
std
::
string
vhost
);
virtual
int
on_reload_vhost_transcode
(
std
::
string
vhost
);
virtual
int
on_reload_ingest_removed
(
std
::
string
vhost
,
std
::
string
ingest_id
);
virtual
int
on_reload_ingest_added
(
std
::
string
vhost
,
std
::
string
ingest_id
);
virtual
int
on_reload_ingest_updated
(
std
::
string
vhost
,
std
::
string
ingest_id
);
...
...
trunk/src/app/srs_app_source.cpp
查看文件 @
bb87272
...
...
@@ -484,7 +484,7 @@ SrsSource::~SrsSource()
srs_freep
(
req
);
}
int
SrsSource
::
on_reload_atc
(
string
vhost
)
int
SrsSource
::
on_reload_
vhost_
atc
(
string
vhost
)
{
int
ret
=
ERROR_SUCCESS
;
...
...
@@ -503,7 +503,7 @@ int SrsSource::on_reload_atc(string vhost)
return
ret
;
}
int
SrsSource
::
on_reload_gop_cache
(
string
vhost
)
int
SrsSource
::
on_reload_
vhost_
gop_cache
(
string
vhost
)
{
int
ret
=
ERROR_SUCCESS
;
...
...
@@ -522,7 +522,7 @@ int SrsSource::on_reload_gop_cache(string vhost)
return
ret
;
}
int
SrsSource
::
on_reload_queue_length
(
string
vhost
)
int
SrsSource
::
on_reload_
vhost_
queue_length
(
string
vhost
)
{
int
ret
=
ERROR_SUCCESS
;
...
...
@@ -557,7 +557,7 @@ int SrsSource::on_reload_queue_length(string vhost)
return
ret
;
}
int
SrsSource
::
on_reload_forward
(
string
vhost
)
int
SrsSource
::
on_reload_
vhost_
forward
(
string
vhost
)
{
int
ret
=
ERROR_SUCCESS
;
...
...
@@ -577,7 +577,7 @@ int SrsSource::on_reload_forward(string vhost)
return
ret
;
}
int
SrsSource
::
on_reload_hls
(
string
vhost
)
int
SrsSource
::
on_reload_
vhost_
hls
(
string
vhost
)
{
int
ret
=
ERROR_SUCCESS
;
...
...
@@ -597,7 +597,7 @@ int SrsSource::on_reload_hls(string vhost)
return
ret
;
}
int
SrsSource
::
on_reload_transcode
(
string
vhost
)
int
SrsSource
::
on_reload_
vhost_
transcode
(
string
vhost
)
{
int
ret
=
ERROR_SUCCESS
;
...
...
trunk/src/app/srs_app_source.hpp
查看文件 @
bb87272
...
...
@@ -266,12 +266,12 @@ public:
virtual
~
SrsSource
();
// interface ISrsReloadHandler
public:
virtual
int
on_reload_atc
(
std
::
string
vhost
);
virtual
int
on_reload_gop_cache
(
std
::
string
vhost
);
virtual
int
on_reload_queue_length
(
std
::
string
vhost
);
virtual
int
on_reload_forward
(
std
::
string
vhost
);
virtual
int
on_reload_hls
(
std
::
string
vhost
);
virtual
int
on_reload_transcode
(
std
::
string
vhost
);
virtual
int
on_reload_vhost_atc
(
std
::
string
vhost
);
virtual
int
on_reload_vhost_gop_cache
(
std
::
string
vhost
);
virtual
int
on_reload_vhost_queue_length
(
std
::
string
vhost
);
virtual
int
on_reload_vhost_forward
(
std
::
string
vhost
);
virtual
int
on_reload_vhost_hls
(
std
::
string
vhost
);
virtual
int
on_reload_vhost_transcode
(
std
::
string
vhost
);
public
:
// for the SrsForwarder to callback to request the sequence headers.
virtual
int
on_forwarder_start
(
SrsForwarder
*
forwarder
);
...
...
请
注册
或
登录
后发表评论