Convert all webrtc code to not access EncodedImage::_size directly.

Read using capacity() method, write using set_buffer() method. This is
a preparation for making the member private, and renaming it to
capacity_.

Bug: webrtc:9378
Change-Id: I2f96679d052a83fe81be40301bd9863c87074640
Reviewed-on: https://webrtc-review.googlesource.com/c/113520
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25934}
This commit is contained in:
Niels Möller
2018-12-07 16:21:18 +01:00
committed by Commit Bot
parent 60d770f2ef
commit 48a79465ec
12 changed files with 74 additions and 75 deletions

View File

@ -647,7 +647,7 @@ TEST_P(TestPacketBufferH264Parameterized, GetBitstreamBufferPadding) {
ASSERT_EQ(1UL, frames_from_callback_.size());
EXPECT_EQ(frames_from_callback_[seq_num]->EncodedImage()._length,
sizeof(data_data));
EXPECT_EQ(frames_from_callback_[seq_num]->EncodedImage()._size,
EXPECT_EQ(frames_from_callback_[seq_num]->EncodedImage().capacity(),
sizeof(data_data) + EncodedImage::kBufferPaddingBytesH264);
EXPECT_EQ(
memcmp(frames_from_callback_[seq_num]->Buffer(), data, sizeof(data_data)),