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

Unified Diff: media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java

Issue 2808073003: Image Capture: wire supported exposure/focus/white balance modes Android (Closed)
Patch Set: reillyg@ comments Created 3 years, 8 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 | media/capture/video/android/java/src/org/chromium/media/VideoCapture.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java
diff --git a/media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java b/media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java
index 890d581d3122bbb2ce0f7edb00bcda30cfb2727d..5b79a5cbe6d0d3a8e67316aac1a0a727969a213e 100644
--- a/media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java
+++ b/media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java
@@ -29,12 +29,15 @@ class PhotoCapabilities {
public final double currentZoom;
public final double stepZoom;
public final int focusMode;
+ public final int[] focusModes;
public final int exposureMode;
+ public final int[] exposureModes;
public final double maxExposureCompensation;
public final double minExposureCompensation;
public final double currentExposureCompensation;
public final double stepExposureCompensation;
public final int whiteBalanceMode;
+ public final int[] whiteBalanceModes;
public final int[] fillLightModes;
public final boolean supportsTorch;
public final boolean torch;
@@ -47,9 +50,10 @@ class PhotoCapabilities {
PhotoCapabilities(int maxIso, int minIso, int currentIso, int stepIso, int maxHeight,
int minHeight, int currentHeight, int stepHeight, int maxWidth, int minWidth,
int currentWidth, int stepWidth, double maxZoom, double minZoom, double currentZoom,
- double stepZoom, int focusMode, int exposureMode, double maxExposureCompensation,
- double minExposureCompensation, double currentExposureCompensation,
- double stepExposureCompensation, int whiteBalanceMode, int[] fillLightModes,
+ double stepZoom, int focusMode, int[] focusModes, int exposureMode, int[] exposureModes,
+ double maxExposureCompensation, double minExposureCompensation,
+ double currentExposureCompensation, double stepExposureCompensation,
+ int whiteBalanceMode, int[] whiteBalanceModes, int[] fillLightModes,
boolean supportsTorch, boolean torch, boolean redEyeReduction, int maxColorTemperature,
int minColorTemperature, int currentColorTemperature, int stepColorTemperature) {
this.maxIso = maxIso;
@@ -69,12 +73,15 @@ class PhotoCapabilities {
this.currentZoom = currentZoom;
this.stepZoom = stepZoom;
this.focusMode = focusMode;
+ this.focusModes = focusModes;
this.exposureMode = exposureMode;
+ this.exposureModes = exposureModes;
this.maxExposureCompensation = maxExposureCompensation;
this.minExposureCompensation = minExposureCompensation;
this.currentExposureCompensation = currentExposureCompensation;
this.stepExposureCompensation = stepExposureCompensation;
this.whiteBalanceMode = whiteBalanceMode;
+ this.whiteBalanceModes = whiteBalanceModes;
this.fillLightModes = fillLightModes;
this.supportsTorch = supportsTorch;
this.torch = torch;
@@ -171,11 +178,21 @@ class PhotoCapabilities {
}
@CalledByNative
+ public int[] getFocusModes() {
+ return focusModes != null ? focusModes.clone() : new int[0];
+ }
+
+ @CalledByNative
public int getExposureMode() {
return exposureMode;
}
@CalledByNative
+ public int[] getExposureModes() {
+ return exposureModes != null ? exposureModes.clone() : new int[0];
+ }
+
+ @CalledByNative
public double getMinExposureCompensation() {
return minExposureCompensation;
}
@@ -201,8 +218,13 @@ class PhotoCapabilities {
}
@CalledByNative
+ public int[] getWhiteBalanceModes() {
+ return whiteBalanceModes != null ? whiteBalanceModes.clone() : new int[0];
+ }
+
+ @CalledByNative
public int[] getFillLightModes() {
- return (fillLightModes != null) ? fillLightModes.clone() : new int[0];
+ return fillLightModes != null ? fillLightModes.clone() : new int[0];
}
@CalledByNative
@@ -258,12 +280,15 @@ class PhotoCapabilities {
public double currentZoom;
public double stepZoom;
public int focusMode;
+ public int[] focusModes;
public int exposureMode;
+ public int[] exposureModes;
public double maxExposureCompensation;
public double minExposureCompensation;
public double currentExposureCompensation;
public double stepExposureCompensation;
public int whiteBalanceMode;
+ public int[] whiteBalanceModes;
public int[] fillLightModes;
public boolean supportsTorch;
public boolean torch;
@@ -360,11 +385,21 @@ class PhotoCapabilities {
return this;
}
+ public Builder setFocusModes(int[] focusModes) {
+ this.focusModes = focusModes.clone();
+ return this;
+ }
+
public Builder setExposureMode(int exposureMode) {
this.exposureMode = exposureMode;
return this;
}
+ public Builder setExposureModes(int[] exposureModes) {
+ this.exposureModes = exposureModes.clone();
+ return this;
+ }
+
public Builder setMaxExposureCompensation(double maxExposureCompensation) {
this.maxExposureCompensation = maxExposureCompensation;
return this;
@@ -390,6 +425,11 @@ class PhotoCapabilities {
return this;
}
+ public Builder setWhiteBalanceModes(int[] whiteBalanceModes) {
+ this.whiteBalanceModes = whiteBalanceModes.clone();
+ return this;
+ }
+
public Builder setFillLightModes(int[] fillLightModes) {
this.fillLightModes = fillLightModes.clone();
return this;
@@ -433,11 +473,12 @@ class PhotoCapabilities {
public PhotoCapabilities build() {
return new PhotoCapabilities(maxIso, minIso, currentIso, stepIso, maxHeight, minHeight,
currentHeight, stepHeight, maxWidth, minWidth, currentWidth, stepWidth, maxZoom,
- minZoom, currentZoom, stepZoom, focusMode, exposureMode,
- maxExposureCompensation, minExposureCompensation, currentExposureCompensation,
- stepExposureCompensation, whiteBalanceMode, fillLightModes, supportsTorch,
- torch, redEyeReduction, maxColorTemperature, minColorTemperature,
- currentColorTemperature, stepColorTemperature);
+ minZoom, currentZoom, stepZoom, focusMode, focusModes, exposureMode,
+ exposureModes, maxExposureCompensation, minExposureCompensation,
+ currentExposureCompensation, stepExposureCompensation, whiteBalanceMode,
+ whiteBalanceModes, fillLightModes, supportsTorch, torch, redEyeReduction,
+ maxColorTemperature, minColorTemperature, currentColorTemperature,
+ stepColorTemperature);
}
}
}
« no previous file with comments | « no previous file | media/capture/video/android/java/src/org/chromium/media/VideoCapture.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698