blob: ac0b6cdfc72b9cb10e5720cae1153b08d57094b7 [file] [log] [blame]
niklase@google.com470e71d2011-07-07 08:21:25 +00001/*
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
minyue@webrtc.orgaa5ea1c2014-05-23 15:16:51 +000011#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_TESTREDFEC_H_
12#define WEBRTC_MODULES_AUDIO_CODING_MAIN_TESTREDFEC_H_
niklase@google.com470e71d2011-07-07 08:21:25 +000013
minyue@webrtc.orgaa5ea1c2014-05-23 15:16:51 +000014#include <string>
kwiberg@webrtc.org00b8f6b2015-02-26 14:34:55 +000015#include "webrtc/base/scoped_ptr.h"
turaj@webrtc.org6ea3d1c2013-10-02 21:44:33 +000016#include "webrtc/modules/audio_coding/main/test/ACMTest.h"
17#include "webrtc/modules/audio_coding/main/test/Channel.h"
18#include "webrtc/modules/audio_coding/main/test/PCMFile.h"
niklase@google.com470e71d2011-07-07 08:21:25 +000019
tina.legrand@webrtc.org554ae1a2011-12-16 10:09:04 +000020namespace webrtc {
21
minyue@webrtc.orgaa5ea1c2014-05-23 15:16:51 +000022class Config;
23
24class TestRedFec : public ACMTest {
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000025 public:
minyue@webrtc.orgaa5ea1c2014-05-23 15:16:51 +000026 explicit TestRedFec();
27 ~TestRedFec();
niklase@google.com470e71d2011-07-07 08:21:25 +000028
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000029 void Perform();
30 private:
31 // The default value of '-1' indicates that the registration is based only on
32 // codec name and a sampling frequency matching is not required. This is
33 // useful for codecs which support several sampling frequency.
minyue@webrtc.org41d2bef2015-03-23 12:57:45 +000034 int16_t RegisterSendCodec(char side, const char* codecName,
andresp@webrtc.orgd0b436a2014-01-13 13:15:59 +000035 int32_t sampFreqHz = -1);
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000036 void Run();
37 void OpenOutFile(int16_t testNumber);
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000038 int32_t SetVAD(bool enableDTX, bool enableVAD, ACMVADMode vadMode);
kwiberg@webrtc.org00b8f6b2015-02-26 14:34:55 +000039 rtc::scoped_ptr<AudioCodingModule> _acmA;
40 rtc::scoped_ptr<AudioCodingModule> _acmB;
niklase@google.com470e71d2011-07-07 08:21:25 +000041
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000042 Channel* _channelA2B;
niklase@google.com470e71d2011-07-07 08:21:25 +000043
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000044 PCMFile _inFileA;
45 PCMFile _outFileB;
46 int16_t _testCntr;
niklase@google.com470e71d2011-07-07 08:21:25 +000047};
48
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000049} // namespace webrtc
niklase@google.com470e71d2011-07-07 08:21:25 +000050
minyue@webrtc.orgaa5ea1c2014-05-23 15:16:51 +000051#endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_TESTREDFEC_H_