java jitter buffer_android webrtc jitter buffer大小设置

1. PeerConnectionClient.java

设置在如下接口:

private void createPeerConnectionInternal(Context context,EglBase.Context renderEGLContext) {

rtcConfig.audioJitterBufferMaxPackets = 30; //设置jitter buffter大小为30

}

2. PeerConnection.java文件

public RTCConfiguration(List iceServers) {

iceTransportsType = IceTransportsType.ALL;

bundlePolicy = BundlePolicy.BALANCED;

rtcpMuxPolicy = RtcpMuxPolicy.REQUIRE;

tcpCandidatePolicy = TcpCandidatePolicy.ENABLED;

candidateNetworkPolicy = candidateNetworkPolicy.ALL;

this.iceServers = iceServers;

audioJitterBufferMaxPackets= 50;

audioJitterBufferFastAccelerate = false;

iceConnectionReceivingTimeout = -1;

iceBackupCandidatePairPingInterval = -1;

keyType = KeyType.ECDSA;

continualGatheringPolicy = ContinualGatheringPolicy.GATHER_ONCE;

iceCandidatePoolSize = 0;

pruneTurnPorts = false;

presumeWritableWhenFullyRelayed = false;

iceCheckMinInterval = null;

disableIPv6OnWifi = false;

}

};

参数为audioJitterBufferMaxPackets

2. webrtc源码限制最小只能为20

webrtcvoiceengine.cc

bool WebRtcVoiceEngine::ApplyOptions(const AudioOptions& options_in){

if (options.audio_jitter_buffer_max_packets) {

channel_config_.acm_config.neteq_config.max_packets_in_buffer =

std::max(20, *options.audio_jitter_buffer_max_packets);

}

}

以上就是webrtc jitter buffer大小设置

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值