mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-29 06:12:22 +08:00
rtp send rtp g711 audio can config duration (#3325)
optimization for this [issue](https://github.com/ZLMediaKit/ZLMediaKit/issues/3316)
This commit is contained in:
@@ -338,6 +338,7 @@ 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";
|
||||
const string kRtpG711DurMs = RTP_PROXY_FIELD "rtp_g711_dur_ms";
|
||||
|
||||
static onceToken token([]() {
|
||||
mINI::Instance()[kDumpDir] = "";
|
||||
@@ -348,6 +349,7 @@ static onceToken token([]() {
|
||||
mINI::Instance()[kPSPT] = 96;
|
||||
mINI::Instance()[kOpusPT] = 100;
|
||||
mINI::Instance()[kGopCache] = 1;
|
||||
mINI::Instance()[kRtpG711DurMs] = 100;
|
||||
});
|
||||
} // namespace RtpProxy
|
||||
|
||||
|
||||
@@ -382,6 +382,9 @@ extern const std::string kPSPT;
|
||||
extern const std::string kOpusPT;
|
||||
// RtpSender相关功能是否提前开启gop缓存优化级联秒开体验,默认开启
|
||||
extern const std::string kGopCache;
|
||||
//国标发送g711 rtp 打包时,每个包的语音时长是多少,默认是100 ms,范围为20~180ms (gb28181-2016,c.2.4规定),
|
||||
//最好为20 的倍数,程序自动向20的倍数取整
|
||||
extern const std::string kRtpG711DurMs;
|
||||
} // namespace RtpProxy
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user