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

Side by Side Diff: talk/app/webrtc/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java

Issue 1441363002: Revert of Android MediaCodecVideoDecoder: Manage lifetime of texture frames (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Manual revert. Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | talk/app/webrtc/java/android/org/webrtc/SurfaceViewRenderer.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2015 Google Inc. 3 * Copyright 2015 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 @SmallTest 100 @SmallTest
101 // This test that the camera can be started and that the frames are forwarded 101 // This test that the camera can be started and that the frames are forwarded
102 // to a Java video renderer using a "default" capturer. 102 // to a Java video renderer using a "default" capturer.
103 // It tests both the Java and the C++ layer. 103 // It tests both the Java and the C++ layer.
104 public void testStartVideoCapturer() throws InterruptedException { 104 public void testStartVideoCapturer() throws InterruptedException {
105 VideoCapturerAndroid capturer = 105 VideoCapturerAndroid capturer =
106 VideoCapturerAndroid.create("", null); 106 VideoCapturerAndroid.create("", null);
107 VideoCapturerAndroidTestFixtures.startCapturerAndRender(capturer); 107 VideoCapturerAndroidTestFixtures.startCapturerAndRender(capturer);
108 } 108 }
109 109
110 // TODO(perkj): Enable once VideoCapture to texture support has landed in C++.
110 @SmallTest 111 @SmallTest
111 public void testStartVideoCapturerUsingTextures() throws InterruptedException { 112 public void DISABLED_testStartVideoCapturerUsingTextures() throws InterruptedE xception {
112 VideoCapturerAndroid capturer = 113 VideoCapturerAndroid capturer =
113 VideoCapturerAndroid.create("", null, EGL10.EGL_NO_CONTEXT); 114 VideoCapturerAndroid.create("", null, EGL10.EGL_NO_CONTEXT);
114 VideoCapturerAndroidTestFixtures.startCapturerAndRender(capturer); 115 VideoCapturerAndroidTestFixtures.startCapturerAndRender(capturer);
115 } 116 }
116 117
117 @SmallTest 118 @SmallTest
118 // This test that the camera can be started and that the frames are forwarded 119 // This test that the camera can be started and that the frames are forwarded
119 // to a Java video renderer using the front facing video capturer. 120 // to a Java video renderer using the front facing video capturer.
120 // It tests both the Java and the C++ layer. 121 // It tests both the Java and the C++ layer.
121 public void testStartFrontFacingVideoCapturer() throws InterruptedException { 122 public void testStartFrontFacingVideoCapturer() throws InterruptedException {
(...skipping 20 matching lines...) Expand all
142 143
143 @SmallTest 144 @SmallTest
144 // This test that the default camera can be started and that the camera can 145 // This test that the default camera can be started and that the camera can
145 // later be switched to another camera. 146 // later be switched to another camera.
146 // It tests both the Java and the C++ layer. 147 // It tests both the Java and the C++ layer.
147 public void testSwitchVideoCapturer() throws InterruptedException { 148 public void testSwitchVideoCapturer() throws InterruptedException {
148 VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", null); 149 VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", null);
149 VideoCapturerAndroidTestFixtures.switchCamera(capturer); 150 VideoCapturerAndroidTestFixtures.switchCamera(capturer);
150 } 151 }
151 152
153 // TODO(perkj): Enable once VideoCapture to texture support has landed in C++.
152 @SmallTest 154 @SmallTest
153 public void testSwitchVideoCapturerUsingTextures() throws InterruptedException { 155 public void DISABLED_testSwitchVideoCapturerUsingTextures() throws Interrupted Exception {
154 VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", null, EGL10. EGL_NO_CONTEXT); 156 VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", null, EGL10. EGL_NO_CONTEXT);
155 VideoCapturerAndroidTestFixtures.switchCamera(capturer); 157 VideoCapturerAndroidTestFixtures.switchCamera(capturer);
156 } 158 }
157 159
158 @MediumTest 160 @MediumTest
159 public void testCameraEvents() throws InterruptedException { 161 public void testCameraEvents() throws InterruptedException {
160 VideoCapturerAndroidTestFixtures.CameraEvents cameraEvents = 162 VideoCapturerAndroidTestFixtures.CameraEvents cameraEvents =
161 VideoCapturerAndroidTestFixtures.createCameraEvents(); 163 VideoCapturerAndroidTestFixtures.createCameraEvents();
162 VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", cameraEvents ); 164 VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", cameraEvents );
163 VideoCapturerAndroidTestFixtures.cameraEventsInvoked( 165 VideoCapturerAndroidTestFixtures.cameraEventsInvoked(
(...skipping 21 matching lines...) Expand all
185 } 187 }
186 188
187 @SmallTest 189 @SmallTest
188 // This test that the VideoSource that the VideoCapturer is connected to can 190 // This test that the VideoSource that the VideoCapturer is connected to can
189 // be stopped and restarted. It tests both the Java and the C++ layer. 191 // be stopped and restarted. It tests both the Java and the C++ layer.
190 public void testStopRestartVideoSource() throws InterruptedException { 192 public void testStopRestartVideoSource() throws InterruptedException {
191 VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", null); 193 VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", null);
192 VideoCapturerAndroidTestFixtures.stopRestartVideoSource(capturer); 194 VideoCapturerAndroidTestFixtures.stopRestartVideoSource(capturer);
193 } 195 }
194 196
197 // TODO(perkj): Enable once VideoCapture to texture support has landed in C++.
195 @SmallTest 198 @SmallTest
196 public void testStopRestartVideoSourceUsingTextures() throws InterruptedExcept ion { 199 public void DISABLED_testStopRestartVideoSourceUsingTextures() throws Interrup tedException {
197 VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", null, EGL10. EGL_NO_CONTEXT); 200 VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", null, EGL10. EGL_NO_CONTEXT);
198 VideoCapturerAndroidTestFixtures.stopRestartVideoSource(capturer); 201 VideoCapturerAndroidTestFixtures.stopRestartVideoSource(capturer);
199 } 202 }
200 203
201 @SmallTest 204 @SmallTest
202 // This test that the camera can be started at different resolutions. 205 // This test that the camera can be started at different resolutions.
203 // It does not test or use the C++ layer. 206 // It does not test or use the C++ layer.
204 public void testStartStopWithDifferentResolutions() throws InterruptedExceptio n { 207 public void testStartStopWithDifferentResolutions() throws InterruptedExceptio n {
205 String deviceName = CameraEnumerationAndroid.getDeviceName(0); 208 String deviceName = CameraEnumerationAndroid.getDeviceName(0);
206 VideoCapturerAndroid capturer = 209 VideoCapturerAndroid capturer =
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 278
276 @MediumTest 279 @MediumTest
277 // This test that we can capture frames, keep the frames in a local renderer, stop capturing, 280 // This test that we can capture frames, keep the frames in a local renderer, stop capturing,
278 // and then return the frames. The difference between the test testReturnBuffe rLate() is that we 281 // and then return the frames. The difference between the test testReturnBuffe rLate() is that we
279 // also test the JNI and C++ AndroidVideoCapturer parts. 282 // also test the JNI and C++ AndroidVideoCapturer parts.
280 public void testReturnBufferLateEndToEnd() throws InterruptedException { 283 public void testReturnBufferLateEndToEnd() throws InterruptedException {
281 final VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", null); 284 final VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", null);
282 VideoCapturerAndroidTestFixtures.returnBufferLateEndToEnd(capturer); 285 VideoCapturerAndroidTestFixtures.returnBufferLateEndToEnd(capturer);
283 } 286 }
284 287
288 // TODO(perkj): Enable once VideoCapture to texture support has landed in C++.
285 @MediumTest 289 @MediumTest
286 public void testReturnBufferLateEndToEndUsingTextures() throws InterruptedExce ption { 290 public void DISABLED_testReturnBufferLateEndToEndUsingTextures() throws Interr uptedException {
287 final VideoCapturerAndroid capturer = 291 final VideoCapturerAndroid capturer =
288 VideoCapturerAndroid.create("", null, EGL10.EGL_NO_CONTEXT); 292 VideoCapturerAndroid.create("", null, EGL10.EGL_NO_CONTEXT);
289 VideoCapturerAndroidTestFixtures.returnBufferLateEndToEnd(capturer); 293 VideoCapturerAndroidTestFixtures.returnBufferLateEndToEnd(capturer);
290 } 294 }
291 295
292 @MediumTest 296 @MediumTest
293 // This test that CameraEventsHandler.onError is triggered if video buffers ar e not returned to 297 // This test that CameraEventsHandler.onError is triggered if video buffers ar e not returned to
294 // the capturer. 298 // the capturer.
295 public void testCameraErrorEventOnBufferStarvation() throws InterruptedExcepti on { 299 public void testCameraErrorEventOnBufferStarvation() throws InterruptedExcepti on {
296 VideoCapturerAndroidTestFixtures.CameraEvents cameraEvents = 300 VideoCapturerAndroidTestFixtures.CameraEvents cameraEvents =
297 VideoCapturerAndroidTestFixtures.createCameraEvents(); 301 VideoCapturerAndroidTestFixtures.createCameraEvents();
298 VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", cameraEvents ); 302 VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", cameraEvents );
299 VideoCapturerAndroidTestFixtures.cameraErrorEventOnBufferStarvation(capturer , 303 VideoCapturerAndroidTestFixtures.cameraErrorEventOnBufferStarvation(capturer ,
300 cameraEvents, getInstrumentation().getContext()); 304 cameraEvents, getInstrumentation().getContext());
301 } 305 }
302 } 306 }
OLDNEW
« no previous file with comments | « no previous file | talk/app/webrtc/java/android/org/webrtc/SurfaceViewRenderer.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698