Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Unified Diff: webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc

Issue 2765243002: Delete RawVideoType enum, use the VideoType enum instead. (Closed)
Patch Set: Define constant webrtc::kI420, for backwards compatibility. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
diff --git a/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc b/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
index 315d347c69316a99ec4b5a7a2a77bd1a16a1d0cf..1a10ddfa62272d5d354c0f8866f772999f99218e 100644
--- a/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
+++ b/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
@@ -107,8 +107,8 @@ static void RtpFragmentize(EncodedImage* encoded_image,
// should be more than enough to hold any encoded data of future frames of
// the same size (avoiding possible future reallocation due to variations in
// required size).
- encoded_image->_size =
- CalcBufferSize(kI420, frame_buffer.width(), frame_buffer.height());
+ encoded_image->_size = CalcBufferSize(
+ VideoType::kI420, frame_buffer.width(), frame_buffer.height());
if (encoded_image->_size < required_size) {
// Encoded data > unencoded data. Allocate required bytes.
LOG(LS_WARNING) << "Encoding produced more bytes than the original image "
@@ -254,8 +254,8 @@ int32_t H264EncoderImpl::InitEncode(const VideoCodec* codec_settings,
&video_format);
// Initialize encoded image. Default buffer size: size of unencoded data.
- encoded_image_._size =
- CalcBufferSize(kI420, codec_settings->width, codec_settings->height);
+ encoded_image_._size = CalcBufferSize(VideoType::kI420, codec_settings->width,
+ codec_settings->height);
encoded_image_._buffer = new uint8_t[encoded_image_._size];
encoded_image_buffer_.reset(encoded_image_._buffer);
encoded_image_._completeFrame = true;
« no previous file with comments | « webrtc/modules/video_capture/windows/sink_filter_ds.cc ('k') | webrtc/modules/video_coding/codecs/i420/i420.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698