2011-07-07 08:21:25 +00:00
|
|
|
/*
|
2012-04-12 11:02:38 +00:00
|
|
|
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
2011-07-07 08:21:25 +00:00
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <stdio.h>
|
2019-07-05 19:08:33 +02:00
|
|
|
|
2011-12-21 13:34:18 +00:00
|
|
|
#include <string>
|
2011-07-07 08:21:25 +00:00
|
|
|
#include <vector>
|
|
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#include "modules/audio_coding/include/audio_coding_module.h"
|
|
|
|
|
#include "modules/audio_coding/test/EncodeDecodeTest.h"
|
|
|
|
|
#include "modules/audio_coding/test/PacketLossTest.h"
|
|
|
|
|
#include "modules/audio_coding/test/TestAllCodecs.h"
|
|
|
|
|
#include "modules/audio_coding/test/TestRedFec.h"
|
|
|
|
|
#include "modules/audio_coding/test/TestStereo.h"
|
|
|
|
|
#include "modules/audio_coding/test/TestVADDTX.h"
|
|
|
|
|
#include "modules/audio_coding/test/opus_test.h"
|
|
|
|
|
#include "test/gtest.h"
|
2019-01-11 09:11:00 -08:00
|
|
|
#include "test/testsupport/file_utils.h"
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2013-08-27 07:33:51 +00:00
|
|
|
TEST(AudioCodingModuleTest, TestAllCodecs) {
|
2018-12-05 10:30:25 +01:00
|
|
|
webrtc::TestAllCodecs().Perform();
|
2013-08-27 07:33:51 +00:00
|
|
|
}
|
2012-06-18 13:35:52 +00:00
|
|
|
|
2016-01-04 22:44:05 +01:00
|
|
|
#if defined(WEBRTC_ANDROID)
|
|
|
|
|
TEST(AudioCodingModuleTest, DISABLED_TestEncodeDecode) {
|
|
|
|
|
#else
|
|
|
|
|
TEST(AudioCodingModuleTest, TestEncodeDecode) {
|
|
|
|
|
#endif
|
2018-12-05 10:30:25 +01:00
|
|
|
webrtc::EncodeDecodeTest().Perform();
|
2013-08-27 07:33:51 +00:00
|
|
|
}
|
2012-06-18 13:35:52 +00:00
|
|
|
|
2016-01-04 22:44:05 +01:00
|
|
|
TEST(AudioCodingModuleTest, TestRedFec) {
|
2014-05-23 15:16:51 +00:00
|
|
|
webrtc::TestRedFec().Perform();
|
2013-08-27 07:33:51 +00:00
|
|
|
}
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2017-03-01 01:16:51 -08:00
|
|
|
// Disabled on ios as flaky, see https://crbug.com/webrtc/7057
|
|
|
|
|
#if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS)
|
2016-01-04 22:44:05 +01:00
|
|
|
TEST(AudioCodingModuleTest, DISABLED_TestStereo) {
|
|
|
|
|
#else
|
|
|
|
|
TEST(AudioCodingModuleTest, TestStereo) {
|
|
|
|
|
#endif
|
2018-12-05 10:30:25 +01:00
|
|
|
webrtc::TestStereo().Perform();
|
2013-08-27 07:33:51 +00:00
|
|
|
}
|
2012-06-18 13:35:52 +00:00
|
|
|
|
2016-01-04 22:44:05 +01:00
|
|
|
TEST(AudioCodingModuleTest, TestWebRtcVadDtx) {
|
2015-03-03 12:02:30 +00:00
|
|
|
webrtc::TestWebRtcVadDtx().Perform();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TEST(AudioCodingModuleTest, TestOpusDtx) {
|
|
|
|
|
webrtc::TestOpusDtx().Perform();
|
2012-06-18 13:35:52 +00:00
|
|
|
}
|
|
|
|
|
|
2017-03-01 01:16:51 -08:00
|
|
|
// Disabled on ios as flaky, see https://crbug.com/webrtc/7057
|
|
|
|
|
#if defined(WEBRTC_IOS)
|
|
|
|
|
TEST(AudioCodingModuleTest, DISABLED_TestOpus) {
|
|
|
|
|
#else
|
2013-03-15 13:29:17 +00:00
|
|
|
TEST(AudioCodingModuleTest, TestOpus) {
|
2017-03-01 01:16:51 -08:00
|
|
|
#endif
|
2014-04-17 08:29:10 +00:00
|
|
|
webrtc::OpusTest().Perform();
|
2013-03-15 13:29:17 +00:00
|
|
|
}
|
|
|
|
|
|
2014-05-23 15:16:51 +00:00
|
|
|
TEST(AudioCodingModuleTest, TestPacketLoss) {
|
|
|
|
|
webrtc::PacketLossTest(1, 10, 10, 1).Perform();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TEST(AudioCodingModuleTest, TestPacketLossBurst) {
|
|
|
|
|
webrtc::PacketLossTest(1, 10, 10, 2).Perform();
|
|
|
|
|
}
|
|
|
|
|
|
2017-03-28 02:28:08 -07:00
|
|
|
// Disabled on ios as flake, see https://crbug.com/webrtc/7057
|
|
|
|
|
#if defined(WEBRTC_IOS)
|
|
|
|
|
TEST(AudioCodingModuleTest, DISABLED_TestPacketLossStereo) {
|
|
|
|
|
#else
|
2018-06-19 15:03:05 +02:00
|
|
|
TEST(AudioCodingModuleTest, TestPacketLossStereo) {
|
2017-03-28 02:28:08 -07:00
|
|
|
#endif
|
2014-05-23 15:16:51 +00:00
|
|
|
webrtc::PacketLossTest(2, 10, 10, 1).Perform();
|
|
|
|
|
}
|
|
|
|
|
|
2017-03-01 01:16:51 -08:00
|
|
|
// Disabled on ios as flake, see https://crbug.com/webrtc/7057
|
|
|
|
|
#if defined(WEBRTC_IOS)
|
|
|
|
|
TEST(AudioCodingModuleTest, DISABLED_TestPacketLossStereoBurst) {
|
|
|
|
|
#else
|
2014-05-23 15:16:51 +00:00
|
|
|
TEST(AudioCodingModuleTest, TestPacketLossStereoBurst) {
|
2017-03-01 01:16:51 -08:00
|
|
|
#endif
|
2014-05-23 15:16:51 +00:00
|
|
|
webrtc::PacketLossTest(2, 10, 10, 2).Perform();
|
|
|
|
|
}
|
2018-06-19 15:03:05 +02:00
|
|
|
|
|
|
|
|
// The full API test is too long to run automatically on bots, but can be used
|
|
|
|
|
// for offline testing. User interaction is needed.
|
|
|
|
|
#ifdef ACM_TEST_FULL_API
|
|
|
|
|
TEST(AudioCodingModuleTest, TestAPI) {
|
|
|
|
|
webrtc::APITest().Perform();
|
|
|
|
|
}
|
|
|
|
|
#endif
|