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

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

Issue 737003003: Set camera parameters continuous focus mode on (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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.SurfaceTexture; 8 import android.graphics.SurfaceTexture;
9 import android.opengl.GLES20; 9 import android.opengl.GLES20;
10 import android.util.Log; 10 import android.util.Log;
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 parameters.setVideoStabilization(true); 163 parameters.setVideoStabilization(true);
164 } else { 164 } else {
165 Log.d(TAG, "Image stabilization not supported."); 165 Log.d(TAG, "Image stabilization not supported.");
166 } 166 }
167 167
168 setCaptureParameters(matchedWidth, matchedHeight, chosenFrameRate, param eters); 168 setCaptureParameters(matchedWidth, matchedHeight, chosenFrameRate, param eters);
169 parameters.setPictureSize(matchedWidth, matchedHeight); 169 parameters.setPictureSize(matchedWidth, matchedHeight);
170 parameters.setPreviewSize(matchedWidth, matchedHeight); 170 parameters.setPreviewSize(matchedWidth, matchedHeight);
171 parameters.setPreviewFpsRange(chosenFpsRange[0], chosenFpsRange[1]); 171 parameters.setPreviewFpsRange(chosenFpsRange[0], chosenFpsRange[1]);
172 parameters.setPreviewFormat(mCaptureFormat.mPixelFormat); 172 parameters.setPreviewFormat(mCaptureFormat.mPixelFormat);
173 parameters.setFocusMode(android.hardware.Camera.Parameters.FOCUS_MODE_CO NTINUOUS_VIDEO);
173 try { 174 try {
174 mCamera.setParameters(parameters); 175 mCamera.setParameters(parameters);
175 } catch (RuntimeException ex) { 176 } catch (RuntimeException ex) {
176 Log.e(TAG, "setParameters: " + ex); 177 Log.e(TAG, "setParameters: " + ex);
177 return false; 178 return false;
178 } 179 }
179 180
180 // Set SurfaceTexture. Android Capture needs a SurfaceTexture even if 181 // Set SurfaceTexture. Android Capture needs a SurfaceTexture even if
181 // it is not going to be used. 182 // it is not going to be used.
182 mGlTextures = new int[1]; 183 mGlTextures = new int[1];
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 break; 303 break;
303 case Surface.ROTATION_0: 304 case Surface.ROTATION_0:
304 default: 305 default:
305 orientation = 0; 306 orientation = 0;
306 break; 307 break;
307 } 308 }
308 } 309 }
309 return orientation; 310 return orientation;
310 } 311 }
311 } 312 }
OLDNEW
« 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