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

Unified Diff: webrtc/api/java/android/org/webrtc/VideoCapturerAndroid.java

Issue 1970713002: VideoCapturerAndroid: Ignore transform matrix from SurfaceTexture and calculate it manually instead (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/java/android/org/webrtc/VideoCapturerAndroid.java
diff --git a/webrtc/api/java/android/org/webrtc/VideoCapturerAndroid.java b/webrtc/api/java/android/org/webrtc/VideoCapturerAndroid.java
index 39ed12cfa3d2708c9b0ee74c3724a0d707154ad7..bf3f5aba8e5cbbd3807cc186ae11ba5329d47e01 100644
--- a/webrtc/api/java/android/org/webrtc/VideoCapturerAndroid.java
+++ b/webrtc/api/java/android/org/webrtc/VideoCapturerAndroid.java
@@ -738,15 +738,10 @@ public class VideoCapturerAndroid implements
firstFrameReported = true;
}
- int rotation = getFrameOrientation();
- if (info.facing == android.hardware.Camera.CameraInfo.CAMERA_FACING_FRONT) {
- // Undo the mirror that the OS "helps" us with.
- // http://developer.android.com/reference/android/hardware/Camera.html#setDisplayOrientation(int)
- transformMatrix =
- RendererCommon.multiplyMatrices(transformMatrix, RendererCommon.horizontalFlipMatrix());
- }
cameraStatistics.addFrame();
+ // Don't pay any attention to transformMatrix - use a hardcoded vertical flip as transform and
+ // calculate rotation manually using sensor and device orientation.
frameObserver.onTextureFrameCaptured(captureFormat.width, captureFormat.height, oesTextureId,
- transformMatrix, rotation, timestampNs);
+ RendererCommon.verticalFlipMatrix(), getFrameOrientation(), timestampNs);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698