niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 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 |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 11 | #ifndef MODULES_AUDIO_CODING_TEST_TESTREDFEC_H_ |
| 12 | #define MODULES_AUDIO_CODING_TEST_TESTREDFEC_H_ |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 13 | |
kwiberg | 3747838 | 2016-02-14 20:40:57 -0800 | [diff] [blame] | 14 | #include <memory> |
minyue@webrtc.org | aa5ea1c | 2014-05-23 15:16:51 +0000 | [diff] [blame] | 15 | #include <string> |
kwiberg | 3747838 | 2016-02-14 20:40:57 -0800 | [diff] [blame] | 16 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 17 | #include "modules/audio_coding/test/Channel.h" |
| 18 | #include "modules/audio_coding/test/PCMFile.h" |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 19 | |
tina.legrand@webrtc.org | 554ae1a | 2011-12-16 10:09:04 +0000 | [diff] [blame] | 20 | namespace webrtc { |
| 21 | |
Karl Wiberg | 3ff52ff | 2018-10-01 12:31:22 +0200 | [diff] [blame^] | 22 | class TestRedFec { |
tina.legrand@webrtc.org | d5726a1 | 2013-05-03 07:34:12 +0000 | [diff] [blame] | 23 | public: |
minyue@webrtc.org | aa5ea1c | 2014-05-23 15:16:51 +0000 | [diff] [blame] | 24 | explicit TestRedFec(); |
| 25 | ~TestRedFec(); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 26 | |
tina.legrand@webrtc.org | d5726a1 | 2013-05-03 07:34:12 +0000 | [diff] [blame] | 27 | void Perform(); |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 28 | |
tina.legrand@webrtc.org | d5726a1 | 2013-05-03 07:34:12 +0000 | [diff] [blame] | 29 | private: |
| 30 | // The default value of '-1' indicates that the registration is based only on |
| 31 | // codec name and a sampling frequency matching is not required. This is |
| 32 | // useful for codecs which support several sampling frequency. |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 33 | int16_t RegisterSendCodec(char side, |
| 34 | const char* codecName, |
andresp@webrtc.org | d0b436a | 2014-01-13 13:15:59 +0000 | [diff] [blame] | 35 | int32_t sampFreqHz = -1); |
tina.legrand@webrtc.org | d5726a1 | 2013-05-03 07:34:12 +0000 | [diff] [blame] | 36 | void Run(); |
| 37 | void OpenOutFile(int16_t testNumber); |
tina.legrand@webrtc.org | d5726a1 | 2013-05-03 07:34:12 +0000 | [diff] [blame] | 38 | int32_t SetVAD(bool enableDTX, bool enableVAD, ACMVADMode vadMode); |
kwiberg | 3747838 | 2016-02-14 20:40:57 -0800 | [diff] [blame] | 39 | std::unique_ptr<AudioCodingModule> _acmA; |
| 40 | std::unique_ptr<AudioCodingModule> _acmB; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 41 | |
tina.legrand@webrtc.org | d5726a1 | 2013-05-03 07:34:12 +0000 | [diff] [blame] | 42 | Channel* _channelA2B; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 43 | |
tina.legrand@webrtc.org | d5726a1 | 2013-05-03 07:34:12 +0000 | [diff] [blame] | 44 | PCMFile _inFileA; |
| 45 | PCMFile _outFileB; |
| 46 | int16_t _testCntr; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 47 | }; |
| 48 | |
tina.legrand@webrtc.org | d5726a1 | 2013-05-03 07:34:12 +0000 | [diff] [blame] | 49 | } // namespace webrtc |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 50 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 51 | #endif // MODULES_AUDIO_CODING_TEST_TESTREDFEC_H_ |