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-07 10:30:45 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e7fd309cb0369d99e9a7042bac403a27bdc6c7c9
e7fd309c
1 parent
6e2d756e
refine hls info, show the deviation in seconds and pieces.
显示空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
10 行增加
和
2 行删除
trunk/src/app/srs_app_hls.cpp
trunk/src/app/srs_app_hls.hpp
trunk/src/app/srs_app_hls.cpp
查看文件 @
e7fd309
...
...
@@ -272,6 +272,13 @@ double SrsHlsMuxer::deviation()
return
hls_fragment_deviation
;
}
int
SrsHlsMuxer
::
absolute_deviation
()
{
// accept the floor ts for the first piece.
int64_t
floor_ts
=
(
int64_t
)(
srs_get_system_time_ms
()
/
(
1000
*
hls_fragment
));
return
(
int
)(
accept_floor_ts
-
(
floor_ts
-
1
));
}
int
SrsHlsMuxer
::
initialize
(
ISrsHlsHandler
*
h
)
{
int
ret
=
ERROR_SUCCESS
;
...
...
@@ -1203,9 +1210,9 @@ void SrsHls::hls_show_mux_log()
// the run time is not equals to stream time,
// @see: https://github.com/winlinvip/simple-rtmp-server/issues/81#issuecomment-48100994
// it's ok.
srs_trace
(
"-> "
SRS_CONSTS_LOG_HLS
" time=%"
PRId64
", stream dts=%"
PRId64
"(%"
PRId64
"ms), s
equence_no=%d, ts=%s, duration=%.2f, deviation=%.2f
"
,
srs_trace
(
"-> "
SRS_CONSTS_LOG_HLS
" time=%"
PRId64
", stream dts=%"
PRId64
"(%"
PRId64
"ms), s
no=%d, ts=%s, dur=%.2f, dva=%.2fs/%dp
"
,
pprint
->
age
(),
stream_dts
,
stream_dts
/
90
,
muxer
->
sequence_no
(),
muxer
->
ts_url
().
c_str
(),
muxer
->
duration
(),
muxer
->
deviation
());
muxer
->
duration
(),
muxer
->
deviation
()
,
muxer
->
absolute_deviation
()
);
}
}
...
...
trunk/src/app/srs_app_hls.hpp
查看文件 @
e7fd309
...
...
@@ -237,6 +237,7 @@ public:
virtual
std
::
string
ts_url
();
virtual
double
duration
();
virtual
double
deviation
();
virtual
int
absolute_deviation
();
public
:
/**
* initialize the hls muxer.
...
...
请
注册
或
登录
后发表评论