VideoStreamEncoder: exclude screencast from capture time measurement.
This CL avoids measurement for screencast encoding work. The reason is screencast can cling on to and re-encode old video frames for which webrtc::VideoFrame::reference_time() is unchanged. Bug: chromium:1498378 Change-Id: I5bf79d29ef7f57ddff2622cbb6c3436480bd16ba Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/326103 Commit-Queue: Markus Handell <handellm@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Auto-Submit: Markus Handell <handellm@webrtc.org> Cr-Commit-Position: refs/heads/main@{#41097}
This commit is contained in:
parent
03457f6891
commit
03bc3a0fa6
@ -2065,8 +2065,11 @@ void VideoStreamEncoder::EncodeVideoFrame(const VideoFrame& video_frame,
|
|||||||
|
|
||||||
frame_encode_metadata_writer_.OnEncodeStarted(out_frame);
|
frame_encode_metadata_writer_.OnEncodeStarted(out_frame);
|
||||||
|
|
||||||
|
if (encoder_config_.content_type !=
|
||||||
|
VideoEncoderConfig::ContentType::kScreen) {
|
||||||
CaptureProcessingDurationMeasurement::AttachToCurrentVoucher(
|
CaptureProcessingDurationMeasurement::AttachToCurrentVoucher(
|
||||||
out_frame.reference_time().value_or(clock_->CurrentTime()));
|
out_frame.reference_time().value_or(clock_->CurrentTime()));
|
||||||
|
}
|
||||||
|
|
||||||
const int32_t encode_status = encoder_->Encode(out_frame, &next_frame_types_);
|
const int32_t encode_status = encoder_->Encode(out_frame, &next_frame_types_);
|
||||||
was_encode_called_since_last_initialization_ = true;
|
was_encode_called_since_last_initialization_ = true;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user