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}
This commit is contained in:
parent
2dd3915284
commit
4c72f99d67
@ -106,7 +106,8 @@ void FrameBuffer::StartWaitForNextFrameOnQueue() {
|
|||||||
RTC_DCHECK(!callback_task_.Running());
|
RTC_DCHECK(!callback_task_.Running());
|
||||||
int64_t wait_ms = FindNextFrame(clock_->TimeInMilliseconds());
|
int64_t wait_ms = FindNextFrame(clock_->TimeInMilliseconds());
|
||||||
callback_task_ = RepeatingTaskHandle::DelayedStart(
|
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_);
|
RTC_DCHECK_RUN_ON(&callback_checker_);
|
||||||
// If this task has not been cancelled, we did not get any new frames
|
// If this task has not been cancelled, we did not get any new frames
|
||||||
// while waiting. Continue with frame delivery.
|
// while waiting. Continue with frame delivery.
|
||||||
@ -132,7 +133,8 @@ void FrameBuffer::StartWaitForNextFrameOnQueue() {
|
|||||||
// Deliver frame, if any. Otherwise signal timeout.
|
// Deliver frame, if any. Otherwise signal timeout.
|
||||||
frame_handler(std::move(frame));
|
frame_handler(std::move(frame));
|
||||||
return TimeDelta::Zero(); // Ignored.
|
return TimeDelta::Zero(); // Ignored.
|
||||||
});
|
},
|
||||||
|
TaskQueueBase::DelayPrecision::kHigh);
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t FrameBuffer::FindNextFrame(int64_t now_ms) {
|
int64_t FrameBuffer::FindNextFrame(int64_t now_ms) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user