Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Unified Diff: webrtc/modules/video_coding/timing.h

Issue 2007743003: Add sender controlled playout delay limits (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@cleanup_rtp_hdr_extensions
Patch Set: Addressed comments Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/video_coding/timing.h
diff --git a/webrtc/modules/video_coding/timing.h b/webrtc/modules/video_coding/timing.h
index e593c9acbc35a7a1c3973d36a0274c161e880a84..409e0d817c62d63640e5a736f42e68f66f21abb6 100644
--- a/webrtc/modules/video_coding/timing.h
+++ b/webrtc/modules/video_coding/timing.h
@@ -41,8 +41,17 @@ class VCMTiming {
// get the desired jitter buffer level.
void SetJitterDelay(uint32_t required_delay_ms);
- // Set the minimum playout delay required to sync video with audio.
- void set_min_playout_delay(uint32_t min_playout_delay);
+ // Set the minimum playout delay from capture to render in ms.
+ void set_min_playout_delay(uint32_t min_playout_delay_ms);
+
+ // Returns the minimum playout delay from capture to render in ms.
+ uint32_t min_playout_delay();
+
+ // Set the maximum playout delay from capture to render in ms.
+ void set_max_playout_delay(uint32_t max_playout_delay_ms);
+
+ // Returns the maximum playout delay from capture to render in ms.
+ uint32_t max_playout_delay();
// Increases or decreases the current delay to get closer to the target delay.
// Calculates how long it has been since the previous call to this function,
@@ -111,7 +120,13 @@ class VCMTiming {
TimestampExtrapolator* ts_extrapolator_ GUARDED_BY(crit_sect_);
std::unique_ptr<VCMCodecTimer> codec_timer_ GUARDED_BY(crit_sect_);
uint32_t render_delay_ms_ GUARDED_BY(crit_sect_);
+ // Best-effort playout delay range for frames from capture to render.
+ // The receiver tries to keep the delay between |min_playout_delay_ms_|
+ // and |max_playout_delay_ms_| taking the network jitter into account.
+ // A special case is where min_playout_delay_ms_ = max_playout_delay_ms_ = 0,
+ // in which case the receiver tries to play the frames as they arrive.
uint32_t min_playout_delay_ms_ GUARDED_BY(crit_sect_);
+ uint32_t max_playout_delay_ms_ GUARDED_BY(crit_sect_);
uint32_t jitter_delay_ms_ GUARDED_BY(crit_sect_);
uint32_t current_delay_ms_ GUARDED_BY(crit_sect_);
int last_decode_ms_ GUARDED_BY(crit_sect_);

Powered by Google App Engine
This is Rietveld 408576698