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

Unified Diff: webrtc/api/androidtests/src/org/webrtc/VideoCapturerAndroidTestFixtures.java

Issue 1684403002: Android: Remove VideoCapturer (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Nuke VideoCapturer 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
« no previous file with comments | « no previous file | webrtc/api/java/android/org/webrtc/VideoCapturerAndroid.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/androidtests/src/org/webrtc/VideoCapturerAndroidTestFixtures.java
diff --git a/webrtc/api/androidtests/src/org/webrtc/VideoCapturerAndroidTestFixtures.java b/webrtc/api/androidtests/src/org/webrtc/VideoCapturerAndroidTestFixtures.java
index 4b41611032dd0f17e1be379932b1f6eea7f4d4b0..c20ea2a6ffa85511515941a6f5a4ce7892d3329a 100644
--- a/webrtc/api/androidtests/src/org/webrtc/VideoCapturerAndroidTestFixtures.java
+++ b/webrtc/api/androidtests/src/org/webrtc/VideoCapturerAndroidTestFixtures.java
@@ -223,7 +223,7 @@ public class VideoCapturerAndroidTestFixtures {
static public void release(VideoCapturerAndroid capturer) {
assertNotNull(capturer);
- capturer.dispose();
+ capturer.release();
assertTrue(capturer.isReleased());
}
@@ -297,9 +297,8 @@ public class VideoCapturerAndroidTestFixtures {
if (capturer.isCapturingToTexture()) {
capturer.surfaceHelper.returnTextureFrame();
}
- capturer.dispose();
+ release(capturer);
- assertTrue(capturer.isReleased());
assertTrue(events.onCameraOpeningCalled);
assertTrue(events.onFirstFrameAvailableCalled);
}
@@ -324,8 +323,7 @@ public class VideoCapturerAndroidTestFixtures {
capturer.onOutputFormatRequest(640, 480, 15);
capturer.changeCaptureFormat(640, 480, 15);
- capturer.dispose();
- assertTrue(capturer.isReleased());
+ release(capturer);
}
static public void stopRestartVideoSource(VideoCapturerAndroid capturer)
@@ -384,8 +382,7 @@ public class VideoCapturerAndroidTestFixtures {
capturer.surfaceHelper.returnTextureFrame();
}
}
- capturer.dispose();
- assertTrue(capturer.isReleased());
+ release(capturer);
}
static void waitUntilIdle(VideoCapturerAndroid capturer) throws InterruptedException {
@@ -400,10 +397,9 @@ public class VideoCapturerAndroidTestFixtures {
static public void startWhileCameraIsAlreadyOpen(
VideoCapturerAndroid capturer, Context appContext) throws InterruptedException {
- Camera camera = Camera.open(capturer.getCurrentCameraId());
-
final List<CaptureFormat> formats = capturer.getSupportedFormats();
final CameraEnumerationAndroid.CaptureFormat format = formats.get(0);
+ Camera camera = Camera.open(capturer.getCurrentCameraId());
final FakeCapturerObserver observer = new FakeCapturerObserver();
capturer.startCapture(format.width, format.height, format.maxFramerate,
@@ -417,16 +413,15 @@ public class VideoCapturerAndroidTestFixtures {
assertFalse(observer.WaitForCapturerToStart());
}
- capturer.dispose();
+ release(capturer);
camera.release();
}
static public void startWhileCameraIsAlreadyOpenAndCloseCamera(
VideoCapturerAndroid capturer, Context appContext) throws InterruptedException {
- Camera camera = Camera.open(capturer.getCurrentCameraId());
-
final List<CaptureFormat> formats = capturer.getSupportedFormats();
final CameraEnumerationAndroid.CaptureFormat format = formats.get(0);
+ Camera camera = Camera.open(capturer.getCurrentCameraId());
final FakeCapturerObserver observer = new FakeCapturerObserver();
capturer.startCapture(format.width, format.height, format.maxFramerate,
@@ -442,22 +437,20 @@ public class VideoCapturerAndroidTestFixtures {
if (capturer.isCapturingToTexture()) {
capturer.surfaceHelper.returnTextureFrame();
}
- capturer.dispose();
- assertTrue(capturer.isReleased());
+ release(capturer);
}
static public void startWhileCameraIsAlreadyOpenAndStop(
VideoCapturerAndroid capturer, Context appContext) throws InterruptedException {
- Camera camera = Camera.open(capturer.getCurrentCameraId());
final List<CaptureFormat> formats = capturer.getSupportedFormats();
final CameraEnumerationAndroid.CaptureFormat format = formats.get(0);
+ Camera camera = Camera.open(capturer.getCurrentCameraId());
final FakeCapturerObserver observer = new FakeCapturerObserver();
capturer.startCapture(format.width, format.height, format.maxFramerate,
appContext, observer);
capturer.stopCapture();
- capturer.dispose();
- assertTrue(capturer.isReleased());
+ release(capturer);
camera.release();
}
@@ -493,8 +486,7 @@ public class VideoCapturerAndroidTestFixtures {
capturer.surfaceHelper.returnTextureFrame();
}
- capturer.dispose();
- assertTrue(capturer.isReleased());
+ release(capturer);
}
static public void returnBufferLateEndToEnd(VideoCapturerAndroid capturer)
@@ -553,8 +545,7 @@ public class VideoCapturerAndroidTestFixtures {
capturer.surfaceHelper.returnTextureFrame();
}
- capturer.dispose();
- assertTrue(capturer.isReleased());
+ release(capturer);
}
static public void scaleCameraOutput(VideoCapturerAndroid capturer) throws InterruptedException {
« no previous file with comments | « no previous file | webrtc/api/java/android/org/webrtc/VideoCapturerAndroid.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698