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-15 20:36:59 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9080c2e559279dbd4f4c1849da913155c26680be
9080c2e5
1 parent
e262147e
ensure the HLS(ts) is continous when republish stream.
隐藏空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
21 行增加
和
4 行删除
README.md
trunk/src/core/srs_core_hls.cpp
trunk/src/core/srs_core_hls.hpp
trunk/src/core/srs_core_source.cpp
README.md
查看文件 @
9080c2e
...
...
@@ -212,6 +212,7 @@ usr sys idl wai hiq siq| read writ| recv send| in out | int csw
*
nginx v1.5.0: 139524 lines
<br/>
### History
*
v0.9, 2013-12-15, ensure the HLS(ts) is continous when republish stream.
*
v0.9, 2013-12-15, fix the hls reload bug, feed it the sequence header.
*
v0.9, 2013-12-15, refine protocol, use int64_t timestamp for ts and jitter.
*
v0.9, 2013-12-15, support set the live queue length(in seconds), drop when full.
...
...
trunk/src/core/srs_core_hls.cpp
查看文件 @
9080c2e
...
...
@@ -1332,12 +1332,12 @@ int SrsHls::on_video(SrsSharedPtrMessage* video)
return
ret
;
}
_mpegts
();
hls_mux
();
return
ret
;
}
void
SrsHls
::
_mpegts
()
void
SrsHls
::
hls_mux
()
{
// reportable
if
(
pithy_print
->
can_print
())
{
...
...
trunk/src/core/srs_core_hls.hpp
查看文件 @
9080c2e
...
...
@@ -217,13 +217,30 @@ public:
SrsHls
(
SrsSource
*
_source
);
virtual
~
SrsHls
();
public
:
/**
* publish stream event, continue to write the m3u8,
* for the muxer object not destroyed.
*/
virtual
int
on_publish
(
SrsRequest
*
req
);
/**
* the unpublish event, only close the muxer, donot destroy the
* muxer, for when we continue to publish, the m3u8 will continue.
*/
virtual
void
on_unpublish
();
/**
* get some information from metadata, it's optinal.
*/
virtual
int
on_meta_data
(
SrsAmf0Object
*
metadata
);
/**
* mux the audio packets to ts.
*/
virtual
int
on_audio
(
SrsSharedPtrMessage
*
audio
);
/**
* mux the video packets to ts.
*/
virtual
int
on_video
(
SrsSharedPtrMessage
*
video
);
private
:
virtual
void
_mpegts
();
virtual
void
hls_mux
();
};
#endif
...
...
trunk/src/core/srs_core_source.cpp
查看文件 @
9080c2e
...
...
@@ -546,7 +546,6 @@ int SrsSource::on_reload_hls(string vhost)
return
ret
;
}
// TODO: HLS should continue previous sequence and stream.
#ifdef SRS_HLS
hls
->
on_unpublish
();
if
((
ret
=
hls
->
on_publish
(
req
))
!=
ERROR_SUCCESS
)
{
...
...
请
注册
或
登录
后发表评论