[cleanup] Return struct from VCMTiming::GetTimings

Cleans callers having to initialize TimeDeltas.

Change-Id: Ib00a59bedf05fb82c9fde1d9fdd1e341e2132cb8
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256360
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36292}
This commit is contained in:
Evan Shrubsole
2022-03-22 10:55:15 +01:00
committed by WebRTC LUCI CQ
parent 6ceb81f62b
commit 92e89d7f77
6 changed files with 36 additions and 66 deletions

View File

@ -596,17 +596,12 @@ void FrameBuffer::UpdateJitterDelay() {
if (!stats_callback_)
return;
TimeDelta max_decode = TimeDelta::Zero();
TimeDelta current_delay = TimeDelta::Zero();
TimeDelta target_delay = TimeDelta::Zero();
TimeDelta jitter_buffer = TimeDelta::Zero();
TimeDelta min_playout_delay = TimeDelta::Zero();
TimeDelta render_delay = TimeDelta::Zero();
if (timing_->GetTimings(&max_decode, &current_delay, &target_delay,
&jitter_buffer, &min_playout_delay, &render_delay)) {
auto timings = timing_->GetTimings();
if (timings.num_decoded_frames > 0) {
stats_callback_->OnFrameBufferTimingsUpdated(
max_decode.ms(), current_delay.ms(), target_delay.ms(),
jitter_buffer.ms(), min_playout_delay.ms(), render_delay.ms());
timings.max_decode_duration.ms(), timings.current_delay.ms(),
timings.target_delay.ms(), timings.jitter_buffer_delay.ms(),
timings.min_playout_delay.ms(), timings.render_delay.ms());
}
}