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..326ce1cacb3d7d76d29a142f2537f16df974f271 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]; |
Reilly Grant (use Gerrit)
2017/04/10 18:01:48
nit: parenthesis are not needed here (and below) b
mcasas
2017/04/10 19:53:37
Done.
|
+ } |
+ |
+ @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,6 +218,11 @@ 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]; |
} |
@@ -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); |
} |
} |
} |