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

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

Issue 400933002: Android VideoCapture: catch exception on Android.Camera.SetParameters. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | no next file » | 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 1bb2de59f6dc6a83197a2621d592a781f3fcaae8..fe1863f225b426b71c211c8bf48d22a82a6ae304 100644
--- a/media/base/android/java/src/org/chromium/media/VideoCapture.java
+++ b/media/base/android/java/src/org/chromium/media/VideoCapture.java
@@ -177,7 +177,12 @@ public abstract class VideoCapture implements PreviewCallback {
mCaptureFormat.mHeight);
parameters.setPreviewFpsRange(fpsMinMax[0], fpsMinMax[1]);
parameters.setPreviewFormat(mCaptureFormat.mPixelFormat);
- mCamera.setParameters(parameters);
+ try {
+ mCamera.setParameters(parameters);
+ } catch (RuntimeException ex) {
+ Log.e(TAG, "setParameters: " + ex);
+ return false;
+ }
// Set SurfaceTexture. Android Capture needs a SurfaceTexture even if
// it is not going to be used.
@@ -373,4 +378,4 @@ public abstract class VideoCapture implements PreviewCallback {
}
return cameraInfo;
}
-}
+}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698