blob: 666058c72ddfb91e7f5bea5dbd4c936b842c68f9 [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
11#ifndef TEST_FEC_H
12#define TEST_FEC_H
13
14#include "ACMTest.h"
15#include "Channel.h"
16#include "PCMFile.h"
17
tina.legrand@webrtc.org554ae1a2011-12-16 10:09:04 +000018namespace webrtc {
19
niklase@google.com470e71d2011-07-07 08:21:25 +000020class TestFEC : public ACMTest
21{
22public:
23 TestFEC(int testMode);
24 ~TestFEC();
25
26 void Perform();
27private:
28 // The default value of '-1' indicates that the registration is based only on codec name
29 // and a sampling frequncy matching is not required. This is useful for codecs which support
30 // several sampling frequency.
pbos@webrtc.org0946a562013-04-09 00:28:06 +000031 int16_t RegisterSendCodec(char side, char* codecName, int32_t sampFreqHz = -1);
niklase@google.com470e71d2011-07-07 08:21:25 +000032 void Run();
pbos@webrtc.org0946a562013-04-09 00:28:06 +000033 void OpenOutFile(int16_t testNumber);
niklase@google.com470e71d2011-07-07 08:21:25 +000034 void DisplaySendReceiveCodec();
pbos@webrtc.org0946a562013-04-09 00:28:06 +000035 int32_t SetVAD(bool enableDTX, bool enableVAD, ACMVADMode vadMode);
niklase@google.com470e71d2011-07-07 08:21:25 +000036 AudioCodingModule* _acmA;
37 AudioCodingModule* _acmB;
38
39 Channel* _channelA2B;
40
41 PCMFile _inFileA;
42 PCMFile _outFileB;
pbos@webrtc.org0946a562013-04-09 00:28:06 +000043 int16_t _testCntr;
niklase@google.com470e71d2011-07-07 08:21:25 +000044 int _testMode;
45};
46
tina.legrand@webrtc.org554ae1a2011-12-16 10:09:04 +000047} // namespace webrtc
niklase@google.com470e71d2011-07-07 08:21:25 +000048
49#endif