Don't store last rendered frame in DefaultVideoQualityAnalyzer
Bug: webrtc:10138 Change-Id: I1aec9b8e5abbc202cafcf7db74aba89182612308 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128578 Commit-Queue: Artem Titov <titovartem@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27183}
This commit is contained in:
parent
ded1e4ff28
commit
82b7ff5797
@ -105,8 +105,7 @@ uint16_t DefaultVideoQualityAnalyzer::OnFrameCaptured(
|
||||
state->frame_ids.pop_front();
|
||||
frame_counters_.dropped++;
|
||||
stream_frame_counters_[stream_label].dropped++;
|
||||
AddComparison(it->second, state->last_rendered_frame, true,
|
||||
stats_it->second);
|
||||
AddComparison(it->second, absl::nullopt, true, stats_it->second);
|
||||
|
||||
captured_frames_in_flight_.erase(it);
|
||||
frame_stats_.erase(stats_it);
|
||||
@ -221,7 +220,7 @@ void DefaultVideoQualityAnalyzer::OnFrameRendered(
|
||||
auto dropped_frame_it = captured_frames_in_flight_.find(dropped_frame_id);
|
||||
RTC_CHECK(dropped_frame_it != captured_frames_in_flight_.end());
|
||||
|
||||
AddComparison(dropped_frame_it->second, state->last_rendered_frame, true,
|
||||
AddComparison(dropped_frame_it->second, absl::nullopt, true,
|
||||
dropped_frame_stats_it->second);
|
||||
|
||||
frame_stats_.erase(dropped_frame_stats_it);
|
||||
@ -230,7 +229,6 @@ void DefaultVideoQualityAnalyzer::OnFrameRendered(
|
||||
RTC_DCHECK(!state->frame_ids.empty());
|
||||
state->frame_ids.pop_front();
|
||||
|
||||
state->last_rendered_frame = frame;
|
||||
if (state->last_rendered_frame_time) {
|
||||
frame_stats->prev_frame_rendered_time =
|
||||
state->last_rendered_frame_time.value();
|
||||
|
||||
@ -209,9 +209,7 @@ class DefaultVideoQualityAnalyzer : public VideoQualityAnalyzerInterface {
|
||||
// If we received frame with id frame_id3, then we will pop frame_id1 and
|
||||
// frame_id2 and consider that frames as dropped and then compare received
|
||||
// frame with the one from |captured_frames_in_flight_| with id frame_id3.
|
||||
// Also we will put it into the |last_rendered_frame|.
|
||||
std::deque<uint16_t> frame_ids;
|
||||
absl::optional<VideoFrame> last_rendered_frame = absl::nullopt;
|
||||
absl::optional<Timestamp> last_rendered_frame_time = absl::nullopt;
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user