OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2016 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 rtc::CriticalSection pending_lock_; | 247 rtc::CriticalSection pending_lock_; |
248 std::list<std::unique_ptr<QueuedTask>> pending_ GUARDED_BY(pending_lock_); | 248 std::list<std::unique_ptr<QueuedTask>> pending_ GUARDED_BY(pending_lock_); |
249 std::list<PostAndReplyTask*> pending_replies_ GUARDED_BY(pending_lock_); | 249 std::list<PostAndReplyTask*> pending_replies_ GUARDED_BY(pending_lock_); |
250 #elif defined(WEBRTC_MAC) | 250 #elif defined(WEBRTC_MAC) |
251 struct QueueContext; | 251 struct QueueContext; |
252 struct TaskContext; | 252 struct TaskContext; |
253 struct PostTaskAndReplyContext; | 253 struct PostTaskAndReplyContext; |
254 dispatch_queue_t queue_; | 254 dispatch_queue_t queue_; |
255 QueueContext* const context_; | 255 QueueContext* const context_; |
256 #elif defined(WEBRTC_WIN) | 256 #elif defined(WEBRTC_WIN) |
| 257 class MultimediaTimer; |
257 typedef std::unordered_map<UINT_PTR, std::unique_ptr<QueuedTask>> | 258 typedef std::unordered_map<UINT_PTR, std::unique_ptr<QueuedTask>> |
258 DelayedTasks; | 259 DelayedTasks; |
259 static bool ThreadMain(void* context); | 260 static bool ThreadMain(void* context); |
260 static bool ProcessQueuedMessages(DelayedTasks* delayed_tasks); | 261 static bool ProcessQueuedMessages(DelayedTasks* delayed_tasks, |
| 262 std::vector<MultimediaTimer>* timers); |
261 | 263 |
262 class WorkerThread : public PlatformThread { | 264 class WorkerThread : public PlatformThread { |
263 public: | 265 public: |
264 WorkerThread(ThreadRunFunction func, void* obj, const char* thread_name) | 266 WorkerThread(ThreadRunFunction func, void* obj, const char* thread_name) |
265 : PlatformThread(func, obj, thread_name) {} | 267 : PlatformThread(func, obj, thread_name) {} |
266 | 268 |
267 bool QueueAPC(PAPCFUNC apc_function, ULONG_PTR data) { | 269 bool QueueAPC(PAPCFUNC apc_function, ULONG_PTR data) { |
268 return PlatformThread::QueueAPC(apc_function, data); | 270 return PlatformThread::QueueAPC(apc_function, data); |
269 } | 271 } |
270 }; | 272 }; |
271 WorkerThread thread_; | 273 WorkerThread thread_; |
272 #else | 274 #else |
273 #error not supported. | 275 #error not supported. |
274 #endif | 276 #endif |
275 | 277 |
276 RTC_DISALLOW_COPY_AND_ASSIGN(TaskQueue); | 278 RTC_DISALLOW_COPY_AND_ASSIGN(TaskQueue); |
277 }; | 279 }; |
278 | 280 |
279 } // namespace rtc | 281 } // namespace rtc |
280 | 282 |
281 #endif // WEBRTC_BASE_TASK_QUEUE_H_ | 283 #endif // WEBRTC_BASE_TASK_QUEUE_H_ |
OLD | NEW |