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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 mono_decoder = NetEqDecoder::kDecoderPCM16Bswb48kHz; | 120 mono_decoder = NetEqDecoder::kDecoderPCM16Bswb48kHz; |
121 if (num_channels_ == 2) { | 121 if (num_channels_ == 2) { |
122 multi_decoder = NetEqDecoder::kDecoderPCM16Bswb48kHz_2ch; | 122 multi_decoder = NetEqDecoder::kDecoderPCM16Bswb48kHz_2ch; |
123 } else { | 123 } else { |
124 FAIL() << "More than 2 channels is not supported for 48000 Hz."; | 124 FAIL() << "More than 2 channels is not supported for 48000 Hz."; |
125 } | 125 } |
126 break; | 126 break; |
127 default: | 127 default: |
128 FAIL() << "We shouldn't get here."; | 128 FAIL() << "We shouldn't get here."; |
129 } | 129 } |
| 130 ASSERT_EQ(NetEq::kOK, neteq_mono_->RegisterPayloadType(mono_decoder, "mono", |
| 131 kPayloadTypeMono)); |
130 ASSERT_EQ(NetEq::kOK, | 132 ASSERT_EQ(NetEq::kOK, |
131 neteq_mono_->RegisterPayloadType(mono_decoder, | 133 neteq_->RegisterPayloadType(multi_decoder, "multi-channel", |
132 kPayloadTypeMono)); | |
133 ASSERT_EQ(NetEq::kOK, | |
134 neteq_->RegisterPayloadType(multi_decoder, | |
135 kPayloadTypeMulti)); | 134 kPayloadTypeMulti)); |
136 } | 135 } |
137 | 136 |
138 virtual void TearDown() {} | 137 virtual void TearDown() {} |
139 | 138 |
140 int GetNewPackets() { | 139 int GetNewPackets() { |
141 if (!input_file_->Read(frame_size_samples_, input_)) { | 140 if (!input_file_->Read(frame_size_samples_, input_)) { |
142 return -1; | 141 return -1; |
143 } | 142 } |
144 payload_size_bytes_ = WebRtcPcm16b_Encode(input_, frame_size_samples_, | 143 payload_size_bytes_ = WebRtcPcm16b_Encode(input_, frame_size_samples_, |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 | 414 |
416 INSTANTIATE_TEST_CASE_P(MultiChannel, | 415 INSTANTIATE_TEST_CASE_P(MultiChannel, |
417 NetEqStereoTestDelays, | 416 NetEqStereoTestDelays, |
418 ::testing::ValuesIn(GetTestParameters())); | 417 ::testing::ValuesIn(GetTestParameters())); |
419 | 418 |
420 INSTANTIATE_TEST_CASE_P(MultiChannel, | 419 INSTANTIATE_TEST_CASE_P(MultiChannel, |
421 NetEqStereoTestLosses, | 420 NetEqStereoTestLosses, |
422 ::testing::ValuesIn(GetTestParameters())); | 421 ::testing::ValuesIn(GetTestParameters())); |
423 | 422 |
424 } // namespace webrtc | 423 } // namespace webrtc |
OLD | NEW |