Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1266)

Side by Side Diff: webrtc/modules/audio_coding/test/TestVADDTX.cc

Issue 1527453005: AudioCodingModuleImpl: Stop failing artificially for non-Opus encoders (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@rac1
Patch Set: rebase Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 EXPECT_TRUE(vad_enabled_); // WebRTC DTX cannot run without WebRTC VAD. 227 EXPECT_TRUE(vad_enabled_); // WebRTC DTX cannot run without WebRTC VAD.
228 } else { 228 } else {
229 // Using no DTX should not affect setting of VAD. 229 // Using no DTX should not affect setting of VAD.
230 EXPECT_EQ(enable_vad, vad_enabled_); 230 EXPECT_EQ(enable_vad, vad_enabled_);
231 } 231 }
232 } 232 }
233 233
234 // Following is the implementation of TestOpusDtx. 234 // Following is the implementation of TestOpusDtx.
235 void TestOpusDtx::Perform() { 235 void TestOpusDtx::Perform() {
236 #ifdef WEBRTC_CODEC_ISAC 236 #ifdef WEBRTC_CODEC_ISAC
237 // If we set other codec than Opus, DTX cannot be toggled. 237 // If we set other codec than Opus, DTX cannot be switched on.
238 RegisterCodec(kIsacWb); 238 RegisterCodec(kIsacWb);
239 EXPECT_EQ(-1, acm_send_->EnableOpusDtx()); 239 EXPECT_EQ(-1, acm_send_->EnableOpusDtx());
240 EXPECT_EQ(-1, acm_send_->DisableOpusDtx()); 240 EXPECT_EQ(0, acm_send_->DisableOpusDtx());
241 #endif 241 #endif
242 242
243 #ifdef WEBRTC_CODEC_OPUS 243 #ifdef WEBRTC_CODEC_OPUS
244 int expects[] = {0, 1, 0, 0, 0}; 244 int expects[] = {0, 1, 0, 0, 0};
245 245
246 // Register Opus as send codec 246 // Register Opus as send codec
247 std::string out_filename = webrtc::test::OutputPath() + 247 std::string out_filename = webrtc::test::OutputPath() +
248 "testOpusDtx_outFile_mono.pcm"; 248 "testOpusDtx_outFile_mono.pcm";
249 RegisterCodec(kOpus); 249 RegisterCodec(kOpus);
250 EXPECT_EQ(0, acm_send_->DisableOpusDtx()); 250 EXPECT_EQ(0, acm_send_->DisableOpusDtx());
(...skipping 16 matching lines...) Expand all
267 267
268 EXPECT_EQ(0, acm_send_->EnableOpusDtx()); 268 EXPECT_EQ(0, acm_send_->EnableOpusDtx());
269 269
270 expects[kEmptyFrame] = 1; 270 expects[kEmptyFrame] = 1;
271 Run(webrtc::test::ResourcePath("audio_coding/teststereo32kHz", "pcm"), 271 Run(webrtc::test::ResourcePath("audio_coding/teststereo32kHz", "pcm"),
272 32000, 2, out_filename, true, expects); 272 32000, 2, out_filename, true, expects);
273 #endif 273 #endif
274 } 274 }
275 275
276 } // namespace webrtc 276 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/acm2/codec_manager.cc ('k') | webrtc/voice_engine/test/auto_test/standard/codec_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698