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

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

Issue 744193002: Android video capture: Set camera parameters continuous focus mode on, where supported (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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/VideoCaptureCamera.java
diff --git a/media/base/android/java/src/org/chromium/media/VideoCaptureCamera.java b/media/base/android/java/src/org/chromium/media/VideoCaptureCamera.java
index 9073c63a0e7ad9b18044e42c1b1121650ff8f580..2418a31f4caab255560d768a74c27d7310213afd 100644
--- a/media/base/android/java/src/org/chromium/media/VideoCaptureCamera.java
+++ b/media/base/android/java/src/org/chromium/media/VideoCaptureCamera.java
@@ -165,6 +165,13 @@ public abstract class VideoCaptureCamera extends VideoCapture
Log.d(TAG, "Image stabilization not supported.");
}
+ if (parameters.getSupportedFocusModes().contains(
+ android.hardware.Camera.Parameters.FOCUS_MODE_CONTINUOUS_VIDEO)) {
+ parameters.setFocusMode(android.hardware.Camera.Parameters.FOCUS_MODE_CONTINUOUS_VIDEO);
+ } else {
+ Log.d(TAG, "Continuous focus mode not supported.");
+ }
+
setCaptureParameters(matchedWidth, matchedHeight, chosenFrameRate, parameters);
parameters.setPictureSize(matchedWidth, matchedHeight);
parameters.setPreviewSize(matchedWidth, matchedHeight);
« 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