| 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 |
| (...skipping 159 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<PlatformThread> _thread; | 180 rtc::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 = PlatformThread::CreateThread(Run, this, "ThreadTest thread"); | 191 _thread(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 |