Propagate VideoFrame::UpdateRect to encoder

Accumulate it in all places where frames can be dropped before they reach
the encoder.

Reset UpdateRect in VideoBroadcaster if frame the previous frame is dropped.
No accumulation is done here since it's supposed to be a brief occusion then
configuration have changed.

Bug: webrtc:10310
Change-Id: I2813ecd009eb730bd99ffa0a02f979091b56bf80
Reviewed-on: https://webrtc-review.googlesource.com/c/123102
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26711}
This commit is contained in:
Ilya Nikolaevskiy
2019-02-15 15:31:33 +01:00
committed by Commit Bot
parent 3a656d14dc
commit efa72a1312
9 changed files with 197 additions and 0 deletions

View File

@ -199,6 +199,10 @@ int32_t VideoSender::AddVideoFrame(
RTC_LOG(LS_ERROR) << "Frame conversion failed, dropping frame.";
return VCM_PARAMETER_ERROR;
}
// UpdatedRect is not propagated because buffer was converted,
// therefore we can't guarantee that pixels outside of UpdateRect didn't
// change comparing to the previous frame.
converted_frame = VideoFrame::Builder()
.set_video_frame_buffer(converted_buffer)
.set_timestamp_rtp(converted_frame.timestamp())