| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 android.content.Context; | 7 import android.content.Context; |
| 8 import android.graphics.ImageFormat; | 8 import android.graphics.ImageFormat; |
| 9 import android.view.Surface; | 9 import android.view.Surface; |
| 10 import android.view.WindowManager; | 10 import android.view.WindowManager; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 @CalledByNative | 65 @CalledByNative |
| 66 public abstract boolean startCapture(); | 66 public abstract boolean startCapture(); |
| 67 | 67 |
| 68 @CalledByNative | 68 @CalledByNative |
| 69 public abstract boolean stopCapture(); | 69 public abstract boolean stopCapture(); |
| 70 | 70 |
| 71 @CalledByNative | 71 @CalledByNative |
| 72 public abstract PhotoCapabilities getPhotoCapabilities(); | 72 public abstract PhotoCapabilities getPhotoCapabilities(); |
| 73 | 73 |
| 74 /** | 74 /** |
| 75 * @param zoom Zoom level, should be ignored if 0. | 75 * @param zoom Zoom level, should be ignored if 0. |
| 76 * @param focusMode Focus mode following AndroidMeteringMode enum. | 76 * @param focusMode Focus mode following AndroidMeteringMode enum. |
| 77 * @param exposureMode Exposure mode following AndroidMeteringMode enum. | 77 * @param exposureMode Exposure mode following AndroidMeteringMode enum. |
| 78 * @param pointsOfInterest2D 2D normalized points of interest, marshalled wit
h | 78 * @param pointsOfInterest2D 2D normalized points of interest, marshalled wi
th |
| 79 * x coordinate first followed by the y coordinate. | 79 * x coordinate first followed by the y coordinate. |
| 80 * @param hasExposureCompensation Indicates if |exposureCompensation| is set. | 80 * @param hasExposureCompensation Indicates if |exposureCompensation| is set
. |
| 81 * @param exposureCompensation Adjustment to auto exposure. 0 means not adjus
ted. | 81 * @param exposureCompensation Adjustment to auto exposure. 0 means not adju
sted. |
| 82 * @param whiteBalanceMode White Balance mode following AndroidMeteringMode e
num. | 82 * @param whiteBalanceMode White Balance mode following AndroidMeteringMode
enum. |
| 83 * @param iso Sensitivity to light. 0, which would be invalid, means ignore. | 83 * @param iso Sensitivity to light. 0, which would be invalid, means ignore. |
| 84 * @param hasRedEyeReduction Indicates if |redEyeReduction| is set. | 84 * @param hasRedEyeReduction Indicates if |redEyeReduction| is set. |
| 85 * @param redEyeReduction Value of red eye reduction for the auto flash setti
ng. | 85 * @param redEyeReduction Value of red eye reduction for the auto flash sett
ing. |
| 86 * @param fillLightMode Flash/Torch setting, following AndroidFillLightMode e
num. | 86 * @param fillLightMode Flash setting, following AndroidFillLightMode enum. |
| 87 * @param colorTemperature White Balance reference temperature, valid if whit
eBalanceMode is | 87 * @param colorTemperature White Balance reference temperature, valid if whi
teBalanceMode is |
| 88 * manual, and its value is larger than 0. | 88 * manual, and its value is larger than 0. |
| 89 */ | 89 * @param torch Torch setting, true meaning on. |
| 90 */ |
| 90 @CalledByNative | 91 @CalledByNative |
| 91 public abstract void setPhotoOptions(double zoom, int focusMode, int exposur
eMode, double width, | 92 public abstract void setPhotoOptions(double zoom, int focusMode, int exposur
eMode, double width, |
| 92 double height, float[] pointsOfInterest2D, boolean hasExposureCompen
sation, | 93 double height, float[] pointsOfInterest2D, boolean hasExposureCompen
sation, |
| 93 double exposureCompensation, int whiteBalanceMode, double iso, | 94 double exposureCompensation, int whiteBalanceMode, double iso, |
| 94 boolean hasRedEyeReduction, boolean redEyeReduction, int fillLightMo
de, | 95 boolean hasRedEyeReduction, boolean redEyeReduction, int fillLightMo
de, |
| 95 double colorTemperature); | 96 boolean hasTorch, boolean torch, double colorTemperature); |
| 96 | 97 |
| 97 @CalledByNative | 98 @CalledByNative |
| 98 public abstract boolean takePhoto(final long callbackId); | 99 public abstract boolean takePhoto(final long callbackId); |
| 99 | 100 |
| 100 @CalledByNative | 101 @CalledByNative |
| 101 public abstract void deallocate(); | 102 public abstract void deallocate(); |
| 102 | 103 |
| 103 @CalledByNative | 104 @CalledByNative |
| 104 public final int queryWidth() { | 105 public final int queryWidth() { |
| 105 return mCaptureFormat.mWidth; | 106 return mCaptureFormat.mWidth; |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 // Method for VideoCapture implementations to signal an asynchronous error. | 222 // Method for VideoCapture implementations to signal an asynchronous error. |
| 222 public native void nativeOnError(long nativeVideoCaptureDeviceAndroid, Strin
g message); | 223 public native void nativeOnError(long nativeVideoCaptureDeviceAndroid, Strin
g message); |
| 223 | 224 |
| 224 // Method for VideoCapture implementations to send Photos back to. | 225 // Method for VideoCapture implementations to send Photos back to. |
| 225 public native void nativeOnPhotoTaken( | 226 public native void nativeOnPhotoTaken( |
| 226 long nativeVideoCaptureDeviceAndroid, long callbackId, byte[] data); | 227 long nativeVideoCaptureDeviceAndroid, long callbackId, byte[] data); |
| 227 | 228 |
| 228 // Method for VideoCapture implementations to report device started event. | 229 // Method for VideoCapture implementations to report device started event. |
| 229 public native void nativeOnStarted(long nativeVideoCaptureDeviceAndroid); | 230 public native void nativeOnStarted(long nativeVideoCaptureDeviceAndroid); |
| 230 } | 231 } |
| OLD | NEW |