mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-28 21:52:22 +08:00
rtp级联(ps/ts/es)新增支持gop缓存功能 (#2395)
该修改主要解决rtp级联(调用startSendRtp接口)未做gop缓存导致上级无法秒开的问题。 同时通过RingBuffer对象线程隔离的特性,实现了在断连续推场景下归属线程切换导致的线程安全问题。 用户如未使用rtp级联功能,请修改配置文件关闭GOP缓存(rtp_proxy.gop_cache=0)以便节省内存。 --------- Co-authored-by: 夏楚 <771730766@qq.com>
This commit is contained in:
@@ -318,6 +318,7 @@ const string kH264PT = RTP_PROXY_FIELD "h264_pt";
|
||||
const string kH265PT = RTP_PROXY_FIELD "h265_pt";
|
||||
const string kPSPT = RTP_PROXY_FIELD "ps_pt";
|
||||
const string kOpusPT = RTP_PROXY_FIELD "opus_pt";
|
||||
const string kGopCache = RTP_PROXY_FIELD "gop_cache";
|
||||
|
||||
static onceToken token([]() {
|
||||
mINI::Instance()[kDumpDir] = "";
|
||||
@@ -327,6 +328,7 @@ static onceToken token([]() {
|
||||
mINI::Instance()[kH265PT] = 99;
|
||||
mINI::Instance()[kPSPT] = 96;
|
||||
mINI::Instance()[kOpusPT] = 100;
|
||||
mINI::Instance()[kGopCache] = 1;
|
||||
});
|
||||
} // namespace RtpProxy
|
||||
|
||||
|
||||
Reference in New Issue
Block a user