From 387000114d4436fe2128715582e8a2f755cc004b Mon Sep 17 00:00:00 2001 From: Tommi Date: Fri, 17 Jun 2016 17:07:17 +0200 Subject: [PATCH] Remove some dead code from VCMJitterBuffer. BUG=none R=pbos@webrtc.org Review URL: https://codereview.webrtc.org/2073073003 . Cr-Commit-Position: refs/heads/master@{#13193} --- webrtc/modules/video_coding/jitter_buffer.cc | 25 -------------------- webrtc/modules/video_coding/jitter_buffer.h | 11 --------- 2 files changed, 36 deletions(-) diff --git a/webrtc/modules/video_coding/jitter_buffer.cc b/webrtc/modules/video_coding/jitter_buffer.cc index a5a964a01f..ff37e21200 100644 --- a/webrtc/modules/video_coding/jitter_buffer.cc +++ b/webrtc/modules/video_coding/jitter_buffer.cc @@ -475,26 +475,6 @@ void VCMJitterBuffer::IncomingRateStatistics(unsigned int* framerate, } } -// Answers the question: -// Will the packet sequence be complete if the next frame is grabbed for -// decoding right now? That is, have we lost a frame between the last decoded -// frame and the next, or is the next -// frame missing one or more packets? -bool VCMJitterBuffer::CompleteSequenceWithNextFrame() { - CriticalSectionScoped cs(crit_sect_); - // Finding oldest frame ready for decoder, check sequence number and size - CleanUpOldOrEmptyFrames(); - if (!decodable_frames_.empty()) { - if (decodable_frames_.Front()->GetState() == kStateComplete) { - return true; - } - } else if (incomplete_frames_.size() <= 1) { - // Frame not ready to be decoded. - return true; - } - return false; -} - // Returns immediately or a |max_wait_time_ms| ms event hang waiting for a // complete frame, |max_wait_time_ms| decided by caller. VCMEncodedFrame* VCMJitterBuffer::NextCompleteFrame(uint32_t max_wait_time_ms) { @@ -1191,11 +1171,6 @@ void VCMJitterBuffer::DropPacketsFromNackList( missing_sequence_numbers_.upper_bound(last_decoded_sequence_number)); } -int64_t VCMJitterBuffer::LastDecodedTimestamp() const { - CriticalSectionScoped cs(crit_sect_); - return last_decoded_state_.time_stamp(); -} - void VCMJitterBuffer::RegisterStatsCallback( VCMReceiveStatisticsCallback* callback) { CriticalSectionScoped cs(crit_sect_); diff --git a/webrtc/modules/video_coding/jitter_buffer.h b/webrtc/modules/video_coding/jitter_buffer.h index a3e9ace91e..66f0ffe4c1 100644 --- a/webrtc/modules/video_coding/jitter_buffer.h +++ b/webrtc/modules/video_coding/jitter_buffer.h @@ -129,10 +129,6 @@ class VCMJitterBuffer { // was started. FrameCounts FrameStatistics() const; - // The number of packets discarded by the jitter buffer because the decoder - // won't be able to decode them. - int num_not_decodable_packets() const; - // Gets number of packets received. int num_packets() const; @@ -145,12 +141,6 @@ class VCMJitterBuffer { // Statistics, Calculate frame and bit rates. void IncomingRateStatistics(unsigned int* framerate, unsigned int* bitrate); - // Checks if the packet sequence will be complete if the next frame would be - // grabbed for decoding. That is, if a frame has been lost between the - // last decoded frame and the next, or if the next frame is missing one - // or more packets. - bool CompleteSequenceWithNextFrame(); - // Wait |max_wait_time_ms| for a complete frame to arrive. // If found, a pointer to the frame is returned. Returns nullptr otherwise. VCMEncodedFrame* NextCompleteFrame(uint32_t max_wait_time_ms); @@ -208,7 +198,6 @@ class VCMJitterBuffer { // Set decode error mode - Should not be changed in the middle of the // session. Changes will not influence frames already in the buffer. void SetDecodeErrorMode(VCMDecodeErrorMode error_mode); - int64_t LastDecodedTimestamp() const; VCMDecodeErrorMode decode_error_mode() const { return decode_error_mode_; } void RegisterStatsCallback(VCMReceiveStatisticsCallback* callback);