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

Unified Diff: talk/app/webrtc/androidvideocapturer.cc

Issue 1493913007: VideoCapturerAndroid, handle cvo correctly (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: fixed tests. Cleaned up Created 5 years 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: talk/app/webrtc/androidvideocapturer.cc
diff --git a/talk/app/webrtc/androidvideocapturer.cc b/talk/app/webrtc/androidvideocapturer.cc
index c4c5a480b4f759253d7062f0f2c8e671540259ca..cb82b98e328f442fdc0411b02f69f345405c78d5 100644
--- a/talk/app/webrtc/androidvideocapturer.cc
+++ b/talk/app/webrtc/androidvideocapturer.cc
@@ -104,10 +104,13 @@ class AndroidVideoCapturer::FrameFactory : public cricket::VideoFrameFactory {
if (buffer_->native_handle() != nullptr) {
rtc::scoped_refptr<webrtc::VideoFrameBuffer> scaled_buffer(
static_cast<webrtc_jni::AndroidTextureBuffer*>(buffer_.get())
- ->CropAndScale(cropped_input_width, cropped_input_height,
- output_width, output_height));
+ ->CropScaleAndRotate(cropped_input_width, cropped_input_height,
+ output_width, output_height,
+ apply_rotation_ ? input_frame->rotation :
+ webrtc::kVideoRotation_0));
return new cricket::WebRtcVideoFrame(
- scaled_buffer, input_frame->time_stamp, input_frame->rotation);
+ scaled_buffer, input_frame->time_stamp,
+ apply_rotation_ ? webrtc::kVideoRotation_0 : input_frame->rotation);
}
return VideoFrameFactory::CreateAliasedFrame(input_frame,
cropped_input_width,

Powered by Google App Engine
This is Rietveld 408576698