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

Unified Diff: media/base/android/java/src/org/chromium/media/VideoCapture.java

Issue 602063002: Android Video Capture: Removed references to Android.Hardware.Camera from the factory and cleanup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: qinmin@ nit and tiny style. Created 6 years, 3 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/base/android/java/src/org/chromium/media/VideoCaptureAndroid.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/java/src/org/chromium/media/VideoCapture.java
diff --git a/media/base/android/java/src/org/chromium/media/VideoCapture.java b/media/base/android/java/src/org/chromium/media/VideoCapture.java
index 84f29dd6f2e25e77258cf629f9e6aef0e5bdb17a..8a013526406cdaf22d09ae24a48edf9d7b6a1aea 100644
--- a/media/base/android/java/src/org/chromium/media/VideoCapture.java
+++ b/media/base/android/java/src/org/chromium/media/VideoCapture.java
@@ -77,6 +77,18 @@ public abstract class VideoCapture implements android.hardware.Camera.PreviewCal
protected int mDeviceOrientation;
private static final String TAG = "VideoCapture";
+ static android.hardware.Camera.CameraInfo getCameraInfo(int id) {
+ android.hardware.Camera.CameraInfo cameraInfo =
+ new android.hardware.Camera.CameraInfo();
+ try {
+ android.hardware.Camera.getCameraInfo(id, cameraInfo);
+ } catch (RuntimeException ex) {
+ Log.e(TAG, "getCameraInfo: Camera.getCameraInfo: " + ex);
+ return null;
+ }
+ return cameraInfo;
+ }
+
VideoCapture(Context context,
int id,
long nativeVideoCaptureDeviceAndroid) {
@@ -96,7 +108,7 @@ public abstract class VideoCapture implements android.hardware.Camera.PreviewCal
return false;
}
- android.hardware.Camera.CameraInfo cameraInfo = getCameraInfo(mId);
+ android.hardware.Camera.CameraInfo cameraInfo = VideoCapture.getCameraInfo(mId);
if (cameraInfo == null) {
mCamera.release();
mCamera = null;
@@ -368,14 +380,4 @@ public abstract class VideoCapture implements android.hardware.Camera.PreviewCal
return parameters;
}
- private android.hardware.Camera.CameraInfo getCameraInfo(int id) {
- android.hardware.Camera.CameraInfo cameraInfo = new android.hardware.Camera.CameraInfo();
- try {
- android.hardware.Camera.getCameraInfo(id, cameraInfo);
- } catch (RuntimeException ex) {
- Log.e(TAG, "getCameraInfo: android.hardware.Camera.getCameraInfo: " + ex);
- return null;
- }
- return cameraInfo;
- }
}
« no previous file with comments | « no previous file | media/base/android/java/src/org/chromium/media/VideoCaptureAndroid.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698