| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 @CalledByNative | 55 @CalledByNative |
| 56 public abstract PhotoCapabilities getPhotoCapabilities(); | 56 public abstract PhotoCapabilities getPhotoCapabilities(); |
| 57 | 57 |
| 58 /** | 58 /** |
| 59 * @param zoom Zoom level, should be ignored if 0. | 59 * @param zoom Zoom level, should be ignored if 0. |
| 60 * @param focusMode Focus mode following AndroidMeteringMode enum. | 60 * @param focusMode Focus mode following AndroidMeteringMode enum. |
| 61 * @param exposureMode Focus mode following AndroidMeteringMode enum. | 61 * @param exposureMode Focus mode following AndroidMeteringMode enum. |
| 62 * @param pointsOfInterest2D 2D normalized points of interest, marshalled wit
h | 62 * @param pointsOfInterest2D 2D normalized points of interest, marshalled wit
h |
| 63 * x coordinate first followed by the y coordinate. | 63 * x coordinate first followed by the y coordinate. |
| 64 * @param hasExposureCompensation Indicates if |exposureCompensation| is set. | 64 * @param hasExposureCompensation Indicates if |exposureCompensation| is set. |
| 65 * @param exposureCompensation Adjustment to auto exposure, in x100 units. 0
means not adjusted. | 65 * @param exposureCompensation Adjustment to auto exposure. 0 means not adjus
ted. |
| 66 * @param whiteBalanceMode White Balance mode following AndroidMeteringMode e
num. | 66 * @param whiteBalanceMode White Balance mode following AndroidMeteringMode e
num. |
| 67 * @param iso Sensitivity to light. 0, which would be invalid, means ignore. | 67 * @param iso Sensitivity to light. 0, which would be invalid, means ignore. |
| 68 * @param hasRedEyeReduction Indicates if |redEyeReduction| is set. | 68 * @param hasRedEyeReduction Indicates if |redEyeReduction| is set. |
| 69 * @param redEyeReduction Value of red eye reduction for the auto flash setti
ng. | 69 * @param redEyeReduction Value of red eye reduction for the auto flash setti
ng. |
| 70 * @param fillLightMode Flash/Torch setting, following AndroidFillLightMode e
num. | 70 * @param fillLightMode Flash/Torch setting, following AndroidFillLightMode e
num. |
| 71 * @param colorTemperature White Balance reference temperature, valid if whit
eBalanceMode is | 71 * @param colorTemperature White Balance reference temperature, valid if whit
eBalanceMode is |
| 72 * manual, and its value is larger than 0. | 72 * manual, and its value is larger than 0. |
| 73 */ | 73 */ |
| 74 @CalledByNative | 74 @CalledByNative |
| 75 public abstract void setPhotoOptions(int zoom, int focusMode, int exposureMo
de, int width, | 75 public abstract void setPhotoOptions(double zoom, int focusMode, int exposur
eMode, double width, |
| 76 int height, float[] pointsOfInterest2D, boolean hasExposureCompensat
ion, | 76 double height, float[] pointsOfInterest2D, boolean hasExposureCompen
sation, |
| 77 int exposureCompensation, int whiteBalanceMode, int iso, boolean has
RedEyeReduction, | 77 double exposureCompensation, int whiteBalanceMode, double iso, |
| 78 boolean redEyeReduction, int fillLightMode, int colorTemperature); | 78 boolean hasRedEyeReduction, boolean redEyeReduction, int fillLightMo
de, |
| 79 double colorTemperature); |
| 79 | 80 |
| 80 @CalledByNative | 81 @CalledByNative |
| 81 public abstract boolean takePhoto(final long callbackId); | 82 public abstract boolean takePhoto(final long callbackId); |
| 82 | 83 |
| 83 @CalledByNative | 84 @CalledByNative |
| 84 public abstract void deallocate(); | 85 public abstract void deallocate(); |
| 85 | 86 |
| 86 @CalledByNative | 87 @CalledByNative |
| 87 public final int queryWidth() { | 88 public final int queryWidth() { |
| 88 return mCaptureFormat.mWidth; | 89 return mCaptureFormat.mWidth; |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 int uvRowStride, int uvPixelStride, int width, int height, int rotat
ion, | 156 int uvRowStride, int uvPixelStride, int width, int height, int rotat
ion, |
| 156 long timestamp); | 157 long timestamp); |
| 157 | 158 |
| 158 // Method for VideoCapture implementations to signal an asynchronous error. | 159 // Method for VideoCapture implementations to signal an asynchronous error. |
| 159 public native void nativeOnError(long nativeVideoCaptureDeviceAndroid, Strin
g message); | 160 public native void nativeOnError(long nativeVideoCaptureDeviceAndroid, Strin
g message); |
| 160 | 161 |
| 161 // Method for VideoCapture implementations to send Photos back to. | 162 // Method for VideoCapture implementations to send Photos back to. |
| 162 public native void nativeOnPhotoTaken( | 163 public native void nativeOnPhotoTaken( |
| 163 long nativeVideoCaptureDeviceAndroid, long callbackId, byte[] data); | 164 long nativeVideoCaptureDeviceAndroid, long callbackId, byte[] data); |
| 164 } | 165 } |
| OLD | NEW |