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
2013-12-14 21:34:54 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f016914ac1d3414e6351bfe7b8aa540a092fa781
f016914a
1 parent
010b7a75
rename SrsReloadHandler to ISrsReloadHandler
隐藏空白字符变更
内嵌
并排对比
正在显示
6 个修改的文件
包含
19 行增加
和
19 行删除
trunk/src/core/srs_core_config.cpp
trunk/src/core/srs_core_config.hpp
trunk/src/core/srs_core_pithy_print.cpp
trunk/src/core/srs_core_reload.cpp
trunk/src/core/srs_core_reload.hpp
trunk/src/core/srs_core_server.hpp
trunk/src/core/srs_core_config.cpp
查看文件 @
f016914
...
...
@@ -452,12 +452,12 @@ int SrsConfig::reload()
conf
.
root
=
NULL
;
// merge config.
std
::
vector
<
SrsReloadHandler
*>::
iterator
it
;
std
::
vector
<
I
SrsReloadHandler
*>::
iterator
it
;
// merge config: listen
if
(
!
srs_directive_equals
(
root
->
get
(
"listen"
),
old_root
->
get
(
"listen"
)))
{
for
(
it
=
subscribes
.
begin
();
it
!=
subscribes
.
end
();
++
it
)
{
SrsReloadHandler
*
subscribe
=
*
it
;
I
SrsReloadHandler
*
subscribe
=
*
it
;
if
((
ret
=
subscribe
->
on_reload_listen
())
!=
ERROR_SUCCESS
)
{
srs_error
(
"notify subscribes reload listen failed. ret=%d"
,
ret
);
return
ret
;
...
...
@@ -468,7 +468,7 @@ int SrsConfig::reload()
// merge config: pithy_print
if
(
!
srs_directive_equals
(
root
->
get
(
"pithy_print"
),
old_root
->
get
(
"pithy_print"
)))
{
for
(
it
=
subscribes
.
begin
();
it
!=
subscribes
.
end
();
++
it
)
{
SrsReloadHandler
*
subscribe
=
*
it
;
I
SrsReloadHandler
*
subscribe
=
*
it
;
if
((
ret
=
subscribe
->
on_reload_pithy_print
())
!=
ERROR_SUCCESS
)
{
srs_error
(
"notify subscribes pithy_print listen failed. ret=%d"
,
ret
);
return
ret
;
...
...
@@ -482,9 +482,9 @@ int SrsConfig::reload()
return
ret
;
}
void
SrsConfig
::
subscribe
(
SrsReloadHandler
*
handler
)
void
SrsConfig
::
subscribe
(
I
SrsReloadHandler
*
handler
)
{
std
::
vector
<
SrsReloadHandler
*>::
iterator
it
;
std
::
vector
<
I
SrsReloadHandler
*>::
iterator
it
;
it
=
std
::
find
(
subscribes
.
begin
(),
subscribes
.
end
(),
handler
);
if
(
it
!=
subscribes
.
end
())
{
...
...
@@ -494,9 +494,9 @@ void SrsConfig::subscribe(SrsReloadHandler* handler)
subscribes
.
push_back
(
handler
);
}
void
SrsConfig
::
unsubscribe
(
SrsReloadHandler
*
handler
)
void
SrsConfig
::
unsubscribe
(
I
SrsReloadHandler
*
handler
)
{
std
::
vector
<
SrsReloadHandler
*>::
iterator
it
;
std
::
vector
<
I
SrsReloadHandler
*>::
iterator
it
;
it
=
std
::
find
(
subscribes
.
begin
(),
subscribes
.
end
(),
handler
);
if
(
it
==
subscribes
.
end
())
{
...
...
trunk/src/core/srs_core_config.hpp
查看文件 @
f016914
...
...
@@ -96,14 +96,14 @@ private:
bool
show_version
;
std
::
string
config_file
;
SrsConfDirective
*
root
;
std
::
vector
<
SrsReloadHandler
*>
subscribes
;
std
::
vector
<
I
SrsReloadHandler
*>
subscribes
;
public
:
SrsConfig
();
virtual
~
SrsConfig
();
public
:
virtual
int
reload
();
virtual
void
subscribe
(
SrsReloadHandler
*
handler
);
virtual
void
unsubscribe
(
SrsReloadHandler
*
handler
);
virtual
void
subscribe
(
ISrsReloadHandler
*
handler
);
virtual
void
unsubscribe
(
ISrsReloadHandler
*
handler
);
public
:
virtual
int
parse_options
(
int
argc
,
char
**
argv
);
private
:
...
...
trunk/src/core/srs_core_pithy_print.cpp
查看文件 @
f016914
...
...
@@ -33,7 +33,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define SRS_STAGE_DEFAULT_INTERVAL_MS 1200
struct
SrsStageInfo
:
public
SrsReloadHandler
struct
SrsStageInfo
:
public
I
SrsReloadHandler
{
int
stage_id
;
int
pithy_print_time_ms
;
...
...
trunk/src/core/srs_core_reload.cpp
查看文件 @
f016914
...
...
@@ -25,20 +25,20 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <srs_core_error.hpp>
SrsReloadHandler
::
SrsReloadHandler
()
ISrsReloadHandler
::
I
SrsReloadHandler
()
{
}
SrsReloadHandler
::~
SrsReloadHandler
()
ISrsReloadHandler
::~
I
SrsReloadHandler
()
{
}
int
SrsReloadHandler
::
on_reload_listen
()
int
I
SrsReloadHandler
::
on_reload_listen
()
{
return
ERROR_SUCCESS
;
}
int
SrsReloadHandler
::
on_reload_pithy_print
()
int
I
SrsReloadHandler
::
on_reload_pithy_print
()
{
return
ERROR_SUCCESS
;
}
...
...
trunk/src/core/srs_core_reload.hpp
查看文件 @
f016914
...
...
@@ -32,11 +32,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/**
* the handler for config reload.
*/
class
SrsReloadHandler
class
I
SrsReloadHandler
{
public
:
SrsReloadHandler
();
virtual
~
SrsReloadHandler
();
ISrsReloadHandler
();
virtual
~
ISrsReloadHandler
();
public
:
virtual
int
on_reload_listen
();
virtual
int
on_reload_pithy_print
();
...
...
trunk/src/core/srs_core_server.hpp
查看文件 @
f016914
...
...
@@ -65,7 +65,7 @@ public:
virtual
int
cycle
();
};
class
SrsServer
:
public
SrsReloadHandler
class
SrsServer
:
public
I
SrsReloadHandler
{
friend
class
SrsListener
;
private
:
...
...
请
注册
或
登录
后发表评论