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-09-09 23:37:07 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
abd7ee227c2d770b47f9e082f61d5d971fcd4810
abd7ee22
1 parent
0221434a
support reload utc_time. 2.0.186
显示空白字符变更
内嵌
并排对比
正在显示
7 个修改的文件
包含
34 行增加
和
3 行删除
README.md
trunk/src/app/srs_app_config.cpp
trunk/src/app/srs_app_log.cpp
trunk/src/app/srs_app_log.hpp
trunk/src/app/srs_app_reload.cpp
trunk/src/app/srs_app_reload.hpp
trunk/src/core/srs_core.hpp
README.md
查看文件 @
abd7ee2
...
...
@@ -341,6 +341,7 @@ Remark:
## History
*
v2.0, 2015-09-09, support reload utc_time. 2.0.186
*
<strong>
v2.0, 2015-08-23,
[
2.0 alpha(2.0.185)
][
r2.0a0
]
released. 89022 lines.
</strong>
*
v2.0, 2015-08-22, HTTP API support JSONP by specifies the query string callback=xxx.
*
v2.0, 2015-08-20, fix
[
#380
][
bug #380
]
, srs-librtmp send sequence header when sps or pps changed.
...
...
trunk/src/app/srs_app_config.cpp
查看文件 @
abd7ee2
...
...
@@ -957,12 +957,24 @@ int SrsConfig::reload_conf(SrsConfig* conf)
srs_trace
(
"reload srs_log_file success."
);
}
// merge config: utc_time
if
(
!
srs_directive_equals
(
root
->
get
(
"utc_time"
),
old_root
->
get
(
"utc_time"
)))
{
for
(
it
=
subscribes
.
begin
();
it
!=
subscribes
.
end
();
++
it
)
{
ISrsReloadHandler
*
subscribe
=
*
it
;
if
((
ret
=
subscribe
->
on_reload_utc_time
())
!=
ERROR_SUCCESS
)
{
srs_error
(
"notify subscribes reload utc_time failed. ret=%d"
,
ret
);
return
ret
;
}
}
srs_trace
(
"reload utc_time success."
);
}
// merge config: pithy_print_ms
if
(
!
srs_directive_equals
(
root
->
get
(
"pithy_print_ms"
),
old_root
->
get
(
"pithy_print_ms"
)))
{
for
(
it
=
subscribes
.
begin
();
it
!=
subscribes
.
end
();
++
it
)
{
ISrsReloadHandler
*
subscribe
=
*
it
;
if
((
ret
=
subscribe
->
on_reload_pithy_print
())
!=
ERROR_SUCCESS
)
{
srs_error
(
"notify subscribes pithy_print_ms
listen
failed. ret=%d"
,
ret
);
srs_error
(
"notify subscribes pithy_print_ms failed. ret=%d"
,
ret
);
return
ret
;
}
}
...
...
trunk/src/app/srs_app_log.cpp
查看文件 @
abd7ee2
...
...
@@ -86,6 +86,7 @@ SrsFastLog::SrsFastLog()
fd
=
-
1
;
log_to_file_tank
=
false
;
utc
=
false
;
}
SrsFastLog
::~
SrsFastLog
()
...
...
@@ -111,6 +112,7 @@ int SrsFastLog::initialize()
log_to_file_tank
=
_srs_config
->
get_log_tank_file
();
_level
=
srs_get_log_level
(
_srs_config
->
get_log_level
());
utc
=
_srs_config
->
get_utc_time
();
}
return
ret
;
...
...
@@ -221,6 +223,13 @@ void SrsFastLog::error(const char* tag, int context_id, const char* fmt, ...)
write_log
(
fd
,
log_data
,
size
,
SrsLogLevel
::
Error
);
}
int
SrsFastLog
::
on_reload_utc_time
()
{
utc
=
_srs_config
->
get_utc_time
();
return
ERROR_SUCCESS
;
}
int
SrsFastLog
::
on_reload_log_tank
()
{
int
ret
=
ERROR_SUCCESS
;
...
...
@@ -291,7 +300,7 @@ bool SrsFastLog::generate_header(bool error, const char* tag, int context_id, co
// to calendar time
struct
tm
*
tm
;
if
(
_srs_config
&&
_srs_config
->
get_utc_time
()
)
{
if
(
utc
)
{
if
((
tm
=
gmtime
(
&
tv
.
tv_sec
))
==
NULL
)
{
return
false
;
}
...
...
trunk/src/app/srs_app_log.hpp
查看文件 @
abd7ee2
...
...
@@ -73,6 +73,8 @@ private:
int
fd
;
// whether log to file tank
bool
log_to_file_tank
;
// whether use utc time.
bool
utc
;
public
:
SrsFastLog
();
virtual
~
SrsFastLog
();
...
...
@@ -85,6 +87,7 @@ public:
virtual
void
error
(
const
char
*
tag
,
int
context_id
,
const
char
*
fmt
,
...);
// interface ISrsReloadHandler.
public:
virtual
int
on_reload_utc_time
();
virtual
int
on_reload_log_tank
();
virtual
int
on_reload_log_level
();
virtual
int
on_reload_log_file
();
...
...
trunk/src/app/srs_app_reload.cpp
查看文件 @
abd7ee2
...
...
@@ -40,6 +40,11 @@ int ISrsReloadHandler::on_reload_listen()
return
ERROR_SUCCESS
;
}
int
ISrsReloadHandler
::
on_reload_utc_time
()
{
return
ERROR_SUCCESS
;
}
int
ISrsReloadHandler
::
on_reload_max_conns
()
{
return
ERROR_SUCCESS
;
...
...
trunk/src/app/srs_app_reload.hpp
查看文件 @
abd7ee2
...
...
@@ -44,6 +44,7 @@ public:
ISrsReloadHandler
();
virtual
~
ISrsReloadHandler
();
public
:
virtual
int
on_reload_utc_time
();
virtual
int
on_reload_max_conns
();
virtual
int
on_reload_listen
();
virtual
int
on_reload_pid
();
...
...
trunk/src/core/srs_core.hpp
查看文件 @
abd7ee2
...
...
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version
#define VERSION_MAJOR 2
#define VERSION_MINOR 0
#define VERSION_REVISION 18
5
#define VERSION_REVISION 18
6
// server info.
#define RTMP_SIG_SRS_KEY "SRS"
...
...
请
注册
或
登录
后发表评论