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

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

Issue 2286303003: Video capture Android: enable unittests for Camera2 API (Closed)
Patch Set: Created 4 years, 4 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/capture/video/android/java/src/org/chromium/media/VideoCapture.java b/media/capture/video/android/java/src/org/chromium/media/VideoCapture.java
index c862450ef58be43d4f07ab7bb2a36bb523fa7d92..c73e21787f5f29fcbf7cb993b3bc6fa7397299bc 100644
--- a/media/capture/video/android/java/src/org/chromium/media/VideoCapture.java
+++ b/media/capture/video/android/java/src/org/chromium/media/VideoCapture.java
@@ -34,6 +34,8 @@ public abstract class VideoCapture {
// Native callback context variable.
protected final long mNativeVideoCaptureDeviceAndroid;
+ protected boolean mTestMode = true;
jbudorick 2016/09/01 18:46:41 nit: name this more specifically, something like m
mcasas 2016/09/01 20:52:36 Done. Also, it should be false by default.
+
VideoCapture(Context context, int id, long nativeVideoCaptureDeviceAndroid) {
mContext = context;
mId = id;
@@ -103,6 +105,11 @@ public abstract class VideoCapture {
}
}
+ @CalledByNative
+ public final void setTestMode() {
+ mTestMode = true;
+ }
+
protected final int getCameraRotation() {
int rotation = mInvertDeviceOrientationReadings ? (360 - getDeviceRotation())
: getDeviceRotation();

Powered by Google App Engine
This is Rietveld 408576698