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

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

Issue 740363002: Revert of 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);
174 try { 173 try {
175 mCamera.setParameters(parameters); 174 mCamera.setParameters(parameters);
176 } catch (RuntimeException ex) { 175 } catch (RuntimeException ex) {
177 Log.e(TAG, "setParameters: " + ex); 176 Log.e(TAG, "setParameters: " + ex);
178 return false; 177 return false;
179 } 178 }
180 179
181 // Set SurfaceTexture. Android Capture needs a SurfaceTexture even if 180 // Set SurfaceTexture. Android Capture needs a SurfaceTexture even if
182 // it is not going to be used. 181 // it is not going to be used.
183 mGlTextures = new int[1]; 182 mGlTextures = new int[1];
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 break; 302 break;
304 case Surface.ROTATION_0: 303 case Surface.ROTATION_0:
305 default: 304 default:
306 orientation = 0; 305 orientation = 0;
307 break; 306 break;
308 } 307 }
309 } 308 }
310 return orientation; 309 return orientation;
311 } 310 }
312 } 311 }
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