Revert "Delete rtc::TaskQueue::Current in favor of webrtc::TaskQueueBase::Current"
This reverts commit 304e9d2df347630d71fd4423f5971f30dac73e41. Reason for revert: Breaks downstream projects. Seems to make VideoSendStreamTest.SupportsFlexfecSimulcastVp8 flaky. Original change's description: > Delete rtc::TaskQueue::Current in favor of webrtc::TaskQueueBase::Current > > Bug: webrtc:10191 > Change-Id: I506cc50a90c73a6a4f6a3de36de0999cca72f5ba > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126230 > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> > Commit-Queue: Danil Chapovalov <danilchap@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#27035} TBR=danilchap@webrtc.org,kwiberg@webrtc.org Change-Id: If98324f88e4b3d18bf2fe33597dfb9711867c243 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: webrtc:10191 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126484 Reviewed-by: Yves Gerey <yvesg@webrtc.org> Commit-Queue: Yves Gerey <yvesg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27041}
This commit is contained in:
@ -31,7 +31,6 @@
|
||||
#include "modules/video_coding/codecs/interface/common_constants.h"
|
||||
#include "modules/video_coding/include/video_error_codes.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/task_utils/to_queued_task.h"
|
||||
#include "rtc_base/time_utils.h"
|
||||
#include "test/gtest.h"
|
||||
#include "third_party/libyuv/include/libyuv/compare.h"
|
||||
@ -192,7 +191,7 @@ VideoProcessor::VideoProcessor(webrtc::VideoEncoder* encoder,
|
||||
decoded_frame_buffer_(num_simulcast_or_spatial_layers_),
|
||||
post_encode_time_ns_(0) {
|
||||
// Sanity checks.
|
||||
RTC_CHECK(TaskQueueBase::Current())
|
||||
RTC_CHECK(rtc::TaskQueue::Current())
|
||||
<< "VideoProcessor must be run on a task queue.";
|
||||
RTC_CHECK(encoder);
|
||||
RTC_CHECK(decoders);
|
||||
@ -322,9 +321,9 @@ int32_t VideoProcessor::VideoProcessorDecodeCompleteCallback::Decoded(
|
||||
.build();
|
||||
copy.set_timestamp(image.timestamp());
|
||||
|
||||
task_queue_->PostTask(ToQueuedTask([this, copy]() {
|
||||
task_queue_->PostTask([this, copy]() {
|
||||
video_processor_->FrameDecoded(copy, simulcast_svc_idx_);
|
||||
}));
|
||||
});
|
||||
return 0;
|
||||
}
|
||||
video_processor_->FrameDecoded(image, simulcast_svc_idx_);
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include <vector>
|
||||
|
||||
#include "absl/types/optional.h"
|
||||
#include "api/task_queue/task_queue_base.h"
|
||||
#include "api/test/videocodec_test_fixture.h"
|
||||
#include "api/test/videocodec_test_stats.h"
|
||||
#include "api/video/encoded_image.h"
|
||||
@ -80,7 +79,7 @@ class VideoProcessor {
|
||||
explicit VideoProcessorEncodeCompleteCallback(
|
||||
VideoProcessor* video_processor)
|
||||
: video_processor_(video_processor),
|
||||
task_queue_(TaskQueueBase::Current()) {
|
||||
task_queue_(rtc::TaskQueue::Current()) {
|
||||
RTC_DCHECK(video_processor_);
|
||||
RTC_DCHECK(task_queue_);
|
||||
}
|
||||
@ -127,7 +126,7 @@ class VideoProcessor {
|
||||
};
|
||||
|
||||
VideoProcessor* const video_processor_;
|
||||
TaskQueueBase* const task_queue_;
|
||||
rtc::TaskQueue* const task_queue_;
|
||||
};
|
||||
|
||||
class VideoProcessorDecodeCompleteCallback
|
||||
@ -138,7 +137,7 @@ class VideoProcessor {
|
||||
size_t simulcast_svc_idx)
|
||||
: video_processor_(video_processor),
|
||||
simulcast_svc_idx_(simulcast_svc_idx),
|
||||
task_queue_(TaskQueueBase::Current()) {
|
||||
task_queue_(rtc::TaskQueue::Current()) {
|
||||
RTC_DCHECK(video_processor_);
|
||||
RTC_DCHECK(task_queue_);
|
||||
}
|
||||
@ -159,7 +158,7 @@ class VideoProcessor {
|
||||
private:
|
||||
VideoProcessor* const video_processor_;
|
||||
const size_t simulcast_svc_idx_;
|
||||
TaskQueueBase* const task_queue_;
|
||||
rtc::TaskQueue* const task_queue_;
|
||||
};
|
||||
|
||||
// Invoked by the callback adapter when a frame has completed encoding.
|
||||
|
Reference in New Issue
Block a user