Http-FLV: http-flv直播采用绝对时间戳并支持las

This commit is contained in:
ziyue
2021-12-28 17:22:16 +08:00
parent 30b63ad656
commit dce6b27f4f
3 changed files with 16 additions and 14 deletions

View File

@@ -332,7 +332,8 @@ bool HttpSession::checkLiveStreamTS(const function<void()> &cb){
//http-flv 链接格式:http://vhost-url:port/app/streamid.flv?key1=value1&key2=value2
bool HttpSession::checkLiveStreamFlv(const function<void()> &cb){
return checkLiveStream(RTMP_SCHEMA, ".flv", [this, cb](const MediaSource::Ptr &src) {
auto start_pts = atoll(_parser.getUrlArgs()["starPts"].data());
return checkLiveStream(RTMP_SCHEMA, ".flv", [this, cb, start_pts](const MediaSource::Ptr &src) {
auto rtmp_src = dynamic_pointer_cast<RtmpMediaSource>(src);
assert(rtmp_src);
if (!cb) {
@@ -359,7 +360,7 @@ bool HttpSession::checkLiveStreamFlv(const function<void()> &cb){
}
}
start(getPoller(), rtmp_src);
start(getPoller(), rtmp_src, start_pts);
});
}