New interface EncodedImageBufferInterface, replacing use of CopyOnWriteBuffer

Bug: webrtc:9378
Change-Id: I62b7adbd9dd539c545b5b1b1520721482a4623c4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138820
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28317}
This commit is contained in:
Niels Möller
2019-06-18 15:56:56 +02:00
committed by Commit Bot
parent 0894f0fd76
commit 4d504c76cb
27 changed files with 215 additions and 134 deletions

View File

@ -162,9 +162,9 @@ void VCMEncodedFrame::CopyCodecSpecific(const RTPVideoHeader* header) {
void VCMEncodedFrame::VerifyAndAllocate(size_t minimumSize) {
size_t old_capacity = capacity();
if (minimumSize > old_capacity) {
// TODO(nisse): EncodedImage::Allocate is implemented as
// std::vector::resize, which means that old contents is kept. Find out if
// any code depends on that behavior.
// TODO(nisse): EncodedImage::Allocate is implemented as a realloc
// operation, and is deprecated. Refactor to use EncodedImageBuffer::Realloc
// instead.
Allocate(minimumSize);
}
}