OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.media; | 5 package org.chromium.media; |
6 | 6 |
7 import org.chromium.base.annotations.CalledByNative; | 7 import org.chromium.base.annotations.CalledByNative; |
8 import org.chromium.base.annotations.JNINamespace; | 8 import org.chromium.base.annotations.JNINamespace; |
9 | 9 |
10 /** | 10 /** |
(...skipping 18 matching lines...) Expand all Loading... |
29 public final double currentZoom; | 29 public final double currentZoom; |
30 public final double stepZoom; | 30 public final double stepZoom; |
31 public final int focusMode; | 31 public final int focusMode; |
32 public final int exposureMode; | 32 public final int exposureMode; |
33 public final double maxExposureCompensation; | 33 public final double maxExposureCompensation; |
34 public final double minExposureCompensation; | 34 public final double minExposureCompensation; |
35 public final double currentExposureCompensation; | 35 public final double currentExposureCompensation; |
36 public final double stepExposureCompensation; | 36 public final double stepExposureCompensation; |
37 public final int whiteBalanceMode; | 37 public final int whiteBalanceMode; |
38 public final int[] fillLightModes; | 38 public final int[] fillLightModes; |
| 39 public final boolean supportsTorch; |
39 public final boolean torch; | 40 public final boolean torch; |
40 public final boolean redEyeReduction; | 41 public final boolean redEyeReduction; |
41 public final int maxColorTemperature; | 42 public final int maxColorTemperature; |
42 public final int minColorTemperature; | 43 public final int minColorTemperature; |
43 public final int currentColorTemperature; | 44 public final int currentColorTemperature; |
44 public final int stepColorTemperature; | 45 public final int stepColorTemperature; |
45 | 46 |
46 PhotoCapabilities(int maxIso, int minIso, int currentIso, int stepIso, int m
axHeight, | 47 PhotoCapabilities(int maxIso, int minIso, int currentIso, int stepIso, int m
axHeight, |
47 int minHeight, int currentHeight, int stepHeight, int maxWidth, int
minWidth, | 48 int minHeight, int currentHeight, int stepHeight, int maxWidth, int
minWidth, |
48 int currentWidth, int stepWidth, double maxZoom, double minZoom, dou
ble currentZoom, | 49 int currentWidth, int stepWidth, double maxZoom, double minZoom, dou
ble currentZoom, |
49 double stepZoom, int focusMode, int exposureMode, double maxExposure
Compensation, | 50 double stepZoom, int focusMode, int exposureMode, double maxExposure
Compensation, |
50 double minExposureCompensation, double currentExposureCompensation, | 51 double minExposureCompensation, double currentExposureCompensation, |
51 double stepExposureCompensation, int whiteBalanceMode, int[] fillLig
htModes, | 52 double stepExposureCompensation, int whiteBalanceMode, int[] fillLig
htModes, |
52 boolean torch, boolean redEyeReduction, int maxColorTemperature, | 53 boolean supportsTorch, boolean torch, boolean redEyeReduction, int m
axColorTemperature, |
53 int minColorTemperature, int currentColorTemperature, int stepColorT
emperature) { | 54 int minColorTemperature, int currentColorTemperature, int stepColorT
emperature) { |
54 this.maxIso = maxIso; | 55 this.maxIso = maxIso; |
55 this.minIso = minIso; | 56 this.minIso = minIso; |
56 this.currentIso = currentIso; | 57 this.currentIso = currentIso; |
57 this.stepIso = stepIso; | 58 this.stepIso = stepIso; |
58 this.maxHeight = maxHeight; | 59 this.maxHeight = maxHeight; |
59 this.minHeight = minHeight; | 60 this.minHeight = minHeight; |
60 this.currentHeight = currentHeight; | 61 this.currentHeight = currentHeight; |
61 this.stepHeight = stepHeight; | 62 this.stepHeight = stepHeight; |
62 this.maxWidth = maxWidth; | 63 this.maxWidth = maxWidth; |
63 this.minWidth = minWidth; | 64 this.minWidth = minWidth; |
64 this.currentWidth = currentWidth; | 65 this.currentWidth = currentWidth; |
65 this.stepWidth = stepWidth; | 66 this.stepWidth = stepWidth; |
66 this.maxZoom = maxZoom; | 67 this.maxZoom = maxZoom; |
67 this.minZoom = minZoom; | 68 this.minZoom = minZoom; |
68 this.currentZoom = currentZoom; | 69 this.currentZoom = currentZoom; |
69 this.stepZoom = stepZoom; | 70 this.stepZoom = stepZoom; |
70 this.focusMode = focusMode; | 71 this.focusMode = focusMode; |
71 this.exposureMode = exposureMode; | 72 this.exposureMode = exposureMode; |
72 this.maxExposureCompensation = maxExposureCompensation; | 73 this.maxExposureCompensation = maxExposureCompensation; |
73 this.minExposureCompensation = minExposureCompensation; | 74 this.minExposureCompensation = minExposureCompensation; |
74 this.currentExposureCompensation = currentExposureCompensation; | 75 this.currentExposureCompensation = currentExposureCompensation; |
75 this.stepExposureCompensation = stepExposureCompensation; | 76 this.stepExposureCompensation = stepExposureCompensation; |
76 this.whiteBalanceMode = whiteBalanceMode; | 77 this.whiteBalanceMode = whiteBalanceMode; |
77 this.fillLightModes = fillLightModes; | 78 this.fillLightModes = fillLightModes; |
| 79 this.supportsTorch = supportsTorch; |
78 this.torch = torch; | 80 this.torch = torch; |
79 this.redEyeReduction = redEyeReduction; | 81 this.redEyeReduction = redEyeReduction; |
80 this.maxColorTemperature = maxColorTemperature; | 82 this.maxColorTemperature = maxColorTemperature; |
81 this.minColorTemperature = minColorTemperature; | 83 this.minColorTemperature = minColorTemperature; |
82 this.currentColorTemperature = currentColorTemperature; | 84 this.currentColorTemperature = currentColorTemperature; |
83 this.stepColorTemperature = stepColorTemperature; | 85 this.stepColorTemperature = stepColorTemperature; |
84 } | 86 } |
85 | 87 |
86 @CalledByNative | 88 @CalledByNative |
87 public int getMinIso() { | 89 public int getMinIso() { |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 public int getWhiteBalanceMode() { | 199 public int getWhiteBalanceMode() { |
198 return whiteBalanceMode; | 200 return whiteBalanceMode; |
199 } | 201 } |
200 | 202 |
201 @CalledByNative | 203 @CalledByNative |
202 public int[] getFillLightModes() { | 204 public int[] getFillLightModes() { |
203 return (fillLightModes != null) ? fillLightModes.clone() : new int[0]; | 205 return (fillLightModes != null) ? fillLightModes.clone() : new int[0]; |
204 } | 206 } |
205 | 207 |
206 @CalledByNative | 208 @CalledByNative |
| 209 public boolean getSupportsTorch() { |
| 210 return supportsTorch; |
| 211 } |
| 212 |
| 213 @CalledByNative |
207 public boolean getTorch() { | 214 public boolean getTorch() { |
208 return torch; | 215 return torch; |
209 } | 216 } |
210 | 217 |
211 @CalledByNative | 218 @CalledByNative |
212 public boolean getRedEyeReduction() { | 219 public boolean getRedEyeReduction() { |
213 return redEyeReduction; | 220 return redEyeReduction; |
214 } | 221 } |
215 | 222 |
216 @CalledByNative | 223 @CalledByNative |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 public double currentZoom; | 258 public double currentZoom; |
252 public double stepZoom; | 259 public double stepZoom; |
253 public int focusMode; | 260 public int focusMode; |
254 public int exposureMode; | 261 public int exposureMode; |
255 public double maxExposureCompensation; | 262 public double maxExposureCompensation; |
256 public double minExposureCompensation; | 263 public double minExposureCompensation; |
257 public double currentExposureCompensation; | 264 public double currentExposureCompensation; |
258 public double stepExposureCompensation; | 265 public double stepExposureCompensation; |
259 public int whiteBalanceMode; | 266 public int whiteBalanceMode; |
260 public int[] fillLightModes; | 267 public int[] fillLightModes; |
| 268 public boolean supportsTorch; |
261 public boolean torch; | 269 public boolean torch; |
262 public boolean redEyeReduction; | 270 public boolean redEyeReduction; |
263 public int maxColorTemperature; | 271 public int maxColorTemperature; |
264 public int minColorTemperature; | 272 public int minColorTemperature; |
265 public int currentColorTemperature; | 273 public int currentColorTemperature; |
266 public int stepColorTemperature; | 274 public int stepColorTemperature; |
267 | 275 |
268 public Builder() {} | 276 public Builder() {} |
269 | 277 |
270 public Builder setMaxIso(int maxIso) { | 278 public Builder setMaxIso(int maxIso) { |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 public Builder setWhiteBalanceMode(int whiteBalanceMode) { | 388 public Builder setWhiteBalanceMode(int whiteBalanceMode) { |
381 this.whiteBalanceMode = whiteBalanceMode; | 389 this.whiteBalanceMode = whiteBalanceMode; |
382 return this; | 390 return this; |
383 } | 391 } |
384 | 392 |
385 public Builder setFillLightModes(int[] fillLightModes) { | 393 public Builder setFillLightModes(int[] fillLightModes) { |
386 this.fillLightModes = fillLightModes.clone(); | 394 this.fillLightModes = fillLightModes.clone(); |
387 return this; | 395 return this; |
388 } | 396 } |
389 | 397 |
| 398 public Builder setSupportsTorch(boolean supportsTorch) { |
| 399 this.supportsTorch = supportsTorch; |
| 400 return this; |
| 401 } |
| 402 |
390 public Builder setTorch(boolean torch) { | 403 public Builder setTorch(boolean torch) { |
391 this.torch = torch; | 404 this.torch = torch; |
392 return this; | 405 return this; |
393 } | 406 } |
394 | 407 |
395 public Builder setRedEyeReduction(boolean redEyeReduction) { | 408 public Builder setRedEyeReduction(boolean redEyeReduction) { |
396 this.redEyeReduction = redEyeReduction; | 409 this.redEyeReduction = redEyeReduction; |
397 return this; | 410 return this; |
398 } | 411 } |
399 | 412 |
(...skipping 15 matching lines...) Expand all Loading... |
415 public Builder setStepColorTemperature(int stepColorTemperature) { | 428 public Builder setStepColorTemperature(int stepColorTemperature) { |
416 this.stepColorTemperature = stepColorTemperature; | 429 this.stepColorTemperature = stepColorTemperature; |
417 return this; | 430 return this; |
418 } | 431 } |
419 | 432 |
420 public PhotoCapabilities build() { | 433 public PhotoCapabilities build() { |
421 return new PhotoCapabilities(maxIso, minIso, currentIso, stepIso, ma
xHeight, minHeight, | 434 return new PhotoCapabilities(maxIso, minIso, currentIso, stepIso, ma
xHeight, minHeight, |
422 currentHeight, stepHeight, maxWidth, minWidth, currentWidth,
stepWidth, maxZoom, | 435 currentHeight, stepHeight, maxWidth, minWidth, currentWidth,
stepWidth, maxZoom, |
423 minZoom, currentZoom, stepZoom, focusMode, exposureMode, | 436 minZoom, currentZoom, stepZoom, focusMode, exposureMode, |
424 maxExposureCompensation, minExposureCompensation, currentExp
osureCompensation, | 437 maxExposureCompensation, minExposureCompensation, currentExp
osureCompensation, |
425 stepExposureCompensation, whiteBalanceMode, fillLightModes,
torch, | 438 stepExposureCompensation, whiteBalanceMode, fillLightModes,
supportsTorch, |
426 redEyeReduction, maxColorTemperature, minColorTemperature, | 439 torch, redEyeReduction, maxColorTemperature, minColorTempera
ture, |
427 currentColorTemperature, stepColorTemperature); | 440 currentColorTemperature, stepColorTemperature); |
428 } | 441 } |
429 } | 442 } |
430 } | 443 } |
OLD | NEW |