Don't include duplicated and incomplete frames in stats.

The received frames statistics currently include also frames
that are dropped because they are duplicated, incomplete, or
the buffer being full. After this CL only frames that are
added to the decode queue are counted.

This CL is part of fixing the dropped frames statistics that
are currently also counting frames that are in the decode
queue.

Bug: chromium:990317
Change-Id: I7df31939ecb7b9e222086e1141a15420fa2819dc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150108
Commit-Queue: Johannes Kron <kron@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28939}
This commit is contained in:
Johannes Kron
2019-08-22 13:16:44 +02:00
committed by Commit Bot
parent d47941e018
commit b88b44e7a4

View File

@ -453,12 +453,7 @@ int64_t FrameBuffer::InsertFrame(std::unique_ptr<EncodedFrame> frame) {
rtc::CritScope lock(&crit_); rtc::CritScope lock(&crit_);
if (stats_callback_ && IsCompleteSuperFrame(*frame)) {
stats_callback_->OnCompleteFrame(frame->is_keyframe(), frame->size(),
frame->contentType());
}
const VideoLayerFrameId& id = frame->id; const VideoLayerFrameId& id = frame->id;
int64_t last_continuous_picture_id = int64_t last_continuous_picture_id =
!last_continuous_frame_ ? -1 : last_continuous_frame_->picture_id; !last_continuous_frame_ ? -1 : last_continuous_frame_->picture_id;
@ -542,6 +537,11 @@ int64_t FrameBuffer::InsertFrame(std::unique_ptr<EncodedFrame> frame) {
if (!frame->delayed_by_retransmission()) if (!frame->delayed_by_retransmission())
timing_->IncomingTimestamp(frame->Timestamp(), frame->ReceivedTime()); timing_->IncomingTimestamp(frame->Timestamp(), frame->ReceivedTime());
if (stats_callback_ && IsCompleteSuperFrame(*frame)) {
stats_callback_->OnCompleteFrame(frame->is_keyframe(), frame->size(),
frame->contentType());
}
info->second.frame = std::move(frame); info->second.frame = std::move(frame);
if (info->second.num_missing_continuous == 0) { if (info->second.num_missing_continuous == 0) {