1b015cbede88899f67a53fbbe581b02ce8e32794andrew@webrtc.org/* 2b015cbede88899f67a53fbbe581b02ce8e32794andrew@webrtc.org * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. 3b015cbede88899f67a53fbbe581b02ce8e32794andrew@webrtc.org * 4b015cbede88899f67a53fbbe581b02ce8e32794andrew@webrtc.org * Use of this source code is governed by a BSD-style license 5b015cbede88899f67a53fbbe581b02ce8e32794andrew@webrtc.org * that can be found in the LICENSE file in the root of the source 6b015cbede88899f67a53fbbe581b02ce8e32794andrew@webrtc.org * tree. An additional intellectual property rights grant can be found 7b015cbede88899f67a53fbbe581b02ce8e32794andrew@webrtc.org * in the file PATENTS. All contributing project authors may 8b015cbede88899f67a53fbbe581b02ce8e32794andrew@webrtc.org * be found in the AUTHORS file in the root of the source tree. 9b015cbede88899f67a53fbbe581b02ce8e32794andrew@webrtc.org */ 10b015cbede88899f67a53fbbe581b02ce8e32794andrew@webrtc.org 1191c0a2592faf1e68f658c98e5faa1acef7124d1aminyue@webrtc.org#ifndef WEBRTC_MODULES_AUDIO_CODING_MAIN_TESTREDFEC_H_ 1291c0a2592faf1e68f658c98e5faa1acef7124d1aminyue@webrtc.org#define WEBRTC_MODULES_AUDIO_CODING_MAIN_TESTREDFEC_H_ 13b015cbede88899f67a53fbbe581b02ce8e32794andrew@webrtc.org 1491c0a2592faf1e68f658c98e5faa1acef7124d1aminyue@webrtc.org#include <string> 1585cdc39d6a1a07241a70ac8458cf609e01930bc0turaj@webrtc.org#include "webrtc/modules/audio_coding/main/test/ACMTest.h" 1685cdc39d6a1a07241a70ac8458cf609e01930bc0turaj@webrtc.org#include "webrtc/modules/audio_coding/main/test/Channel.h" 1785cdc39d6a1a07241a70ac8458cf609e01930bc0turaj@webrtc.org#include "webrtc/modules/audio_coding/main/test/PCMFile.h" 185e3379e47b802f3aaef17b9b34308e057bf39675andrew@webrtc.org#include "webrtc/system_wrappers/interface/scoped_ptr.h" 19b015cbede88899f67a53fbbe581b02ce8e32794andrew@webrtc.org 20b015cbede88899f67a53fbbe581b02ce8e32794andrew@webrtc.orgnamespace webrtc { 21b015cbede88899f67a53fbbe581b02ce8e32794andrew@webrtc.org 2291c0a2592faf1e68f658c98e5faa1acef7124d1aminyue@webrtc.orgclass Config; 2391c0a2592faf1e68f658c98e5faa1acef7124d1aminyue@webrtc.org 2491c0a2592faf1e68f658c98e5faa1acef7124d1aminyue@webrtc.orgclass TestRedFec : public ACMTest { 25b31332e75f97ef3d41d5393772be11f24b0f174ftina.legrand@webrtc.org public: 2691c0a2592faf1e68f658c98e5faa1acef7124d1aminyue@webrtc.org explicit TestRedFec(); 2791c0a2592faf1e68f658c98e5faa1acef7124d1aminyue@webrtc.org ~TestRedFec(); 28b31332e75f97ef3d41d5393772be11f24b0f174ftina.legrand@webrtc.org 29b31332e75f97ef3d41d5393772be11f24b0f174ftina.legrand@webrtc.org void Perform(); 30b31332e75f97ef3d41d5393772be11f24b0f174ftina.legrand@webrtc.org private: 31b31332e75f97ef3d41d5393772be11f24b0f174ftina.legrand@webrtc.org // The default value of '-1' indicates that the registration is based only on 32b31332e75f97ef3d41d5393772be11f24b0f174ftina.legrand@webrtc.org // codec name and a sampling frequency matching is not required. This is 33b31332e75f97ef3d41d5393772be11f24b0f174ftina.legrand@webrtc.org // useful for codecs which support several sampling frequency. 34ad584b66a1dd9a7983f6dce047beb5a539a8ca17andresp@webrtc.org int16_t RegisterSendCodec(char side, char* codecName, 35ad584b66a1dd9a7983f6dce047beb5a539a8ca17andresp@webrtc.org int32_t sampFreqHz = -1); 36b31332e75f97ef3d41d5393772be11f24b0f174ftina.legrand@webrtc.org void Run(); 37b31332e75f97ef3d41d5393772be11f24b0f174ftina.legrand@webrtc.org void OpenOutFile(int16_t testNumber); 38b31332e75f97ef3d41d5393772be11f24b0f174ftina.legrand@webrtc.org int32_t SetVAD(bool enableDTX, bool enableVAD, ACMVADMode vadMode); 395e3379e47b802f3aaef17b9b34308e057bf39675andrew@webrtc.org scoped_ptr<AudioCodingModule> _acmA; 405e3379e47b802f3aaef17b9b34308e057bf39675andrew@webrtc.org scoped_ptr<AudioCodingModule> _acmB; 41b31332e75f97ef3d41d5393772be11f24b0f174ftina.legrand@webrtc.org 42b31332e75f97ef3d41d5393772be11f24b0f174ftina.legrand@webrtc.org Channel* _channelA2B; 43b31332e75f97ef3d41d5393772be11f24b0f174ftina.legrand@webrtc.org 44b31332e75f97ef3d41d5393772be11f24b0f174ftina.legrand@webrtc.org PCMFile _inFileA; 45b31332e75f97ef3d41d5393772be11f24b0f174ftina.legrand@webrtc.org PCMFile _outFileB; 46b31332e75f97ef3d41d5393772be11f24b0f174ftina.legrand@webrtc.org int16_t _testCntr; 47b015cbede88899f67a53fbbe581b02ce8e32794andrew@webrtc.org}; 48b015cbede88899f67a53fbbe581b02ce8e32794andrew@webrtc.org 49b31332e75f97ef3d41d5393772be11f24b0f174ftina.legrand@webrtc.org} // namespace webrtc 50b015cbede88899f67a53fbbe581b02ce8e32794andrew@webrtc.org 5191c0a2592faf1e68f658c98e5faa1acef7124d1aminyue@webrtc.org#endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_TESTREDFEC_H_ 52