Stop using DEPRECATED_SingleThreadedTaskQueueForTesting in call tests
This is practiaclly a reland of the
https://webrtc-review.googlesource.com/c/src/+/157896
except that video multi stream tests are still using the deprecated TaskQueue
(see https://webrtc-review.googlesource.com/c/src/+/159280)
Bug: webrtc:10933
Change-Id: Ie715345924f9dd2d7dd52c99de3ea595b6fad5ae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159699
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29794}
diff --git a/test/call_test.cc b/test/call_test.cc
index d83f87a..9f26cc6 100644
--- a/test/call_test.cc
+++ b/test/call_test.cc
@@ -56,7 +56,9 @@
num_flexfec_streams_(0),
audio_decoder_factory_(CreateBuiltinAudioDecoderFactory()),
audio_encoder_factory_(CreateBuiltinAudioEncoderFactory()),
- task_queue_("CallTestTaskQueue") {}
+ task_queue_(task_queue_factory_->CreateTaskQueue(
+ "CallTestTaskQueue",
+ TaskQueueFactory::Priority::NORMAL)) {}
CallTest::~CallTest() = default;
@@ -84,7 +86,7 @@
}
void CallTest::RunBaseTest(BaseTest* test) {
- SendTask(RTC_FROM_HERE, &task_queue_, [this, test]() {
+ SendTask(RTC_FROM_HERE, task_queue(), [this, test]() {
num_video_streams_ = test->GetNumVideoStreams();
num_audio_streams_ = test->GetNumAudioStreams();
num_flexfec_streams_ = test->GetNumFlexfecStreams();
@@ -123,9 +125,9 @@
CreateReceiverCall(recv_config);
}
test->OnCallsCreated(sender_call_.get(), receiver_call_.get());
- receive_transport_ = test->CreateReceiveTransport(&task_queue_);
+ receive_transport_ = test->CreateReceiveTransport(task_queue());
send_transport_ =
- test->CreateSendTransport(&task_queue_, sender_call_.get());
+ test->CreateSendTransport(task_queue(), sender_call_.get());
if (test->ShouldCreateReceivers()) {
send_transport_->SetReceiver(receiver_call_->Receiver());
@@ -184,7 +186,7 @@
test->PerformTest();
- SendTask(RTC_FROM_HERE, &task_queue_, [this, test]() {
+ SendTask(RTC_FROM_HERE, task_queue(), [this, test]() {
Stop();
test->OnStreamsStopped();
DestroyStreams();