| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 | 68 |
| 69 void TestMinTransmitBitrate(bool pad_to_min_bitrate); | 69 void TestMinTransmitBitrate(bool pad_to_min_bitrate); |
| 70 | 70 |
| 71 void TestCaptureNtpTime(const FakeNetworkPipe::Config& net_config, | 71 void TestCaptureNtpTime(const FakeNetworkPipe::Config& net_config, |
| 72 int threshold_ms, | 72 int threshold_ms, |
| 73 int start_time_ms, | 73 int start_time_ms, |
| 74 int run_time_ms); | 74 int run_time_ms); |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 class VideoRtcpAndSyncObserver : public test::RtpRtcpObserver, | 77 class VideoRtcpAndSyncObserver : public test::RtpRtcpObserver, |
| 78 public VideoRenderer { | 78 public rtc::VideoSinkInterface<VideoFrame> { |
| 79 static const int kInSyncThresholdMs = 50; | 79 static const int kInSyncThresholdMs = 50; |
| 80 static const int kStartupTimeMs = 2000; | 80 static const int kStartupTimeMs = 2000; |
| 81 static const int kMinRunTimeMs = 30000; | 81 static const int kMinRunTimeMs = 30000; |
| 82 | 82 |
| 83 public: | 83 public: |
| 84 explicit VideoRtcpAndSyncObserver(Clock* clock) | 84 explicit VideoRtcpAndSyncObserver(Clock* clock) |
| 85 : test::RtpRtcpObserver(CallPerfTest::kLongTimeoutMs), | 85 : test::RtpRtcpObserver(CallPerfTest::kLongTimeoutMs), |
| 86 clock_(clock), | 86 clock_(clock), |
| 87 creation_time_ms_(clock_->TimeInMilliseconds()), | 87 creation_time_ms_(clock_->TimeInMilliseconds()), |
| 88 first_time_in_sync_(-1), | 88 first_time_in_sync_(-1), |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 DriftingClock::kNoDrift, | 339 DriftingClock::kNoDrift, |
| 340 DriftingClock::PercentsFaster(30.0f), | 340 DriftingClock::PercentsFaster(30.0f), |
| 341 DriftingClock::PercentsSlower(30.0f)); | 341 DriftingClock::PercentsSlower(30.0f)); |
| 342 } | 342 } |
| 343 | 343 |
| 344 void CallPerfTest::TestCaptureNtpTime(const FakeNetworkPipe::Config& net_config, | 344 void CallPerfTest::TestCaptureNtpTime(const FakeNetworkPipe::Config& net_config, |
| 345 int threshold_ms, | 345 int threshold_ms, |
| 346 int start_time_ms, | 346 int start_time_ms, |
| 347 int run_time_ms) { | 347 int run_time_ms) { |
| 348 class CaptureNtpTimeObserver : public test::EndToEndTest, | 348 class CaptureNtpTimeObserver : public test::EndToEndTest, |
| 349 public VideoRenderer { | 349 public rtc::VideoSinkInterface<VideoFrame> { |
| 350 public: | 350 public: |
| 351 CaptureNtpTimeObserver(const FakeNetworkPipe::Config& net_config, | 351 CaptureNtpTimeObserver(const FakeNetworkPipe::Config& net_config, |
| 352 int threshold_ms, | 352 int threshold_ms, |
| 353 int start_time_ms, | 353 int start_time_ms, |
| 354 int run_time_ms) | 354 int run_time_ms) |
| 355 : EndToEndTest(kLongTimeoutMs), | 355 : EndToEndTest(kLongTimeoutMs), |
| 356 net_config_(net_config), | 356 net_config_(net_config), |
| 357 clock_(Clock::GetRealTimeClock()), | 357 clock_(Clock::GetRealTimeClock()), |
| 358 threshold_ms_(threshold_ms), | 358 threshold_ms_(threshold_ms), |
| 359 start_time_ms_(start_time_ms), | 359 start_time_ms_(start_time_ms), |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 int encoder_inits_; | 711 int encoder_inits_; |
| 712 uint32_t last_set_bitrate_; | 712 uint32_t last_set_bitrate_; |
| 713 VideoSendStream* send_stream_; | 713 VideoSendStream* send_stream_; |
| 714 VideoEncoderConfig encoder_config_; | 714 VideoEncoderConfig encoder_config_; |
| 715 } test; | 715 } test; |
| 716 | 716 |
| 717 RunBaseTest(&test); | 717 RunBaseTest(&test); |
| 718 } | 718 } |
| 719 | 719 |
| 720 } // namespace webrtc | 720 } // namespace webrtc |
| OLD | NEW |