Create conversions between webrtc::TaskQueueBase and rtc::TaskQueue
Bug: webrtc:10191
Change-Id: Ia6642081ac758e31c14780bdd83dbc88279cce6d
Reviewed-on: https://webrtc-review.googlesource.com/c/124826
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26890}
diff --git a/rtc_base/task_queue.h b/rtc_base/task_queue.h
index d5be38b..3bc1e1f 100644
--- a/rtc_base/task_queue.h
+++ b/rtc_base/task_queue.h
@@ -145,6 +145,8 @@
// priorities, on others such as Mac and iOS, GCD queue priorities.
using Priority = ::webrtc::TaskQueueFactory::Priority;
+ explicit TaskQueue(std::unique_ptr<webrtc::TaskQueueBase,
+ webrtc::TaskQueueDeleter> task_queue);
explicit TaskQueue(const char* queue_name,
Priority priority = Priority::NORMAL);
~TaskQueue();
@@ -154,6 +156,9 @@
// Used for DCHECKing the current queue.
bool IsCurrent() const;
+ // Returns non-owning pointer to the task queue implementation.
+ webrtc::TaskQueueBase* Get() { return impl_; }
+
// TODO(tommi): For better debuggability, implement RTC_FROM_HERE.
// Ownership of the task is passed to PostTask.