diff --git a/modules/async_audio_processing/BUILD.gn b/modules/async_audio_processing/BUILD.gn index 7a7ca20df1..0a8fc58520 100644 --- a/modules/async_audio_processing/BUILD.gn +++ b/modules/async_audio_processing/BUILD.gn @@ -24,7 +24,6 @@ rtc_library("async_audio_processing") { "../../api/task_queue:task_queue", "../../rtc_base:checks", "../../rtc_base:refcount", - "../../rtc_base:rtc_task_queue", ] } diff --git a/modules/async_audio_processing/async_audio_processing.cc b/modules/async_audio_processing/async_audio_processing.cc index 19c08dc3e5..d61b1264fc 100644 --- a/modules/async_audio_processing/async_audio_processing.cc +++ b/modules/async_audio_processing/async_audio_processing.cc @@ -63,7 +63,7 @@ AsyncAudioProcessing::AsyncAudioProcessing( "AsyncAudioProcessing", TaskQueueFactory::Priority::NORMAL)) { frame_processor_.SetSink([this](std::unique_ptr frame) { - task_queue_.PostTask([this, frame = std::move(frame)]() mutable { + task_queue_->PostTask([this, frame = std::move(frame)]() mutable { on_frame_processed_callback_(std::move(frame)); }); }); @@ -80,7 +80,7 @@ AsyncAudioProcessing::AsyncAudioProcessing( "AsyncAudioProcessing", TaskQueueFactory::Priority::NORMAL)) { owned_frame_processor_->SetSink([this](std::unique_ptr frame) { - task_queue_.PostTask([this, frame = std::move(frame)]() mutable { + task_queue_->PostTask([this, frame = std::move(frame)]() mutable { on_frame_processed_callback_(std::move(frame)); }); }); @@ -88,11 +88,11 @@ AsyncAudioProcessing::AsyncAudioProcessing( void AsyncAudioProcessing::Process(std::unique_ptr frame) { if (owned_frame_processor_) { - task_queue_.PostTask([this, frame = std::move(frame)]() mutable { + task_queue_->PostTask([this, frame = std::move(frame)]() mutable { owned_frame_processor_->Process(std::move(frame)); }); } else { - task_queue_.PostTask([this, frame = std::move(frame)]() mutable { + task_queue_->PostTask([this, frame = std::move(frame)]() mutable { frame_processor_.Process(std::move(frame)); }); } diff --git a/modules/async_audio_processing/async_audio_processing.h b/modules/async_audio_processing/async_audio_processing.h index f3ed96959b..2e78e716a8 100644 --- a/modules/async_audio_processing/async_audio_processing.h +++ b/modules/async_audio_processing/async_audio_processing.h @@ -14,8 +14,8 @@ #include #include "api/audio/audio_frame_processor.h" +#include "api/task_queue/task_queue_base.h" #include "rtc_base/ref_count.h" -#include "rtc_base/task_queue.h" namespace webrtc { @@ -101,7 +101,7 @@ class AsyncAudioProcessing final { // called. AudioFrameProcessor& frame_processor_; std::unique_ptr owned_frame_processor_; - rtc::TaskQueue task_queue_; + std::unique_ptr task_queue_; }; } // namespace webrtc