2011-07-07 08:21:25 +00:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
|
|
|
|
*
|
|
|
|
|
* 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.
|
|
|
|
|
*/
|
|
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#ifndef MODULES_AUDIO_CODING_TEST_TESTREDFEC_H_
|
|
|
|
|
#define MODULES_AUDIO_CODING_TEST_TESTREDFEC_H_
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2016-02-14 20:40:57 -08:00
|
|
|
#include <memory>
|
2014-05-23 15:16:51 +00:00
|
|
|
#include <string>
|
2016-02-14 20:40:57 -08:00
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#include "modules/audio_coding/test/ACMTest.h"
|
|
|
|
|
#include "modules/audio_coding/test/Channel.h"
|
|
|
|
|
#include "modules/audio_coding/test/PCMFile.h"
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2011-12-16 10:09:04 +00:00
|
|
|
namespace webrtc {
|
|
|
|
|
|
2014-05-23 15:16:51 +00:00
|
|
|
class TestRedFec : public ACMTest {
|
2013-05-03 07:34:12 +00:00
|
|
|
public:
|
2014-05-23 15:16:51 +00:00
|
|
|
explicit TestRedFec();
|
|
|
|
|
~TestRedFec();
|
2013-05-03 07:34:12 +00:00
|
|
|
|
|
|
|
|
void Perform();
|
2018-06-19 15:03:05 +02:00
|
|
|
|
2013-05-03 07:34:12 +00:00
|
|
|
private:
|
|
|
|
|
// The default value of '-1' indicates that the registration is based only on
|
|
|
|
|
// codec name and a sampling frequency matching is not required. This is
|
|
|
|
|
// useful for codecs which support several sampling frequency.
|
2015-03-23 12:57:45 +00:00
|
|
|
int16_t RegisterSendCodec(char side,
|
|
|
|
|
const char* codecName,
|
2014-01-13 13:15:59 +00:00
|
|
|
int32_t sampFreqHz = -1);
|
2013-05-03 07:34:12 +00:00
|
|
|
void Run();
|
|
|
|
|
void OpenOutFile(int16_t testNumber);
|
|
|
|
|
int32_t SetVAD(bool enableDTX, bool enableVAD, ACMVADMode vadMode);
|
2016-02-14 20:40:57 -08:00
|
|
|
std::unique_ptr<AudioCodingModule> _acmA;
|
|
|
|
|
std::unique_ptr<AudioCodingModule> _acmB;
|
2013-05-03 07:34:12 +00:00
|
|
|
|
|
|
|
|
Channel* _channelA2B;
|
|
|
|
|
|
|
|
|
|
PCMFile _inFileA;
|
|
|
|
|
PCMFile _outFileB;
|
|
|
|
|
int16_t _testCntr;
|
2011-07-07 08:21:25 +00:00
|
|
|
};
|
|
|
|
|
|
2013-05-03 07:34:12 +00:00
|
|
|
} // namespace webrtc
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#endif // MODULES_AUDIO_CODING_TEST_TESTREDFEC_H_
|