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

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

Issue 2071213003: Allow disabling capture to texture on Camera1Enumerator using constructor parameter. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Changes according to magjed's comments #1 Created 4 years, 6 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/Camera1Enumerator.java
diff --git a/webrtc/api/java/android/org/webrtc/Camera1Enumerator.java b/webrtc/api/java/android/org/webrtc/Camera1Enumerator.java
index 13a5237074f4f8c72b85f58e3d9e71ab46ab8258..a021da2dd67c7f972ab1b8ed44742518bc704197 100644
--- a/webrtc/api/java/android/org/webrtc/Camera1Enumerator.java
+++ b/webrtc/api/java/android/org/webrtc/Camera1Enumerator.java
@@ -25,6 +25,15 @@ public class Camera1Enumerator implements CameraEnumerator {
// reference.
private static List<List<CaptureFormat>> cachedSupportedFormats;
+ private final boolean captureToTexture;
+
+ Camera1Enumerator() {
+ this(true /* captureToTexture */);
+ }
+
+ Camera1Enumerator(boolean captureToTexture) {
+ this.captureToTexture = captureToTexture;
+ }
public boolean isFrontFacing(String deviceName) {
android.hardware.Camera.CameraInfo info = getCameraInfo(getCameraIndex(deviceName));
@@ -38,7 +47,7 @@ public class Camera1Enumerator implements CameraEnumerator {
public CameraVideoCapturer createCapturer(String deviceName,
CameraVideoCapturer.CameraEventsHandler eventsHandler) {
- return new VideoCapturerAndroid(deviceName, eventsHandler, true);
+ return new VideoCapturerAndroid(deviceName, eventsHandler, captureToTexture);
}
private static android.hardware.Camera.CameraInfo getCameraInfo(int index) {
« 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