From 603175a395f8b00bd20c5fd46c044d23a18f64cf Mon Sep 17 00:00:00 2001 From: Wan-Teh Chang Date: Thu, 28 May 2015 14:10:14 -0700 Subject: [PATCH] Improve comments. Use the current parameter names in the comment for SetNackMode(). Add a warning comment about the lifetime of the return value of GetNackList(). R=stefan@webrtc.org BUG=none TEST=none Review URL: https://webrtc-codereview.appspot.com/52599004 Cr-Commit-Position: refs/heads/master@{#9321} --- .../video_coding/main/source/jitter_buffer.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/webrtc/modules/video_coding/main/source/jitter_buffer.h b/webrtc/modules/video_coding/main/source/jitter_buffer.h index 1be2606ab6..c1f9aab08d 100644 --- a/webrtc/modules/video_coding/main/source/jitter_buffer.h +++ b/webrtc/modules/video_coding/main/source/jitter_buffer.h @@ -155,12 +155,12 @@ class VCMJitterBuffer { // Updates the round-trip time estimate. void UpdateRtt(int64_t rtt_ms); - // Set the NACK mode. |highRttNackThreshold| is an RTT threshold in ms above - // which NACK will be disabled if the NACK mode is |kNackHybrid|, -1 meaning - // that NACK is always enabled in the hybrid mode. - // |lowRttNackThreshold| is an RTT threshold in ms below which we expect to - // rely on NACK only, and therefore are using larger buffers to have time to - // wait for retransmissions. + // Set the NACK mode. |high_rtt_nack_threshold_ms| is an RTT threshold in ms + // above which NACK will be disabled if the NACK mode is |kNackHybrid|, -1 + // meaning that NACK is always enabled in the hybrid mode. + // |low_rtt_nack_threshold_ms| is an RTT threshold in ms below which we expect + // to rely on NACK only, and therefore are using larger buffers to have time + // to wait for retransmissions. void SetNackMode(VCMNackMode mode, int64_t low_rtt_nack_threshold_ms, int64_t high_rtt_nack_threshold_ms); @@ -172,6 +172,8 @@ class VCMJitterBuffer { VCMNackMode nack_mode() const; // Returns a list of the sequence numbers currently missing. + // WARNING: GetNackList() returns a pointer to an internal buffer that is only + // valid until the next GetNackList() call. uint16_t* GetNackList(uint16_t* nack_list_size, bool* request_key_frame); // Set decode error mode - Should not be changed in the middle of the