[DVQA] Dont try to render a 'superfluous' frame.
Change-Id: I3427cecab30b1705e5fbec110494f58cb1c599b5 Bug: None Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/374861 Commit-Queue: Jeremy Leconte <jleconte@webrtc.org> Reviewed-by: Artem Titov <titovartem@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/main@{#43778}
This commit is contained in:
parent
283a84d92a
commit
a6bccab358
@ -503,7 +503,8 @@ void DefaultVideoQualityAnalyzer::OnFrameRendered(
|
||||
auto frame_it = captured_frames_in_flight_.find(frame.id());
|
||||
if (frame_it == captured_frames_in_flight_.end() ||
|
||||
frame_it->second.HasRenderedTime(peer_index) ||
|
||||
frame_it->second.IsDropped(peer_index)) {
|
||||
frame_it->second.IsDropped(peer_index) ||
|
||||
frame_it->second.IsSuperfluous(peer_index)) {
|
||||
// It means this frame was rendered or dropped before, so we can skip it.
|
||||
// It may happen when we have multiple simulcast streams in one track and
|
||||
// received the same frame from two different streams because SFU can't
|
||||
@ -514,7 +515,8 @@ void DefaultVideoQualityAnalyzer::OnFrameRendered(
|
||||
if (frame_it != captured_frames_in_flight_.end()) {
|
||||
if (frame_it->second.HasRenderedTime(peer_index)) {
|
||||
reason = kSkipRenderedFrameReasonRendered;
|
||||
} else if (frame_it->second.IsDropped(peer_index)) {
|
||||
} else if (frame_it->second.IsDropped(peer_index) ||
|
||||
frame_it->second.IsSuperfluous(peer_index)) {
|
||||
reason = kSkipRenderedFrameReasonDropped;
|
||||
}
|
||||
}
|
||||
|
||||
@ -138,6 +138,7 @@ class FrameInFlight {
|
||||
void MarkSuperfluous(size_t peer) {
|
||||
receiver_stats_[peer].superfluous = true;
|
||||
}
|
||||
bool IsSuperfluous(size_t peer) const;
|
||||
|
||||
void SetPrevFrameRenderedTime(size_t peer, webrtc::Timestamp time) {
|
||||
receiver_stats_[peer].prev_frame_rendered_time = time;
|
||||
@ -150,8 +151,6 @@ class FrameInFlight {
|
||||
FrameStats GetStatsForPeer(size_t peer) const;
|
||||
|
||||
private:
|
||||
bool IsSuperfluous(size_t peer) const;
|
||||
|
||||
const size_t stream_;
|
||||
// Set of peer's indexes who are expected to receive this frame. This is not
|
||||
// the set of peer's indexes that received the frame. For example, if peer A
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user