OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #ifndef WEBRTC_MODULES_AUDIO_CODING_TEST_TESTREDFEC_H_ | 11 #ifndef WEBRTC_MODULES_AUDIO_CODING_TEST_TESTREDFEC_H_ |
12 #define WEBRTC_MODULES_AUDIO_CODING_TEST_TESTREDFEC_H_ | 12 #define WEBRTC_MODULES_AUDIO_CODING_TEST_TESTREDFEC_H_ |
13 | 13 |
14 #include <memory> | 14 #include <memory> |
15 #include <string> | 15 #include <string> |
16 | 16 |
17 #include "webrtc/modules/audio_coding/test/ACMTest.h" | 17 #include "webrtc/modules/audio_coding/test/ACMTest.h" |
18 #include "webrtc/modules/audio_coding/test/Channel.h" | 18 #include "webrtc/modules/audio_coding/test/Channel.h" |
19 #include "webrtc/modules/audio_coding/test/PCMFile.h" | 19 #include "webrtc/modules/audio_coding/test/PCMFile.h" |
20 | 20 |
21 namespace webrtc { | 21 namespace webrtc { |
22 | 22 |
23 class Config; | |
24 | |
25 class TestRedFec : public ACMTest { | 23 class TestRedFec : public ACMTest { |
26 public: | 24 public: |
27 explicit TestRedFec(); | 25 explicit TestRedFec(); |
28 ~TestRedFec(); | 26 ~TestRedFec(); |
29 | 27 |
30 void Perform(); | 28 void Perform(); |
31 private: | 29 private: |
32 // The default value of '-1' indicates that the registration is based only on | 30 // The default value of '-1' indicates that the registration is based only on |
33 // codec name and a sampling frequency matching is not required. This is | 31 // codec name and a sampling frequency matching is not required. This is |
34 // useful for codecs which support several sampling frequency. | 32 // useful for codecs which support several sampling frequency. |
35 int16_t RegisterSendCodec(char side, const char* codecName, | 33 int16_t RegisterSendCodec(char side, const char* codecName, |
36 int32_t sampFreqHz = -1); | 34 int32_t sampFreqHz = -1); |
37 void Run(); | 35 void Run(); |
38 void OpenOutFile(int16_t testNumber); | 36 void OpenOutFile(int16_t testNumber); |
39 int32_t SetVAD(bool enableDTX, bool enableVAD, ACMVADMode vadMode); | 37 int32_t SetVAD(bool enableDTX, bool enableVAD, ACMVADMode vadMode); |
40 std::unique_ptr<AudioCodingModule> _acmA; | 38 std::unique_ptr<AudioCodingModule> _acmA; |
41 std::unique_ptr<AudioCodingModule> _acmB; | 39 std::unique_ptr<AudioCodingModule> _acmB; |
42 | 40 |
43 Channel* _channelA2B; | 41 Channel* _channelA2B; |
44 | 42 |
45 PCMFile _inFileA; | 43 PCMFile _inFileA; |
46 PCMFile _outFileB; | 44 PCMFile _outFileB; |
47 int16_t _testCntr; | 45 int16_t _testCntr; |
48 }; | 46 }; |
49 | 47 |
50 } // namespace webrtc | 48 } // namespace webrtc |
51 | 49 |
52 #endif // WEBRTC_MODULES_AUDIO_CODING_TEST_TESTREDFEC_H_ | 50 #endif // WEBRTC_MODULES_AUDIO_CODING_TEST_TESTREDFEC_H_ |
OLD | NEW |