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 #include <android/log.h> | 11 #include <android/log.h> |
12 #include <stdio.h> | 12 #include <stdio.h> |
13 #include <string.h> | 13 #include <string.h> |
14 #include <unistd.h> | 14 #include <unistd.h> |
15 | 15 |
16 #include "webrtc/voice_engine/test/android/android_test/jni/org_webrtc_voiceengi
ne_test_AndroidTest.h" | 16 #include "webrtc/voice_engine/test/android/android_test/jni/org_webrtc_voiceengi
ne_test_AndroidTest.h" |
17 | 17 |
18 #include "webrtc/system_wrappers/include/thread_wrapper.h" | 18 #include "webrtc/base/platform_thread.h" |
19 | 19 |
20 #include "webrtc/voice_engine/include/voe_audio_processing.h" | 20 #include "webrtc/voice_engine/include/voe_audio_processing.h" |
21 #include "webrtc/voice_engine/include/voe_base.h" | 21 #include "webrtc/voice_engine/include/voe_base.h" |
22 #include "webrtc/voice_engine/include/voe_codec.h" | 22 #include "webrtc/voice_engine/include/voe_codec.h" |
23 #include "webrtc/voice_engine/include/voe_file.h" | 23 #include "webrtc/voice_engine/include/voe_file.h" |
24 #include "webrtc/voice_engine/include/voe_hardware.h" | 24 #include "webrtc/voice_engine/include/voe_hardware.h" |
25 #include "webrtc/voice_engine/include/voe_network.h" | 25 #include "webrtc/voice_engine/include/voe_network.h" |
26 #include "webrtc/voice_engine/include/voe_rtp_rtcp.h" | 26 #include "webrtc/voice_engine/include/voe_rtp_rtcp.h" |
27 #include "webrtc/voice_engine/include/voe_volume_control.h" | 27 #include "webrtc/voice_engine/include/voe_volume_control.h" |
28 | 28 |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 { | 170 { |
171 public: | 171 public: |
172 ThreadTest(); | 172 ThreadTest(); |
173 ~ThreadTest(); | 173 ~ThreadTest(); |
174 int RunTest(); | 174 int RunTest(); |
175 int CloseTest(); | 175 int CloseTest(); |
176 private: | 176 private: |
177 static bool Run(void* ptr); | 177 static bool Run(void* ptr); |
178 bool Process(); | 178 bool Process(); |
179 private: | 179 private: |
180 rtc::scoped_ptr<ThreadWrapper> _thread; | 180 rtc::scoped_ptr<PlatformThread> _thread; |
181 }; | 181 }; |
182 | 182 |
183 ThreadTest::~ThreadTest() | 183 ThreadTest::~ThreadTest() |
184 { | 184 { |
185 if (_thread) | 185 if (_thread) |
186 _thread->Stop(); | 186 _thread->Stop(); |
187 } | 187 } |
188 | 188 |
189 ThreadTest::ThreadTest() | 189 ThreadTest::ThreadTest() |
190 { | 190 { |
191 _thread = ThreadWrapper::CreateThread(Run, this, "ThreadTest thread"); | 191 _thread = PlatformThread::CreateThread(Run, this, "ThreadTest thread"); |
192 } | 192 } |
193 | 193 |
194 bool ThreadTest::Run(void* ptr) | 194 bool ThreadTest::Run(void* ptr) |
195 { | 195 { |
196 return static_cast<ThreadTest*> (ptr)->Process(); | 196 return static_cast<ThreadTest*> (ptr)->Process(); |
197 } | 197 } |
198 | 198 |
199 bool ThreadTest::Process() | 199 bool ThreadTest::Process() |
200 { | 200 { |
201 // Attach this thread to JVM | 201 // Attach this thread to JVM |
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1322 releaseOK = false; | 1322 releaseOK = false; |
1323 } | 1323 } |
1324 else | 1324 else |
1325 { | 1325 { |
1326 veData.rtp_rtcp = NULL; | 1326 veData.rtp_rtcp = NULL; |
1327 } | 1327 } |
1328 } | 1328 } |
1329 | 1329 |
1330 return releaseOK; | 1330 return releaseOK; |
1331 } | 1331 } |
OLD | NEW |