From 4c72f99d6717e90b576fe13237ec6e0b6db0ef09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Bostr=C3=B6m?= Date: Tue, 25 Jan 2022 08:15:50 +0100 Subject: [PATCH] FrameBuffer2: Specify high precision repeated tasks. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This unblocks lowering the precision of low precision tasks which are the default. Bug: webrtc:13604 Change-Id: Icd663cbbf5b0bf87ac83a4a0abd58699e6e27e8f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/248862 Reviewed-by: Ilya Nikolaevskiy Commit-Queue: Henrik Boström Cr-Commit-Position: refs/heads/main@{#35782} --- modules/video_coding/frame_buffer2.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/video_coding/frame_buffer2.cc b/modules/video_coding/frame_buffer2.cc index b427b3d3f1..b15db96364 100644 --- a/modules/video_coding/frame_buffer2.cc +++ b/modules/video_coding/frame_buffer2.cc @@ -106,7 +106,8 @@ void FrameBuffer::StartWaitForNextFrameOnQueue() { RTC_DCHECK(!callback_task_.Running()); int64_t wait_ms = FindNextFrame(clock_->TimeInMilliseconds()); callback_task_ = RepeatingTaskHandle::DelayedStart( - callback_queue_->Get(), TimeDelta::Millis(wait_ms), [this] { + callback_queue_->Get(), TimeDelta::Millis(wait_ms), + [this] { RTC_DCHECK_RUN_ON(&callback_checker_); // If this task has not been cancelled, we did not get any new frames // while waiting. Continue with frame delivery. @@ -132,7 +133,8 @@ void FrameBuffer::StartWaitForNextFrameOnQueue() { // Deliver frame, if any. Otherwise signal timeout. frame_handler(std::move(frame)); return TimeDelta::Zero(); // Ignored. - }); + }, + TaskQueueBase::DelayPrecision::kHigh); } int64_t FrameBuffer::FindNextFrame(int64_t now_ms) {