OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 14 matching lines...) Expand all Loading... |
25 | 25 |
26 namespace webrtc { | 26 namespace webrtc { |
27 namespace test { | 27 namespace test { |
28 | 28 |
29 int64_t NetEqPerformanceTest::Run(int runtime_ms, | 29 int64_t NetEqPerformanceTest::Run(int runtime_ms, |
30 int lossrate, | 30 int lossrate, |
31 double drift_factor) { | 31 double drift_factor) { |
32 const std::string kInputFileName = | 32 const std::string kInputFileName = |
33 webrtc::test::ResourcePath("audio_coding/testfile32kHz", "pcm"); | 33 webrtc::test::ResourcePath("audio_coding/testfile32kHz", "pcm"); |
34 const int kSampRateHz = 32000; | 34 const int kSampRateHz = 32000; |
35 const webrtc::NetEqDecoder kDecoderType = webrtc::kDecoderPCM16Bswb32kHz; | 35 const webrtc::NetEqDecoder kDecoderType = |
| 36 webrtc::NetEqDecoder::kDecoderPCM16Bswb32kHz; |
36 const int kPayloadType = 95; | 37 const int kPayloadType = 95; |
37 | 38 |
38 // Initialize NetEq instance. | 39 // Initialize NetEq instance. |
39 NetEq::Config config; | 40 NetEq::Config config; |
40 config.sample_rate_hz = kSampRateHz; | 41 config.sample_rate_hz = kSampRateHz; |
41 NetEq* neteq = NetEq::Create(config); | 42 NetEq* neteq = NetEq::Create(config); |
42 // Register decoder in |neteq|. | 43 // Register decoder in |neteq|. |
43 if (neteq->RegisterPayloadType(kDecoderType, kPayloadType) != 0) | 44 if (neteq->RegisterPayloadType(kDecoderType, kPayloadType) != 0) |
44 return -1; | 45 return -1; |
45 | 46 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 drift_flipped = true; | 123 drift_flipped = true; |
123 } | 124 } |
124 } | 125 } |
125 int64_t end_time_ms = clock->TimeInMilliseconds(); | 126 int64_t end_time_ms = clock->TimeInMilliseconds(); |
126 delete neteq; | 127 delete neteq; |
127 return end_time_ms - start_time_ms; | 128 return end_time_ms - start_time_ms; |
128 } | 129 } |
129 | 130 |
130 } // namespace test | 131 } // namespace test |
131 } // namespace webrtc | 132 } // namespace webrtc |
OLD | NEW |