Deprecate rtc::TaskQueue variant of AudioProcessing::CreateAndAttachAecDump

Bug: webrtc:14169
Change-Id: I63f40ec18b72cba89eb0b9b298f448ce7f7c4634
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334201
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41528}
This commit is contained in:
Danil Chapovalov 2024-01-15 11:42:13 +01:00 committed by WebRTC LUCI CQ
parent caf9f1bf83
commit e052eee7a3
8 changed files with 28 additions and 37 deletions

View File

@ -516,7 +516,6 @@ rtc_library("rtc_audio_video") {
"../rtc_base:macromagic",
"../rtc_base:network_route",
"../rtc_base:race_checker",
"../rtc_base:rtc_task_queue",
"../rtc_base:safe_conversions",
"../rtc_base:socket",
"../rtc_base:ssl",

View File

@ -377,9 +377,8 @@ void WebRtcVoiceEngine::Init() {
// TaskQueue expects to be created/destroyed on the same thread.
RTC_DCHECK(!low_priority_worker_queue_);
low_priority_worker_queue_.reset(
new rtc::TaskQueue(task_queue_factory_->CreateTaskQueue(
"rtc-low-prio", webrtc::TaskQueueFactory::Priority::LOW)));
low_priority_worker_queue_ = task_queue_factory_->CreateTaskQueue(
"rtc-low-prio", webrtc::TaskQueueFactory::Priority::LOW);
// Load our audio codec lists.
RTC_LOG(LS_VERBOSE) << "Supported send codecs in order of preference:";

View File

@ -66,7 +66,6 @@
#include "rtc_base/network/sent_packet.h"
#include "rtc_base/network_route.h"
#include "rtc_base/system/file_wrapper.h"
#include "rtc_base/task_queue.h"
namespace webrtc {
class AudioFrameProcessor;
@ -141,7 +140,8 @@ class WebRtcVoiceEngine final : public VoiceEngineInterface {
void ApplyOptions(const AudioOptions& options);
webrtc::TaskQueueFactory* const task_queue_factory_;
std::unique_ptr<rtc::TaskQueue> low_priority_worker_queue_;
std::unique_ptr<webrtc::TaskQueueBase, webrtc::TaskQueueDeleter>
low_priority_worker_queue_;
webrtc::AudioDeviceModule* adm();
webrtc::AudioProcessing* apm() const;

View File

@ -222,22 +222,4 @@ bool AudioProcessing::CreateAndAttachAecDump(FILE* handle,
worker_queue->Get());
}
bool AudioProcessing::CreateAndAttachAecDump(
absl::string_view file_name,
int64_t max_log_size_bytes,
absl::Nonnull<TaskQueueBase*> worker_queue) {
// Newer code should implement this variant,
// Older code shouldn't call this variant.
RTC_CHECK_NOTREACHED();
}
bool AudioProcessing::CreateAndAttachAecDump(
FILE* handle,
int64_t max_log_size_bytes,
absl::Nonnull<TaskQueueBase*> worker_queue) {
// New ercode should implement this variant,
// Older code shouldn't call this variant.
RTC_CHECK_NOTREACHED();
}
} // namespace webrtc

View File

@ -635,22 +635,21 @@ class RTC_EXPORT AudioProcessing : public RefCountInterface {
// sucessfully opened, while a value of false indicates that
// opening the file failed.
// TODO: bugs.webrtc.org/14169 - Delete rtc::TaskQueue variants
virtual bool CreateAndAttachAecDump(absl::string_view file_name,
int64_t max_log_size_bytes,
rtc::TaskQueue* worker_queue);
virtual bool CreateAndAttachAecDump(FILE* handle,
int64_t max_log_size_bytes,
rtc::TaskQueue* worker_queue);
// TODO: bugs.webrtc.org/14169 - Make TaskQueueBase variants pure virtual when
// implemented by derived classes.
[[deprecated]] bool CreateAndAttachAecDump(absl::string_view file_name,
int64_t max_log_size_bytes,
rtc::TaskQueue* worker_queue);
[[deprecated]] bool CreateAndAttachAecDump(FILE* handle,
int64_t max_log_size_bytes,
rtc::TaskQueue* worker_queue);
virtual bool CreateAndAttachAecDump(
absl::string_view file_name,
int64_t max_log_size_bytes,
absl::Nonnull<TaskQueueBase*> worker_queue);
absl::Nonnull<TaskQueueBase*> worker_queue) = 0;
virtual bool CreateAndAttachAecDump(
absl::Nonnull<FILE*> handle,
int64_t max_log_size_bytes,
absl::Nonnull<TaskQueueBase*> worker_queue);
absl::Nonnull<TaskQueueBase*> worker_queue) = 0;
// TODO(webrtc:5298) Deprecated variant.
// Attaches provided webrtc::AecDump for recording debugging

View File

@ -99,6 +99,7 @@ if (!build_with_chromium) {
"../../../api:enable_media_with_defaults",
"../../../api:time_controller",
"../../../api/rtc_event_log:rtc_event_log_factory",
"../../../api/task_queue",
"../../../api/task_queue:default_task_queue_factory",
"../../../api/test/pclf:media_configuration",
"../../../api/test/pclf:media_quality_test_params",

View File

@ -277,7 +277,7 @@ void PeerConnectionE2EQualityTest::Run(RunParams run_params) {
TestPeerFactory test_peer_factory(
signaling_thread.get(), time_controller_,
video_quality_analyzer_injection_helper_.get(), task_queue_.get());
video_quality_analyzer_injection_helper_.get(), task_queue_->Get());
alice_ = test_peer_factory.CreateTestPeer(
std::move(alice_configurer),
std::make_unique<FixturePeerConnectionObserver>(

View File

@ -18,6 +18,7 @@
#include "absl/strings/string_view.h"
#include "api/rtc_event_log/rtc_event_log_factory.h"
#include "api/task_queue/task_queue_base.h"
#include "api/test/pclf/media_configuration.h"
#include "api/test/pclf/media_quality_test_params.h"
#include "api/test/pclf/peer_configurer.h"
@ -55,12 +56,22 @@ class TestPeerFactory {
TestPeerFactory(rtc::Thread* signaling_thread,
TimeController& time_controller,
VideoQualityAnalyzerInjectionHelper* video_analyzer_helper,
rtc::TaskQueue* task_queue)
TaskQueueBase* task_queue)
: signaling_thread_(signaling_thread),
time_controller_(time_controller),
video_analyzer_helper_(video_analyzer_helper),
task_queue_(task_queue) {}
[[deprecated]] TestPeerFactory(
rtc::Thread* signaling_thread,
TimeController& time_controller,
VideoQualityAnalyzerInjectionHelper* video_analyzer_helper,
rtc::TaskQueue* task_queue)
: TestPeerFactory(signaling_thread,
time_controller,
video_analyzer_helper,
task_queue->Get()) {}
// Setups all components, that should be provided to WebRTC
// PeerConnectionFactory and PeerConnection creation methods,
// also will setup dependencies, that are required for media analyzers
@ -75,7 +86,7 @@ class TestPeerFactory {
rtc::Thread* signaling_thread_;
TimeController& time_controller_;
VideoQualityAnalyzerInjectionHelper* video_analyzer_helper_;
rtc::TaskQueue* task_queue_;
TaskQueueBase* const task_queue_;
};
} // namespace webrtc_pc_e2e