Make AV sync robust to failures to set a desired minimum delay
Setting a minimum delay can fail in some cases. It is important that the
AV sync code is aware of failures and can act accordingly to recover and
prevent sync delays that keep increasing indefinitely.
Bug: webrtc:11805
Change-Id: I0deed951dc6c6d0905536a949af875e0a6d9f7fa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183360
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32062}
diff --git a/video/stream_synchronization.h b/video/stream_synchronization.h
index 1aba62d..2da6a49 100644
--- a/video/stream_synchronization.h
+++ b/video/stream_synchronization.h
@@ -44,6 +44,12 @@
// |target_delay_ms|.
void SetTargetBufferingDelay(int target_delay_ms);
+ // Lowers the audio delay by 10%. Can be used to recover from errors.
+ void ReduceAudioDelay();
+
+ // Lowers the video delay by 10%. Can be used to recover from errors.
+ void ReduceVideoDelay();
+
uint32_t audio_stream_id() const { return audio_stream_id_; }
uint32_t video_stream_id() const { return video_stream_id_; }