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

Unified Diff: media/base/android/java/src/org/chromium/media/VideoCaptureFactory.java

Issue 1014943005: Android CaptureAPI Types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed android_webview changes. Created 5 years, 9 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/base/android/java/src/org/chromium/media/VideoCaptureFactory.java
diff --git a/media/base/android/java/src/org/chromium/media/VideoCaptureFactory.java b/media/base/android/java/src/org/chromium/media/VideoCaptureFactory.java
index ae6018df908b16031a52bfed8a9ebc28cf4f2740..fcc8ebfad5f995eabcd351dcef2e1a594f7c20bf 100644
--- a/media/base/android/java/src/org/chromium/media/VideoCaptureFactory.java
+++ b/media/base/android/java/src/org/chromium/media/VideoCaptureFactory.java
@@ -117,6 +117,18 @@ class VideoCaptureFactory {
}
@CalledByNative
+ static int getCaptureApiType(int id, Context appContext) {
+ if (isLReleaseOrLater()) {
+ return VideoCaptureCamera2.getCaptureApiType(id, appContext);
+ } else if (ChromiumCameraInfo.isSpecialCamera(id)) {
+ return VideoCaptureTango.getCaptureApiType(
+ ChromiumCameraInfo.toSpecialCameraId(id));
+ } else {
+ return VideoCaptureAndroid.getCaptureApiType(id);
+ }
+ }
+
+ @CalledByNative
static String getDeviceName(int id, Context appContext) {
if (isLReleaseOrLater() && !VideoCaptureCamera2.isLegacyDevice(appContext, id)) {
return VideoCaptureCamera2.getName(id, appContext);

Powered by Google App Engine
This is Rietveld 408576698