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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 test::PrintResultList("stream_offset", "", "synchronization", | 124 test::PrintResultList("stream_offset", "", "synchronization", |
125 test::ValuesToString(sync_offset_ms_list_), "ms", | 125 test::ValuesToString(sync_offset_ms_list_), "ms", |
126 false); | 126 false); |
127 } | 127 } |
128 | 128 |
129 private: | 129 private: |
130 Clock* const clock_; | 130 Clock* const clock_; |
131 const int64_t creation_time_ms_; | 131 const int64_t creation_time_ms_; |
132 int64_t first_time_in_sync_; | 132 int64_t first_time_in_sync_; |
133 rtc::CriticalSection crit_; | 133 rtc::CriticalSection crit_; |
134 VideoReceiveStream* receive_stream_ GUARDED_BY(crit_); | 134 VideoReceiveStream* receive_stream_ RTC_GUARDED_BY(crit_); |
135 std::vector<int> sync_offset_ms_list_; | 135 std::vector<int> sync_offset_ms_list_; |
136 }; | 136 }; |
137 | 137 |
138 void CallPerfTest::TestAudioVideoSync(FecMode fec, | 138 void CallPerfTest::TestAudioVideoSync(FecMode fec, |
139 CreateOrder create_first, | 139 CreateOrder create_first, |
140 float video_ntp_speed, | 140 float video_ntp_speed, |
141 float video_rtp_speed, | 141 float video_rtp_speed, |
142 float audio_rtp_speed) { | 142 float audio_rtp_speed) { |
143 const char* kSyncGroup = "av_sync"; | 143 const char* kSyncGroup = "av_sync"; |
144 const uint32_t kAudioSendSsrc = 1234; | 144 const uint32_t kAudioSendSsrc = 1234; |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 const FakeNetworkPipe::Config net_config_; | 456 const FakeNetworkPipe::Config net_config_; |
457 Clock* const clock_; | 457 Clock* const clock_; |
458 int threshold_ms_; | 458 int threshold_ms_; |
459 int start_time_ms_; | 459 int start_time_ms_; |
460 int run_time_ms_; | 460 int run_time_ms_; |
461 int64_t creation_time_ms_; | 461 int64_t creation_time_ms_; |
462 test::FrameGeneratorCapturer* capturer_; | 462 test::FrameGeneratorCapturer* capturer_; |
463 bool rtp_start_timestamp_set_; | 463 bool rtp_start_timestamp_set_; |
464 uint32_t rtp_start_timestamp_; | 464 uint32_t rtp_start_timestamp_; |
465 typedef std::map<uint32_t, uint32_t> FrameCaptureTimeList; | 465 typedef std::map<uint32_t, uint32_t> FrameCaptureTimeList; |
466 FrameCaptureTimeList capture_time_list_ GUARDED_BY(&crit_); | 466 FrameCaptureTimeList capture_time_list_ RTC_GUARDED_BY(&crit_); |
467 std::vector<int> time_offset_ms_list_; | 467 std::vector<int> time_offset_ms_list_; |
468 } test(net_config, threshold_ms, start_time_ms, run_time_ms); | 468 } test(net_config, threshold_ms, start_time_ms, run_time_ms); |
469 | 469 |
470 RunBaseTest(&test); | 470 RunBaseTest(&test); |
471 } | 471 } |
472 | 472 |
473 TEST_F(CallPerfTest, CaptureNtpTimeWithNetworkDelay) { | 473 TEST_F(CallPerfTest, CaptureNtpTimeWithNetworkDelay) { |
474 FakeNetworkPipe::Config net_config; | 474 FakeNetworkPipe::Config net_config; |
475 net_config.queue_delay_ms = 100; | 475 net_config.queue_delay_ms = 100; |
476 // TODO(wu): lower the threshold as the calculation/estimatation becomes more | 476 // TODO(wu): lower the threshold as the calculation/estimatation becomes more |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
779 uint32_t last_set_bitrate_kbps_; | 779 uint32_t last_set_bitrate_kbps_; |
780 VideoSendStream* send_stream_; | 780 VideoSendStream* send_stream_; |
781 test::FrameGeneratorCapturer* frame_generator_; | 781 test::FrameGeneratorCapturer* frame_generator_; |
782 VideoEncoderConfig encoder_config_; | 782 VideoEncoderConfig encoder_config_; |
783 } test; | 783 } test; |
784 | 784 |
785 RunBaseTest(&test); | 785 RunBaseTest(&test); |
786 } | 786 } |
787 | 787 |
788 } // namespace webrtc | 788 } // namespace webrtc |
OLD | NEW |