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-06-12 16:08:47 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0d6a574216ab7d5d4ad20d982639e3d57bc06118
0d6a5742
1 parent
56938efd
fix the hls_dispose bug, ignore for 0.
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
7 行增加
和
2 行删除
trunk/src/app/srs_app_hls.cpp
trunk/src/app/srs_app_hls.cpp
查看文件 @
0d6a574
...
...
@@ -950,6 +950,8 @@ int SrsHlsCache::on_publish(SrsHlsMuxer* muxer, SrsRequest* req, int64_t segment
double
hls_aof_ratio
=
_srs_config
->
get_hls_aof_ratio
(
vhost
);
// whether use floor(timestamp/hls_fragment) for variable timestamp
bool
ts_floor
=
_srs_config
->
get_hls_ts_floor
(
vhost
);
// the seconds to dispose the hls.
int
hls_dispose
=
_srs_config
->
get_hls_dispose
(
vhost
);
// TODO: FIXME: support load exists m3u8, to continue publish stream.
// for the HLS donot requires the EXT-X-MEDIA-SEQUENCE be monotonically increase.
...
...
@@ -967,9 +969,9 @@ int SrsHlsCache::on_publish(SrsHlsMuxer* muxer, SrsRequest* req, int64_t segment
srs_error
(
"m3u8 muxer open segment failed. ret=%d"
,
ret
);
return
ret
;
}
srs_trace
(
"hls: win=%.2f, frag=%.2f, prefix=%s, path=%s, m3u8=%s, ts=%s, aof=%.2f, floor=%d, clean=%d, waitk=%d"
,
srs_trace
(
"hls: win=%.2f, frag=%.2f, prefix=%s, path=%s, m3u8=%s, ts=%s, aof=%.2f, floor=%d, clean=%d, waitk=%d
, dispose=%d
"
,
hls_window
,
hls_fragment
,
entry_prefix
.
c_str
(),
path
.
c_str
(),
m3u8_file
.
c_str
(),
ts_file
.
c_str
(),
hls_aof_ratio
,
ts_floor
,
cleanup
,
wait_keyframe
);
ts_file
.
c_str
(),
hls_aof_ratio
,
ts_floor
,
cleanup
,
wait_keyframe
,
hls_dispose
);
return
ret
;
}
...
...
@@ -1188,6 +1190,9 @@ int SrsHls::cycle()
}
int
hls_dispose
=
_srs_config
->
get_hls_dispose
(
_req
->
vhost
)
*
1000
;
if
(
hls_dispose
<=
0
)
{
return
ret
;
}
if
(
srs_get_system_time_ms
()
-
last_update_time
<=
hls_dispose
)
{
return
ret
;
}
...
...
请
注册
或
登录
后发表评论