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

Side by Side Diff: webrtc/modules/video_coding/main/source/receiver.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 10
(...skipping 10 matching lines...) Expand all
21 #include "webrtc/system_wrappers/interface/logging.h" 21 #include "webrtc/system_wrappers/interface/logging.h"
22 #include "webrtc/system_wrappers/interface/trace_event.h" 22 #include "webrtc/system_wrappers/interface/trace_event.h"
23 23
24 namespace webrtc { 24 namespace webrtc {
25 25
26 enum { kMaxReceiverDelayMs = 10000 }; 26 enum { kMaxReceiverDelayMs = 10000 };
27 27
28 VCMReceiver::VCMReceiver(VCMTiming* timing, 28 VCMReceiver::VCMReceiver(VCMTiming* timing,
29 Clock* clock, 29 Clock* clock,
30 EventFactory* event_factory) 30 EventFactory* event_factory)
31 : VCMReceiver(timing,
32 clock,
33 rtc::scoped_ptr<EventWrapper>(event_factory->CreateEvent()),
34 rtc::scoped_ptr<EventWrapper>(event_factory->CreateEvent())) {
35 }
36
37 VCMReceiver::VCMReceiver(VCMTiming* timing,
38 Clock* clock,
39 rtc::scoped_ptr<EventWrapper> receiver_event,
40 rtc::scoped_ptr<EventWrapper> jitter_buffer_event)
31 : crit_sect_(CriticalSectionWrapper::CreateCriticalSection()), 41 : crit_sect_(CriticalSectionWrapper::CreateCriticalSection()),
32 clock_(clock), 42 clock_(clock),
33 jitter_buffer_(clock_, event_factory), 43 jitter_buffer_(clock_, jitter_buffer_event.Pass()),
34 timing_(timing), 44 timing_(timing),
35 render_wait_event_(event_factory->CreateEvent()), 45 render_wait_event_(receiver_event.Pass()),
36 max_video_delay_ms_(kMaxVideoDelayMs) { 46 max_video_delay_ms_(kMaxVideoDelayMs) {
37 Reset(); 47 Reset();
38 } 48 }
39 49
40 VCMReceiver::~VCMReceiver() { 50 VCMReceiver::~VCMReceiver() {
41 render_wait_event_->Set(); 51 render_wait_event_->Set();
42 delete crit_sect_; 52 delete crit_sect_;
43 } 53 }
44 54
45 void VCMReceiver::Reset() { 55 void VCMReceiver::Reset() {
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 uint32_t render_end = timing_->RenderTimeMs(timestamp_end, now_ms); 259 uint32_t render_end = timing_->RenderTimeMs(timestamp_end, now_ms);
250 return render_end - render_start; 260 return render_end - render_start;
251 } 261 }
252 262
253 void VCMReceiver::RegisterStatsCallback( 263 void VCMReceiver::RegisterStatsCallback(
254 VCMReceiveStatisticsCallback* callback) { 264 VCMReceiveStatisticsCallback* callback) {
255 jitter_buffer_.RegisterStatsCallback(callback); 265 jitter_buffer_.RegisterStatsCallback(callback);
256 } 266 }
257 267
258 } // namespace webrtc 268 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/main/source/receiver.h ('k') | webrtc/modules/video_coding/main/source/receiver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698