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

Side by Side Diff: webrtc/modules/video_coding/main/source/jitter_buffer.cc

Issue 1173253008: Unit Test For VCMReceiver::FrameForDecoding Timing Test (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 6 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 #include "webrtc/modules/video_coding/main/source/jitter_buffer.h" 10 #include "webrtc/modules/video_coding/main/source/jitter_buffer.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 } 106 }
107 107
108 void FrameList::Reset(UnorderedFrameList* free_frames) { 108 void FrameList::Reset(UnorderedFrameList* free_frames) {
109 while (!empty()) { 109 while (!empty()) {
110 begin()->second->Reset(); 110 begin()->second->Reset();
111 free_frames->push_back(begin()->second); 111 free_frames->push_back(begin()->second);
112 erase(begin()); 112 erase(begin());
113 } 113 }
114 } 114 }
115 115
116 VCMJitterBuffer::VCMJitterBuffer(Clock* clock, EventFactory* event_factory) 116 VCMJitterBuffer::VCMJitterBuffer(Clock* clock,
117 rtc::scoped_ptr<EventWrapper> event)
117 : clock_(clock), 118 : clock_(clock),
118 running_(false), 119 running_(false),
119 crit_sect_(CriticalSectionWrapper::CreateCriticalSection()), 120 crit_sect_(CriticalSectionWrapper::CreateCriticalSection()),
120 frame_event_(event_factory->CreateEvent()), 121 frame_event_(event.Pass()),
121 max_number_of_frames_(kStartNumberOfFrames), 122 max_number_of_frames_(kStartNumberOfFrames),
122 free_frames_(), 123 free_frames_(),
123 decodable_frames_(), 124 decodable_frames_(),
124 incomplete_frames_(), 125 incomplete_frames_(),
125 last_decoded_state_(), 126 last_decoded_state_(),
126 first_packet_since_reset_(true), 127 first_packet_since_reset_(true),
127 stats_callback_(NULL), 128 stats_callback_(NULL),
128 incoming_frame_rate_(0), 129 incoming_frame_rate_(0),
129 incoming_frame_count_(0), 130 incoming_frame_count_(0),
130 time_last_incoming_frame_count_(0), 131 time_last_incoming_frame_count_(0),
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after
1214 } 1215 }
1215 // Evaluate if the RTT is higher than |high_rtt_nack_threshold_ms_|, and in 1216 // Evaluate if the RTT is higher than |high_rtt_nack_threshold_ms_|, and in
1216 // that case we don't wait for retransmissions. 1217 // that case we don't wait for retransmissions.
1217 if (high_rtt_nack_threshold_ms_ >= 0 && 1218 if (high_rtt_nack_threshold_ms_ >= 0 &&
1218 rtt_ms_ >= high_rtt_nack_threshold_ms_) { 1219 rtt_ms_ >= high_rtt_nack_threshold_ms_) {
1219 return false; 1220 return false;
1220 } 1221 }
1221 return true; 1222 return true;
1222 } 1223 }
1223 } // namespace webrtc 1224 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698