FrameBuffer2: Specify high precision repeated tasks.
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 <ilnik@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35782}
diff --git a/modules/video_coding/frame_buffer2.cc b/modules/video_coding/frame_buffer2.cc
index b427b3d..b15db96 100644
--- a/modules/video_coding/frame_buffer2.cc
+++ b/modules/video_coding/frame_buffer2.cc
@@ -106,7 +106,8 @@
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 @@
// 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) {