PCLF: Pass all frames to OnFrameEncoded, even if discarded by SFU

If we don't pass the frames to OnFrameEncoded, we can't see the frames
being sent in the SVC tests. We want to check the frames even if the
SFU would discard them later.

Bug: webrtc:11607
Change-Id: I5b9c6a86c0966047efa7be088f90e83e01f7900b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273350
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38159}
This commit is contained in:
Florent Castelli 2022-08-30 18:56:45 +00:00 committed by WebRTC LUCI CQ
parent f7bc5429b8
commit 65ab3460f5

View File

@ -284,14 +284,10 @@ EncodedImageCallback::Result QualityAnalyzingVideoEncoder::OnEncodedImage(
delegate_->GetEncoderInfo().implementation_name; delegate_->GetEncoderInfo().implementation_name;
} }
if (!discard) {
// Analyzer should see only encoded images, that weren't discarded. But all
// not discarded layers have to be passed.
VideoQualityAnalyzerInterface::EncoderStats stats; VideoQualityAnalyzerInterface::EncoderStats stats;
stats.encoder_name = codec_name; stats.encoder_name = codec_name;
stats.target_encode_bitrate = target_encode_bitrate; stats.target_encode_bitrate = target_encode_bitrate;
analyzer_->OnFrameEncoded(peer_name_, frame_id, encoded_image, stats); analyzer_->OnFrameEncoded(peer_name_, frame_id, encoded_image, stats);
}
// Image data injector injects frame id and discard flag into provided // Image data injector injects frame id and discard flag into provided
// EncodedImage and returns the image with a) modified original buffer (in // EncodedImage and returns the image with a) modified original buffer (in