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 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
79 _sendVADModeA(VADNormal), | 79 _sendVADModeA(VADNormal), |
80 _sendVADB(false), | 80 _sendVADB(false), |
81 _sendDTXB(false), | 81 _sendDTXB(false), |
82 _sendVADModeB(VADNormal), | 82 _sendVADModeB(VADNormal), |
83 _minDelayA(0), | 83 _minDelayA(0), |
84 _minDelayB(0), | 84 _minDelayB(0), |
85 _dotPositionA(0), | 85 _dotPositionA(0), |
86 _dotMoveDirectionA(1), | 86 _dotMoveDirectionA(1), |
87 _dotPositionB(39), | 87 _dotPositionB(39), |
88 _dotMoveDirectionB(-1), | 88 _dotMoveDirectionB(-1), |
89 _dtmfCallback(NULL), | |
90 _vadCallbackA(NULL), | 89 _vadCallbackA(NULL), |
91 _vadCallbackB(NULL), | 90 _vadCallbackB(NULL), |
92 _apiTestRWLock(*RWLockWrapper::CreateRWLock()), | 91 _apiTestRWLock(*RWLockWrapper::CreateRWLock()), |
93 _randomTest(false), | 92 _randomTest(false), |
94 _testNumA(0), | 93 _testNumA(0), |
95 _testNumB(1) { | 94 _testNumB(1) { |
96 int n; | 95 int n; |
97 for (n = 0; n < 32; n++) { | 96 for (n = 0; n < 32; n++) { |
98 _payloadUsed[n] = false; | 97 _payloadUsed[n] = false; |
99 } | 98 } |
(...skipping 18 matching lines...) Expand all Loading... | |
118 DELETE_POINTER(_pullEventB); | 117 DELETE_POINTER(_pullEventB); |
119 DELETE_POINTER(_processEventB); | 118 DELETE_POINTER(_processEventB); |
120 DELETE_POINTER(_apiEventB); | 119 DELETE_POINTER(_apiEventB); |
121 | 120 |
122 _inFileA.Close(); | 121 _inFileA.Close(); |
123 _outFileA.Close(); | 122 _outFileA.Close(); |
124 | 123 |
125 _inFileB.Close(); | 124 _inFileB.Close(); |
126 _outFileB.Close(); | 125 _outFileB.Close(); |
127 | 126 |
128 DELETE_POINTER(_dtmfCallback); | |
129 DELETE_POINTER(_vadCallbackA); | 127 DELETE_POINTER(_vadCallbackA); |
tlegrand-webrtc
2015/09/18 08:36:55
Why remove DELETE_POINTER(_vadCallbackB);?
hlundin-webrtc
2015/09/18 09:01:13
Oh, bummer. Nice catch!
Done.
| |
130 DELETE_POINTER(_vadCallbackB); | |
131 | 128 |
132 delete &_apiTestRWLock; | 129 delete &_apiTestRWLock; |
133 } | 130 } |
134 | 131 |
135 int16_t APITest::SetUp() { | 132 int16_t APITest::SetUp() { |
136 CodecInst dummyCodec; | 133 CodecInst dummyCodec; |
137 int lastPayloadType = 0; | 134 int lastPayloadType = 0; |
138 | 135 |
139 int16_t numCodecs = _acmA->NumberOfCodecs(); | 136 int16_t numCodecs = _acmA->NumberOfCodecs(); |
140 for (uint8_t n = 0; n < numCodecs; n++) { | 137 for (uint8_t n = 0; n < numCodecs; n++) { |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
283 _randomTest = false; | 280 _randomTest = false; |
284 printf("\nPrint Tests (y/n)? "); | 281 printf("\nPrint Tests (y/n)? "); |
285 EXPECT_TRUE(fgets(print, 10, stdin) != NULL); | 282 EXPECT_TRUE(fgets(print, 10, stdin) != NULL); |
286 print[10] = '\0'; | 283 print[10] = '\0'; |
287 if (strstr(print, "y") == NULL) { | 284 if (strstr(print, "y") == NULL) { |
288 EXPECT_TRUE(freopen("APITest_log.txt", "w", stdout) != 0); | 285 EXPECT_TRUE(freopen("APITest_log.txt", "w", stdout) != 0); |
289 _verbose = false; | 286 _verbose = false; |
290 } | 287 } |
291 } | 288 } |
292 | 289 |
293 #ifdef WEBRTC_DTMF_DETECTION | |
294 _dtmfCallback = new DTMFDetector; | |
295 #endif | |
296 _vadCallbackA = new VADCallback; | 290 _vadCallbackA = new VADCallback; |
297 _vadCallbackB = new VADCallback; | 291 _vadCallbackB = new VADCallback; |
298 | 292 |
299 return 0; | 293 return 0; |
300 } | 294 } |
301 | 295 |
302 bool APITest::PushAudioThreadA(void* obj) { | 296 bool APITest::PushAudioThreadA(void* obj) { |
303 return static_cast<APITest*>(obj)->PushAudioRunA(); | 297 return static_cast<APITest*>(obj)->PushAudioRunA(); |
304 } | 298 } |
305 | 299 |
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1178 CHECK_ERROR_MT(myACM->RegisterSendCodec(myCodec)); | 1172 CHECK_ERROR_MT(myACM->RegisterSendCodec(myCodec)); |
1179 myChannel->ResetStats(); | 1173 myChannel->ResetStats(); |
1180 { | 1174 { |
1181 WriteLockScoped wl(_apiTestRWLock); | 1175 WriteLockScoped wl(_apiTestRWLock); |
1182 *thereIsEncoder = true; | 1176 *thereIsEncoder = true; |
1183 } | 1177 } |
1184 Wait(500); | 1178 Wait(500); |
1185 } | 1179 } |
1186 | 1180 |
1187 } // namespace webrtc | 1181 } // namespace webrtc |
OLD | NEW |