OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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_APITEST_H_ | 11 #ifndef WEBRTC_MODULES_AUDIO_CODING_TEST_APITEST_H_ |
12 #define WEBRTC_MODULES_AUDIO_CODING_TEST_APITEST_H_ | 12 #define WEBRTC_MODULES_AUDIO_CODING_TEST_APITEST_H_ |
13 | 13 |
14 #include <memory> | 14 #include <memory> |
15 | 15 |
16 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" | 16 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" |
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 #include "webrtc/modules/audio_coding/test/utility.h" | 20 #include "webrtc/modules/audio_coding/test/utility.h" |
21 #include "webrtc/system_wrappers/include/event_wrapper.h" | 21 #include "webrtc/system_wrappers/include/event_wrapper.h" |
22 #include "webrtc/system_wrappers/include/rw_lock_wrapper.h" | 22 #include "webrtc/system_wrappers/include/rw_lock_wrapper.h" |
23 | 23 |
24 namespace webrtc { | 24 namespace webrtc { |
25 | 25 |
26 class Config; | |
27 | |
28 enum APITESTAction { | 26 enum APITESTAction { |
29 TEST_CHANGE_CODEC_ONLY = 0, | 27 TEST_CHANGE_CODEC_ONLY = 0, |
30 DTX_TEST = 1 | 28 DTX_TEST = 1 |
31 }; | 29 }; |
32 | 30 |
33 class APITest : public ACMTest { | 31 class APITest : public ACMTest { |
34 public: | 32 public: |
35 explicit APITest(const Config& config); | 33 APITest(); |
36 ~APITest(); | 34 ~APITest(); |
37 | 35 |
38 void Perform(); | 36 void Perform(); |
39 private: | 37 private: |
40 int16_t SetUp(); | 38 int16_t SetUp(); |
41 | 39 |
42 static bool PushAudioThreadA(void* obj); | 40 static bool PushAudioThreadA(void* obj); |
43 static bool PullAudioThreadA(void* obj); | 41 static bool PullAudioThreadA(void* obj); |
44 static bool ProcessThreadA(void* obj); | 42 static bool ProcessThreadA(void* obj); |
45 static bool APIThreadA(void* obj); | 43 static bool APIThreadA(void* obj); |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 VADCallback* _vadCallbackB; | 153 VADCallback* _vadCallbackB; |
156 RWLockWrapper& _apiTestRWLock; | 154 RWLockWrapper& _apiTestRWLock; |
157 bool _randomTest; | 155 bool _randomTest; |
158 int _testNumA; | 156 int _testNumA; |
159 int _testNumB; | 157 int _testNumB; |
160 }; | 158 }; |
161 | 159 |
162 } // namespace webrtc | 160 } // namespace webrtc |
163 | 161 |
164 #endif // WEBRTC_MODULES_AUDIO_CODING_TEST_APITEST_H_ | 162 #endif // WEBRTC_MODULES_AUDIO_CODING_TEST_APITEST_H_ |
OLD | NEW |