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
|
|
|
|
2018-10-04 12:38:03 +02:00
|
|
|
#include "api/audio_codecs/audio_decoder_factory.h"
|
|
|
|
|
#include "api/audio_codecs/audio_encoder_factory.h"
|
|
|
|
|
#include "common_audio/vad/include/vad.h"
|
2017-09-15 06:47:31 +02:00
|
|
|
#include "modules/audio_coding/test/Channel.h"
|
|
|
|
|
#include "modules/audio_coding/test/PCMFile.h"
|
2022-03-16 13:50:58 +01:00
|
|
|
#include "test/scoped_key_value_config.h"
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2011-12-16 10:09:04 +00:00
|
|
|
namespace webrtc {
|
|
|
|
|
|
2018-10-01 12:31:22 +02:00
|
|
|
class TestRedFec {
|
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:
|
2018-10-04 12:38:03 +02:00
|
|
|
void RegisterSendCodec(const std::unique_ptr<AudioCodingModule>& acm,
|
|
|
|
|
const SdpAudioFormat& codec_format,
|
|
|
|
|
absl::optional<Vad::Aggressiveness> vad_mode,
|
|
|
|
|
bool use_red);
|
2013-05-03 07:34:12 +00:00
|
|
|
void Run();
|
|
|
|
|
void OpenOutFile(int16_t testNumber);
|
2018-10-04 12:38:03 +02:00
|
|
|
|
2022-03-16 13:50:58 +01:00
|
|
|
test::ScopedKeyValueConfig field_trials_;
|
2018-10-04 12:38:03 +02:00
|
|
|
const rtc::scoped_refptr<AudioEncoderFactory> encoder_factory_;
|
|
|
|
|
const rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_;
|
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_
|