Add PeerConnection option to configure minimum audio jitter buffer delay.
Note that this value will override the minimum delay that is used for audio/video sync.
Bug: webrtc:10053
Change-Id: Ia129f6c9ee9da5d00a3d955afaaa6e8f0c2bee33
Reviewed-on: https://webrtc-review.googlesource.com/c/112121
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25805}
diff --git a/pc/peerconnection.cc b/pc/peerconnection.cc
index 9549c42..a6b47c1 100644
--- a/pc/peerconnection.cc
+++ b/pc/peerconnection.cc
@@ -714,6 +714,7 @@
CandidateNetworkPolicy candidate_network_policy;
int audio_jitter_buffer_max_packets;
bool audio_jitter_buffer_fast_accelerate;
+ int audio_jitter_buffer_min_delay_ms;
int ice_connection_receiving_timeout;
int ice_backup_candidate_pair_ping_interval;
ContinualGatheringPolicy continual_gathering_policy;
@@ -750,6 +751,8 @@
audio_jitter_buffer_max_packets == o.audio_jitter_buffer_max_packets &&
audio_jitter_buffer_fast_accelerate ==
o.audio_jitter_buffer_fast_accelerate &&
+ audio_jitter_buffer_min_delay_ms ==
+ o.audio_jitter_buffer_min_delay_ms &&
ice_connection_receiving_timeout ==
o.ice_connection_receiving_timeout &&
ice_backup_candidate_pair_ping_interval ==
@@ -1072,6 +1075,9 @@
audio_options_.audio_jitter_buffer_fast_accelerate =
configuration.audio_jitter_buffer_fast_accelerate;
+ audio_options_.audio_jitter_buffer_min_delay_ms =
+ configuration.audio_jitter_buffer_min_delay_ms;
+
// Whether the certificate generator/certificate is null or not determines
// what PeerConnectionDescriptionFactory will do, so make sure that we give it
// the right instructions by clearing the variables if needed.