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

Unified Diff: talk/app/webrtc/java/android/org/webrtc/VideoCapturerAndroid.java

Issue 1321903002: CameraEnumerationAndroid: Make getSupportedFormats() an interface (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Release camera in finally clause Created 5 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: talk/app/webrtc/java/android/org/webrtc/VideoCapturerAndroid.java
diff --git a/talk/app/webrtc/java/android/org/webrtc/VideoCapturerAndroid.java b/talk/app/webrtc/java/android/org/webrtc/VideoCapturerAndroid.java
index d4251f6021a6829f54daa51f7144a2bb15dd2cbe..ffda916cbdaa1fd09c903919e1cbe3f9b69c808d 100644
--- a/talk/app/webrtc/java/android/org/webrtc/VideoCapturerAndroid.java
+++ b/talk/app/webrtc/java/android/org/webrtc/VideoCapturerAndroid.java
@@ -220,7 +220,7 @@ public class VideoCapturerAndroid extends VideoCapturer implements PreviewCallba
}
public synchronized List<CaptureFormat> getSupportedFormats() {
- return CameraEnumerationAndroid.supportedFormats.get(id);
+ return CameraEnumerationAndroid.getSupportedFormats(id);
}
// Return a list of timestamps for the frames that have been sent out, but not returned yet.
@@ -234,14 +234,11 @@ public class VideoCapturerAndroid extends VideoCapturer implements PreviewCallba
}
// Called by native code.
- // Enumerates resolution and frame rates for all cameras to be able to switch
- // cameras. Initializes local variables for the camera named |deviceName| and
- // starts a thread to be used for capturing.
- // If deviceName is empty, the first available device is used in order to be
- // compatible with the generic VideoCapturer class.
+ // Initializes local variables for the camera named |deviceName|. If |deviceName| is empty, the
+ // first available device is used in order to be compatible with the generic VideoCapturer class.
synchronized boolean init(String deviceName) {
Log.d(TAG, "init: " + deviceName);
- if (deviceName == null || !CameraEnumerationAndroid.initStatics())
+ if (deviceName == null)
return false;
boolean foundDevice = false;
« no previous file with comments | « talk/app/webrtc/java/android/org/webrtc/CameraEnumerator.java ('k') | talk/app/webrtc/java/jni/classreferenceholder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698