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

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

Issue 1957733003: VideoCaptureCamera2.java, VideoCaptureCamera.java: minor cleanup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: qinmin@ comments Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java » ('j') | 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.annotation.TargetApi; 7 import android.annotation.TargetApi;
8 import android.content.Context; 8 import android.content.Context;
9 import android.graphics.SurfaceTexture; 9 import android.graphics.SurfaceTexture;
10 import android.opengl.GLES20; 10 import android.opengl.GLES20;
(...skipping 20 matching lines...) Expand all
31 protected android.hardware.Camera mCamera; 31 protected android.hardware.Camera mCamera;
32 // Lock to mutually exclude execution of OnPreviewFrame() and {start/stop}Ca pture(). 32 // Lock to mutually exclude execution of OnPreviewFrame() and {start/stop}Ca pture().
33 protected ReentrantLock mPreviewBufferLock = new ReentrantLock(); 33 protected ReentrantLock mPreviewBufferLock = new ReentrantLock();
34 // True when native code has started capture. 34 // True when native code has started capture.
35 protected boolean mIsRunning = false; 35 protected boolean mIsRunning = false;
36 36
37 protected int[] mGlTextures = null; 37 protected int[] mGlTextures = null;
38 protected SurfaceTexture mSurfaceTexture = null; 38 protected SurfaceTexture mSurfaceTexture = null;
39 protected static final int GL_TEXTURE_EXTERNAL_OES = 0x8D65; 39 protected static final int GL_TEXTURE_EXTERNAL_OES = 0x8D65;
40 40
41 private static final String TAG = "cr.media"; 41 private static final String TAG = "VideoCapture";
42 42
43 protected static android.hardware.Camera.CameraInfo getCameraInfo(int id) { 43 protected static android.hardware.Camera.CameraInfo getCameraInfo(int id) {
44 android.hardware.Camera.CameraInfo cameraInfo = new android.hardware.Cam era.CameraInfo(); 44 android.hardware.Camera.CameraInfo cameraInfo = new android.hardware.Cam era.CameraInfo();
45 try { 45 try {
46 android.hardware.Camera.getCameraInfo(id, cameraInfo); 46 android.hardware.Camera.getCameraInfo(id, cameraInfo);
47 } catch (RuntimeException ex) { 47 } catch (RuntimeException ex) {
48 Log.e(TAG, "getCameraInfo: Camera.getCameraInfo: " + ex); 48 Log.e(TAG, "getCameraInfo: Camera.getCameraInfo: " + ex);
49 return null; 49 return null;
50 } 50 }
51 return cameraInfo; 51 return cameraInfo;
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 277
278 // Local hook to allow derived classes to fill capture format and modify 278 // Local hook to allow derived classes to fill capture format and modify
279 // camera parameters as they see fit. 279 // camera parameters as they see fit.
280 abstract void setCaptureParameters(int width, int height, int frameRate, 280 abstract void setCaptureParameters(int width, int height, int frameRate,
281 android.hardware.Camera.Parameters cameraParameters); 281 android.hardware.Camera.Parameters cameraParameters);
282 282
283 // Local method to be overriden with the particular setPreviewCallback to be 283 // Local method to be overriden with the particular setPreviewCallback to be
284 // used in the implementations. 284 // used in the implementations.
285 abstract void setPreviewCallback(android.hardware.Camera.PreviewCallback cb) ; 285 abstract void setPreviewCallback(android.hardware.Camera.PreviewCallback cb) ;
286 } 286 }
OLDNEW
« no previous file with comments | « no previous file | media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698