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

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

Issue 1963413004: Reland of Delete webrtc::VideoFrame methods buffer and stride. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 4 years, 7 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 3eeb6525542f8edb36bc125461aa26018b6c7352..4d85858a1621aa211eddd4b074365d893f0e58f4 100644
--- a/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
+++ b/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
@@ -367,12 +367,12 @@ int32_t H264EncoderImpl::Encode(
picture.iPicHeight = frame.height();
picture.iColorFormat = EVideoFormatType::videoFormatI420;
picture.uiTimeStamp = frame.ntp_time_ms();
- picture.iStride[0] = frame.stride(kYPlane);
- picture.iStride[1] = frame.stride(kUPlane);
- picture.iStride[2] = frame.stride(kVPlane);
- picture.pData[0] = const_cast<uint8_t*>(frame.buffer(kYPlane));
- picture.pData[1] = const_cast<uint8_t*>(frame.buffer(kUPlane));
- picture.pData[2] = const_cast<uint8_t*>(frame.buffer(kVPlane));
+ picture.iStride[0] = frame.video_frame_buffer()->StrideY();
+ picture.iStride[1] = frame.video_frame_buffer()->StrideU();
+ picture.iStride[2] = frame.video_frame_buffer()->StrideV();
+ picture.pData[0] = const_cast<uint8_t*>(frame.video_frame_buffer()->DataY());
+ picture.pData[1] = const_cast<uint8_t*>(frame.video_frame_buffer()->DataU());
+ picture.pData[2] = const_cast<uint8_t*>(frame.video_frame_buffer()->DataV());
// EncodeFrame output.
SFrameBSInfo info;

Powered by Google App Engine
This is Rietveld 408576698