mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
重写GOP缓存机制
This commit is contained in:
parent
0a4b59031f
commit
444137e5b7
@ -1 +1 @@
|
|||||||
Subproject commit a6b41db987aa2633762fd06e809e0fdb7d60fef0
|
Subproject commit 3b5165043d4b40061b7dfcd9800691ab45e167c7
|
@ -142,7 +142,11 @@ public:
|
|||||||
}
|
}
|
||||||
strongSelf->onReaderChanged(size);
|
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);
|
onReaderChanged(0);
|
||||||
|
|
||||||
if(_metadata){
|
if(_metadata){
|
||||||
|
@ -179,7 +179,10 @@ public:
|
|||||||
}
|
}
|
||||||
strongSelf->onReaderChanged(size);
|
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);
|
onReaderChanged(0);
|
||||||
if (!_sdp.empty()) {
|
if (!_sdp.empty()) {
|
||||||
regist();
|
regist();
|
||||||
|
Loading…
Reference in New Issue
Block a user