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

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

Issue 1714913002: Reland: Move VideoCapture* files from media/base/android/... to media/capture/video/android/java/... (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gyp-gn files and added a capture_jni_registrar Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: media/capture/video/android/java/src/org/chromium/media/VideoCapture.java
diff --git a/media/base/android/java/src/org/chromium/media/VideoCapture.java b/media/capture/video/android/java/src/org/chromium/media/VideoCapture.java
similarity index 85%
rename from media/base/android/java/src/org/chromium/media/VideoCapture.java
rename to media/capture/video/android/java/src/org/chromium/media/VideoCapture.java
index bc8351f6344ca63ddb67514e55b9f8ad1818c4dd..2e2a289a4e2d1102bec8e08aa15b102e35f8fcc1 100644
--- a/media/base/android/java/src/org/chromium/media/VideoCapture.java
+++ b/media/capture/video/android/java/src/org/chromium/media/VideoCapture.java
@@ -19,7 +19,6 @@ import org.chromium.base.annotations.JNINamespace;
**/
@JNINamespace("media")
public abstract class VideoCapture {
-
// The angle (0, 90, 180, 270) that the image needs to be rotated to show in
// the display's native orientation.
protected int mCameraNativeOrientation;
@@ -33,9 +32,7 @@ public abstract class VideoCapture {
// Native callback context variable.
protected final long mNativeVideoCaptureDeviceAndroid;
- VideoCapture(Context context,
- int id,
- long nativeVideoCaptureDeviceAndroid) {
+ VideoCapture(Context context, int id, long nativeVideoCaptureDeviceAndroid) {
mContext = context;
mId = id;
mNativeVideoCaptureDeviceAndroid = nativeVideoCaptureDeviceAndroid;
@@ -87,8 +84,8 @@ public abstract class VideoCapture {
}
protected final int getCameraRotation() {
- int rotation = mInvertDeviceOrientationReadings
- ? (360 - getDeviceRotation()) : getDeviceRotation();
+ int rotation = mInvertDeviceOrientationReadings ? (360 - getDeviceRotation())
+ : getDeviceRotation();
return (mCameraNativeOrientation + rotation) % 360;
}
@@ -96,7 +93,7 @@ public abstract class VideoCapture {
if (mContext == null) return 0;
final int orientation;
WindowManager wm = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE);
- switch(wm.getDefaultDisplay().getRotation()) {
+ switch (wm.getDefaultDisplay().getRotation()) {
case Surface.ROTATION_90:
orientation = 90;
break;
@@ -115,12 +112,9 @@ public abstract class VideoCapture {
}
// Method for VideoCapture implementations to call back native code.
- public native void nativeOnFrameAvailable(long nativeVideoCaptureDeviceAndroid,
- byte[] data,
- int length,
- int rotation);
+ public native void nativeOnFrameAvailable(
+ long nativeVideoCaptureDeviceAndroid, byte[] data, int length, int rotation);
// Method for VideoCapture implementations to signal an asynchronous error.
- public native void nativeOnError(long nativeVideoCaptureDeviceAndroid,
- String message);
+ public native void nativeOnError(long nativeVideoCaptureDeviceAndroid, String message);
}

Powered by Google App Engine
This is Rietveld 408576698