blob: f61e8680f6b42f35ecb5d1444ba2e3aaea9b37e8 [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
turaj@webrtc.org6ea3d1c2013-10-02 21:44:33 +000011#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_TESTFEC_H_
12#define WEBRTC_MODULES_AUDIO_CODING_MAIN_TESTFEC_H_
niklase@google.com470e71d2011-07-07 08:21:25 +000013
turaj@webrtc.org6ea3d1c2013-10-02 21:44:33 +000014#include "webrtc/modules/audio_coding/main/test/ACMTest.h"
15#include "webrtc/modules/audio_coding/main/test/Channel.h"
16#include "webrtc/modules/audio_coding/main/test/PCMFile.h"
andrew@webrtc.org89df0922013-09-12 01:27:43 +000017#include "webrtc/system_wrappers/interface/scoped_ptr.h"
niklase@google.com470e71d2011-07-07 08:21:25 +000018
tina.legrand@webrtc.org554ae1a2011-12-16 10:09:04 +000019namespace webrtc {
20
turaj@webrtc.org6ea3d1c2013-10-02 21:44:33 +000021class Config;
22
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000023class TestFEC : public ACMTest {
24 public:
turaj@webrtc.org6ea3d1c2013-10-02 21:44:33 +000025 explicit TestFEC(const Config& config);
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000026 ~TestFEC();
niklase@google.com470e71d2011-07-07 08:21:25 +000027
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000028 void Perform();
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.
turaj@webrtc.org7cc64b32014-01-10 22:35:09 +000033 void RegisterSendCodec(char side, char* codecName,
34 int32_t sampFreqHz = -1);
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000035 void Run();
36 void OpenOutFile(int16_t testNumber);
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000037 int32_t SetVAD(bool enableDTX, bool enableVAD, ACMVADMode vadMode);
andrew@webrtc.org89df0922013-09-12 01:27:43 +000038 scoped_ptr<AudioCodingModule> _acmA;
39 scoped_ptr<AudioCodingModule> _acmB;
niklase@google.com470e71d2011-07-07 08:21:25 +000040
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000041 Channel* _channelA2B;
niklase@google.com470e71d2011-07-07 08:21:25 +000042
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000043 PCMFile _inFileA;
44 PCMFile _outFileB;
45 int16_t _testCntr;
niklase@google.com470e71d2011-07-07 08:21:25 +000046};
47
tina.legrand@webrtc.orgd5726a12013-05-03 07:34:12 +000048} // namespace webrtc
niklase@google.com470e71d2011-07-07 08:21:25 +000049
turaj@webrtc.org6ea3d1c2013-10-02 21:44:33 +000050#endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_TESTFEC_H_