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

Unified Diff: webrtc/media/engine/webrtcvideoframe.cc

Issue 1838353004: cricket::VideoFrame cleanup. New width() and height(). Deleted GetChroma* methods. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: TODO comments. Formatting tweak. Created 4 years, 9 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
« no previous file with comments | « webrtc/media/engine/webrtcvideoframe.h ('k') | webrtc/media/engine/webrtcvideoframe_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/webrtcvideoframe.cc
diff --git a/webrtc/media/engine/webrtcvideoframe.cc b/webrtc/media/engine/webrtcvideoframe.cc
index 61a561f47a30c970d3480bbbeac5b984b45db75f..a0907b33aabadea1d90f4a4b55b9cb605ab46d18 100644
--- a/webrtc/media/engine/webrtcvideoframe.cc
+++ b/webrtc/media/engine/webrtcvideoframe.cc
@@ -65,11 +65,11 @@ bool WebRtcVideoFrame::InitToBlack(int w, int h,
return SetToBlack();
}
-size_t WebRtcVideoFrame::GetWidth() const {
+int WebRtcVideoFrame::width() const {
return video_frame_buffer_ ? video_frame_buffer_->width() : 0;
}
-size_t WebRtcVideoFrame::GetHeight() const {
+int WebRtcVideoFrame::height() const {
return video_frame_buffer_ ? video_frame_buffer_->height() : 0;
}
@@ -250,15 +250,15 @@ const VideoFrame* WebRtcVideoFrame::GetCopyWithRotationApplied() const {
return rotated_frame_.get();
}
- int width = static_cast<int>(GetWidth());
- int height = static_cast<int>(GetHeight());
+ int orig_width = width();
+ int orig_height = height();
- int rotated_width = width;
- int rotated_height = height;
+ int rotated_width = orig_width;
+ int rotated_height = orig_height;
if (GetVideoRotation() == webrtc::kVideoRotation_90 ||
GetVideoRotation() == webrtc::kVideoRotation_270) {
- rotated_width = height;
- rotated_height = width;
+ rotated_width = orig_height;
+ rotated_height = orig_width;
}
rotated_frame_.reset(CreateEmptyFrame(rotated_width, rotated_height,
@@ -270,7 +270,8 @@ const VideoFrame* WebRtcVideoFrame::GetCopyWithRotationApplied() const {
GetYPlane(), GetYPitch(), GetUPlane(), GetUPitch(), GetVPlane(),
GetVPitch(), rotated_frame_->GetYPlane(), rotated_frame_->GetYPitch(),
rotated_frame_->GetUPlane(), rotated_frame_->GetUPitch(),
- rotated_frame_->GetVPlane(), rotated_frame_->GetVPitch(), width, height,
+ rotated_frame_->GetVPlane(), rotated_frame_->GetVPitch(),
+ orig_width, orig_height,
static_cast<libyuv::RotationMode>(GetVideoRotation()));
if (ret == 0) {
return rotated_frame_.get();
« no previous file with comments | « webrtc/media/engine/webrtcvideoframe.h ('k') | webrtc/media/engine/webrtcvideoframe_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698