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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 int maxplaybackrate_; | 116 int maxplaybackrate_; |
117 int target_loss_rate_; | 117 int target_loss_rate_; |
118 int sub_packets_; | 118 int sub_packets_; |
119 int application_; | 119 int application_; |
120 }; | 120 }; |
121 | 121 |
122 NetEqOpusQualityTest::NetEqOpusQualityTest() | 122 NetEqOpusQualityTest::NetEqOpusQualityTest() |
123 : NetEqQualityTest(kOpusBlockDurationMs * FLAGS_sub_packets, | 123 : NetEqQualityTest(kOpusBlockDurationMs * FLAGS_sub_packets, |
124 kOpusSamplingKhz, | 124 kOpusSamplingKhz, |
125 kOpusSamplingKhz, | 125 kOpusSamplingKhz, |
126 kDecoderOpus), | 126 NetEqDecoder::kDecoderOpus), |
127 opus_encoder_(NULL), | 127 opus_encoder_(NULL), |
128 repacketizer_(NULL), | 128 repacketizer_(NULL), |
129 sub_block_size_samples_( | 129 sub_block_size_samples_( |
130 static_cast<size_t>(kOpusBlockDurationMs * kOpusSamplingKhz)), | 130 static_cast<size_t>(kOpusBlockDurationMs * kOpusSamplingKhz)), |
131 bit_rate_kbps_(FLAGS_bit_rate_kbps), | 131 bit_rate_kbps_(FLAGS_bit_rate_kbps), |
132 fec_(FLAGS_fec), | 132 fec_(FLAGS_fec), |
133 dtx_(FLAGS_dtx), | 133 dtx_(FLAGS_dtx), |
134 complexity_(FLAGS_complexity), | 134 complexity_(FLAGS_complexity), |
135 maxplaybackrate_(FLAGS_maxplaybackrate), | 135 maxplaybackrate_(FLAGS_maxplaybackrate), |
136 target_loss_rate_(FLAGS_reported_loss_rate), | 136 target_loss_rate_(FLAGS_reported_loss_rate), |
137 sub_packets_(FLAGS_sub_packets) { | 137 sub_packets_(FLAGS_sub_packets) { |
138 // Redefine decoder type if input is stereo. | 138 // Redefine decoder type if input is stereo. |
139 if (channels_ > 1) { | 139 if (channels_ > 1) { |
140 decoder_type_ = kDecoderOpus_2ch; | 140 decoder_type_ = NetEqDecoder::kDecoderOpus_2ch; |
141 } | 141 } |
142 application_ = FLAGS_application; | 142 application_ = FLAGS_application; |
143 } | 143 } |
144 | 144 |
145 void NetEqOpusQualityTest::SetUp() { | 145 void NetEqOpusQualityTest::SetUp() { |
146 // Create encoder memory. | 146 // Create encoder memory. |
147 WebRtcOpus_EncoderCreate(&opus_encoder_, channels_, application_); | 147 WebRtcOpus_EncoderCreate(&opus_encoder_, channels_, application_); |
148 ASSERT_TRUE(opus_encoder_); | 148 ASSERT_TRUE(opus_encoder_); |
149 | 149 |
150 // Create repacketizer. | 150 // Create repacketizer. |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 EXPECT_GE(value, 0); | 198 EXPECT_GE(value, 0); |
199 return value; | 199 return value; |
200 } | 200 } |
201 | 201 |
202 TEST_F(NetEqOpusQualityTest, Test) { | 202 TEST_F(NetEqOpusQualityTest, Test) { |
203 Simulate(); | 203 Simulate(); |
204 } | 204 } |
205 | 205 |
206 } // namespace test | 206 } // namespace test |
207 } // namespace webrtc | 207 } // namespace webrtc |
OLD | NEW |