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

Unified Diff: webrtc/api/java/android/org/webrtc/VideoCapturerAndroid.java

Issue 2024843002: Refactor VideoCapturerAndroid tests in WebRTC. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixes according to perkj's comments #2 Created 4 years, 6 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: webrtc/api/java/android/org/webrtc/VideoCapturerAndroid.java
diff --git a/webrtc/api/java/android/org/webrtc/VideoCapturerAndroid.java b/webrtc/api/java/android/org/webrtc/VideoCapturerAndroid.java
index 4a5ae1534121d923c52c92513cb6bc732e794919..14a9200262847c5fd8dd9e1af88429befd4acb82 100644
--- a/webrtc/api/java/android/org/webrtc/VideoCapturerAndroid.java
+++ b/webrtc/api/java/android/org/webrtc/VideoCapturerAndroid.java
@@ -199,15 +199,20 @@ public class VideoCapturerAndroid implements
// Helper function to retrieve the current camera id synchronously. Note that the camera id might
// change at any point by switchCamera() calls.
- int getCurrentCameraId() {
+ private int getCurrentCameraIdInt() {
synchronized (cameraIdLock) {
return id;
}
}
@Override
+ public String getCurrentCameraId() {
+ return Integer.toString(getCurrentCameraIdInt());
+ }
+
+ @Override
public List<CaptureFormat> getSupportedFormats() {
- return CameraEnumerator.getSupportedFormats(getCurrentCameraId());
+ return CameraEnumerator.getSupportedFormats(getCurrentCameraIdInt());
}
// Returns true if this VideoCapturer is setup to capture video frames to a SurfaceTexture.

Powered by Google App Engine
This is Rietveld 408576698