1 /* 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 WEBRTC_MODULES_AUDIO_CODING_TEST_TESTREDFEC_H_ 12 #define WEBRTC_MODULES_AUDIO_CODING_TEST_TESTREDFEC_H_ 13 14 #include <string> 15 #include "webrtc/base/scoped_ptr.h" 16 #include "webrtc/modules/audio_coding/test/ACMTest.h" 17 #include "webrtc/modules/audio_coding/test/Channel.h" 18 #include "webrtc/modules/audio_coding/test/PCMFile.h" 19 20 namespace webrtc { 21 22 class Config; 23 24 class TestRedFec : public ACMTest { 25 public: 26 explicit TestRedFec(); 27 ~TestRedFec(); 28 29 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. 34 int16_t RegisterSendCodec(char side, const char* codecName, 35 int32_t sampFreqHz = -1); 36 void Run(); 37 void OpenOutFile(int16_t testNumber); 38 int32_t SetVAD(bool enableDTX, bool enableVAD, ACMVADMode vadMode); 39 rtc::scoped_ptr<AudioCodingModule> _acmA; 40 rtc::scoped_ptr<AudioCodingModule> _acmB; 41 42 Channel* _channelA2B; 43 44 PCMFile _inFileA; 45 PCMFile _outFileB; 46 int16_t _testCntr; 47 }; 48 49 } // namespace webrtc 50 51 #endif // WEBRTC_MODULES_AUDIO_CODING_TEST_TESTREDFEC_H_ 52