With the standard encoding pipeline, the scheduler may start capturing
a new frame before the current frame has been encoded and sent. This
means that storing the stats in WebrtcVideoStream::current_frame_stats_
is inadequate. This CL enables the frame stats to be attached to each
frame, before sending it to WebRTC's output sink. The stats will be
extracted from the frame by the new encoder, then re-attached to the
corresponding EncodedFrame after encoding.
In the current legacy code, the stats are attached manually in
WebrtcVideoStream::OnFrameEncoded(). In the new code, the stats
will be attached in WebrtcVideoStream::OnCapturedFrame().
Because the stats are attached via std::unique_ptr, this CL makes
EncodedFrame into a movable-but-not-copyable type, which makes
sense anyway since the frame data can be very large.
Bug: 1192865
Change-Id: Ie8eaa03e0912009d407eafca2f90de92a1f52845
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2911526
Commit-Queue: Lambros Lambrou <lambroslambrou@chromium.org>
Reviewed-by: Joe Downing <joedow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#886533}