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

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

Issue 2548013002: Remove redundant field initialization in Java code. (Closed)
Patch Set: rebase Created 4 years 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
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.ImageFormat; 8 import android.graphics.ImageFormat;
9 import android.view.Surface; 9 import android.view.Surface;
10 import android.view.WindowManager; 10 import android.view.WindowManager;
(...skipping 10 matching lines...) Expand all
21 **/ 21 **/
22 @JNINamespace("media") 22 @JNINamespace("media")
23 public abstract class VideoCapture { 23 public abstract class VideoCapture {
24 // The angle (0, 90, 180, 270) that the image needs to be rotated to show in 24 // The angle (0, 90, 180, 270) that the image needs to be rotated to show in
25 // the display's native orientation. 25 // the display's native orientation.
26 protected int mCameraNativeOrientation; 26 protected int mCameraNativeOrientation;
27 // In some occasions we need to invert the device rotation readings, see the 27 // In some occasions we need to invert the device rotation readings, see the
28 // individual implementations. 28 // individual implementations.
29 protected boolean mInvertDeviceOrientationReadings; 29 protected boolean mInvertDeviceOrientationReadings;
30 30
31 protected VideoCaptureFormat mCaptureFormat = null; 31 protected VideoCaptureFormat mCaptureFormat;
32 protected final Context mContext; 32 protected final Context mContext;
33 protected final int mId; 33 protected final int mId;
34 // Native callback context variable. 34 // Native callback context variable.
35 protected final long mNativeVideoCaptureDeviceAndroid; 35 protected final long mNativeVideoCaptureDeviceAndroid;
36 36
37 protected boolean mUseBackgroundThreadForTesting = false; 37 protected boolean mUseBackgroundThreadForTesting;
38 38
39 VideoCapture(Context context, int id, long nativeVideoCaptureDeviceAndroid) { 39 VideoCapture(Context context, int id, long nativeVideoCaptureDeviceAndroid) {
40 mContext = context; 40 mContext = context;
41 mId = id; 41 mId = id;
42 mNativeVideoCaptureDeviceAndroid = nativeVideoCaptureDeviceAndroid; 42 mNativeVideoCaptureDeviceAndroid = nativeVideoCaptureDeviceAndroid;
43 } 43 }
44 44
45 // Allocate necessary resources for capture. 45 // Allocate necessary resources for capture.
46 @CalledByNative 46 @CalledByNative
47 public abstract boolean allocate(int width, int height, int frameRate); 47 public abstract boolean allocate(int width, int height, int frameRate);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 int uvRowStride, int uvPixelStride, int width, int height, int rotat ion, 156 int uvRowStride, int uvPixelStride, int width, int height, int rotat ion,
157 long timestamp); 157 long timestamp);
158 158
159 // Method for VideoCapture implementations to signal an asynchronous error. 159 // Method for VideoCapture implementations to signal an asynchronous error.
160 public native void nativeOnError(long nativeVideoCaptureDeviceAndroid, Strin g message); 160 public native void nativeOnError(long nativeVideoCaptureDeviceAndroid, Strin g message);
161 161
162 // Method for VideoCapture implementations to send Photos back to. 162 // Method for VideoCapture implementations to send Photos back to.
163 public native void nativeOnPhotoTaken( 163 public native void nativeOnPhotoTaken(
164 long nativeVideoCaptureDeviceAndroid, long callbackId, byte[] data); 164 long nativeVideoCaptureDeviceAndroid, long callbackId, byte[] data);
165 } 165 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698