| 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 |
| 11 #include <memory> |
| 12 |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 12 #include "webrtc/base/scoped_ptr.h" | |
| 13 #include "webrtc/common_types.h" | 14 #include "webrtc/common_types.h" |
| 14 #include "webrtc/modules/audio_coding/codecs/pcm16b/pcm16b.h" | 15 #include "webrtc/modules/audio_coding/codecs/pcm16b/pcm16b.h" |
| 15 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" | 16 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" |
| 16 #include "webrtc/modules/audio_coding/test/utility.h" | 17 #include "webrtc/modules/audio_coding/test/utility.h" |
| 17 #include "webrtc/modules/include/module_common_types.h" | 18 #include "webrtc/modules/include/module_common_types.h" |
| 18 #include "webrtc/system_wrappers/include/sleep.h" | 19 #include "webrtc/system_wrappers/include/sleep.h" |
| 19 #include "webrtc/test/testsupport/fileutils.h" | 20 #include "webrtc/test/testsupport/fileutils.h" |
| 20 | 21 |
| 21 namespace webrtc { | 22 namespace webrtc { |
| 22 | 23 |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 int GetCurrentOptimalDelayMs() { | 187 int GetCurrentOptimalDelayMs() { |
| 187 NetworkStatistics stats; | 188 NetworkStatistics stats; |
| 188 acm_->GetNetworkStatistics(&stats); | 189 acm_->GetNetworkStatistics(&stats); |
| 189 return stats.preferredBufferSize; | 190 return stats.preferredBufferSize; |
| 190 } | 191 } |
| 191 | 192 |
| 192 int RequiredDelay() { | 193 int RequiredDelay() { |
| 193 return acm_->LeastRequiredDelayMs(); | 194 return acm_->LeastRequiredDelayMs(); |
| 194 } | 195 } |
| 195 | 196 |
| 196 rtc::scoped_ptr<AudioCodingModule> acm_; | 197 std::unique_ptr<AudioCodingModule> acm_; |
| 197 WebRtcRTPHeader rtp_info_; | 198 WebRtcRTPHeader rtp_info_; |
| 198 uint8_t payload_[kPayloadLenBytes]; | 199 uint8_t payload_[kPayloadLenBytes]; |
| 199 }; | 200 }; |
| 200 | 201 |
| 201 #if defined(WEBRTC_ANDROID) | 202 #if defined(WEBRTC_ANDROID) |
| 202 #define MAYBE_OutOfRangeInput DISABLED_OutOfRangeInput | 203 #define MAYBE_OutOfRangeInput DISABLED_OutOfRangeInput |
| 203 #else | 204 #else |
| 204 #define MAYBE_OutOfRangeInput OutOfRangeInput | 205 #define MAYBE_OutOfRangeInput OutOfRangeInput |
| 205 #endif | 206 #endif |
| 206 TEST_F(TargetDelayTest, MAYBE_OutOfRangeInput) { | 207 TEST_F(TargetDelayTest, MAYBE_OutOfRangeInput) { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 #define MAYBE_TargetDelayBufferMinMax DISABLED_TargetDelayBufferMinMax | 241 #define MAYBE_TargetDelayBufferMinMax DISABLED_TargetDelayBufferMinMax |
| 241 #else | 242 #else |
| 242 #define MAYBE_TargetDelayBufferMinMax TargetDelayBufferMinMax | 243 #define MAYBE_TargetDelayBufferMinMax TargetDelayBufferMinMax |
| 243 #endif | 244 #endif |
| 244 TEST_F(TargetDelayTest, MAYBE_TargetDelayBufferMinMax) { | 245 TEST_F(TargetDelayTest, MAYBE_TargetDelayBufferMinMax) { |
| 245 TargetDelayBufferMinMax(); | 246 TargetDelayBufferMinMax(); |
| 246 } | 247 } |
| 247 | 248 |
| 248 } // namespace webrtc | 249 } // namespace webrtc |
| 249 | 250 |
| OLD | NEW |