Commit 444137e5 by xiongziliang

重写GOP缓存机制

parent 0a4b5903
ZLToolKit @ 3b516504
Subproject commit a6b41db987aa2633762fd06e809e0fdb7d60fef0
Subproject commit 3b5165043d4b40061b7dfcd9800691ab45e167c7
......@@ -142,7 +142,11 @@ public:
}
strongSelf->onReaderChanged(size);
};
_ring = std::make_shared<RingType>(_ring_size, std::move(lam));
//rtmp包缓存最大允许512个,如果是纯视频(25fps)大概为20秒数据
//但是这个是GOP缓存的上限值,真实的GOP缓存大小等于两个I帧之间的包数的两倍
//而且每次遇到I帧,则会清空GOP缓存,所以真实的GOP缓存远小于此值
_ring = std::make_shared<RingType>(_ring_size,512,std::move(lam));
onReaderChanged(0);
if(_metadata){
......
......@@ -179,7 +179,10 @@ public:
}
strongSelf->onReaderChanged(size);
};
_ring = std::make_shared<RingType>(_ring_size, std::move(lam));
//rtp包缓存最大允许2048个,大概最多3MB数据
//但是这个是GOP缓存的上限值,真实的GOP缓存大小等于两个I帧之间的包数的两倍
//而且每次遇到I帧,则会清空GOP缓存,所以真实的GOP缓存远小于此值
_ring = std::make_shared<RingType>(_ring_size,2048, std::move(lam));
onReaderChanged(0);
if (!_sdp.empty()) {
regist();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论