OLD | NEW |
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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 @SmallTest | 101 @SmallTest |
102 // This test that the camera can be started and that the frames are forwarded | 102 // This test that the camera can be started and that the frames are forwarded |
103 // to a Java video renderer using a "default" capturer. | 103 // to a Java video renderer using a "default" capturer. |
104 // It tests both the Java and the C++ layer. | 104 // It tests both the Java and the C++ layer. |
105 public void testStartVideoCapturer() throws InterruptedException { | 105 public void testStartVideoCapturer() throws InterruptedException { |
106 VideoCapturerAndroid capturer = | 106 VideoCapturerAndroid capturer = |
107 VideoCapturerAndroid.create("", null); | 107 VideoCapturerAndroid.create("", null); |
108 VideoCapturerAndroidTestFixtures.startCapturerAndRender(capturer); | 108 VideoCapturerAndroidTestFixtures.startCapturerAndRender(capturer); |
109 } | 109 } |
110 | 110 |
111 // TODO(perkj): Enable once VideoCapture to texture support has landed in C++. | |
112 @SmallTest | 111 @SmallTest |
113 public void DISABLED_testStartVideoCapturerUsingTextures() throws InterruptedE
xception { | 112 public void testStartVideoCapturerUsingTextures() throws InterruptedException
{ |
114 VideoCapturerAndroid capturer = | 113 VideoCapturerAndroid capturer = |
115 VideoCapturerAndroid.create("", null, EGL10.EGL_NO_CONTEXT); | 114 VideoCapturerAndroid.create("", null, EGL10.EGL_NO_CONTEXT); |
116 VideoCapturerAndroidTestFixtures.startCapturerAndRender(capturer); | 115 VideoCapturerAndroidTestFixtures.startCapturerAndRender(capturer); |
117 } | 116 } |
118 | 117 |
119 @SmallTest | 118 @SmallTest |
120 // 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 |
121 // to a Java video renderer using the front facing video capturer. | 120 // to a Java video renderer using the front facing video capturer. |
122 // It tests both the Java and the C++ layer. | 121 // It tests both the Java and the C++ layer. |
123 public void testStartFrontFacingVideoCapturer() throws InterruptedException { | 122 public void testStartFrontFacingVideoCapturer() throws InterruptedException { |
(...skipping 20 matching lines...) Expand all Loading... |
144 | 143 |
145 @SmallTest | 144 @SmallTest |
146 // 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 |
147 // later be switched to another camera. | 146 // later be switched to another camera. |
148 // It tests both the Java and the C++ layer. | 147 // It tests both the Java and the C++ layer. |
149 public void testSwitchVideoCapturer() throws InterruptedException { | 148 public void testSwitchVideoCapturer() throws InterruptedException { |
150 VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", null); | 149 VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", null); |
151 VideoCapturerAndroidTestFixtures.switchCamera(capturer); | 150 VideoCapturerAndroidTestFixtures.switchCamera(capturer); |
152 } | 151 } |
153 | 152 |
154 // TODO(perkj): Enable once VideoCapture to texture support has landed in C++. | |
155 @SmallTest | 153 @SmallTest |
156 public void DISABLED_testSwitchVideoCapturerUsingTextures() throws Interrupted
Exception { | 154 public void testSwitchVideoCapturerUsingTextures() throws InterruptedException
{ |
157 VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", null, EGL10.
EGL_NO_CONTEXT); | 155 VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", null, EGL10.
EGL_NO_CONTEXT); |
158 VideoCapturerAndroidTestFixtures.switchCamera(capturer); | 156 VideoCapturerAndroidTestFixtures.switchCamera(capturer); |
159 } | 157 } |
160 | 158 |
161 @MediumTest | 159 @MediumTest |
162 public void testCameraEvents() throws InterruptedException { | 160 public void testCameraEvents() throws InterruptedException { |
163 VideoCapturerAndroidTestFixtures.CameraEvents cameraEvents = | 161 VideoCapturerAndroidTestFixtures.CameraEvents cameraEvents = |
164 VideoCapturerAndroidTestFixtures.createCameraEvents(); | 162 VideoCapturerAndroidTestFixtures.createCameraEvents(); |
165 VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", cameraEvents
); | 163 VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", cameraEvents
); |
166 VideoCapturerAndroidTestFixtures.cameraEventsInvoked( | 164 VideoCapturerAndroidTestFixtures.cameraEventsInvoked( |
(...skipping 21 matching lines...) Expand all Loading... |
188 } | 186 } |
189 | 187 |
190 @SmallTest | 188 @SmallTest |
191 // This test that the VideoSource that the VideoCapturer is connected to can | 189 // This test that the VideoSource that the VideoCapturer is connected to can |
192 // be stopped and restarted. It tests both the Java and the C++ layer. | 190 // be stopped and restarted. It tests both the Java and the C++ layer. |
193 public void testStopRestartVideoSource() throws InterruptedException { | 191 public void testStopRestartVideoSource() throws InterruptedException { |
194 VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", null); | 192 VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", null); |
195 VideoCapturerAndroidTestFixtures.stopRestartVideoSource(capturer); | 193 VideoCapturerAndroidTestFixtures.stopRestartVideoSource(capturer); |
196 } | 194 } |
197 | 195 |
198 // TODO(perkj): Enable once VideoCapture to texture support has landed in C++. | |
199 @SmallTest | 196 @SmallTest |
200 public void DISABLED_testStopRestartVideoSourceUsingTextures() throws Interrup
tedException { | 197 public void testStopRestartVideoSourceUsingTextures() throws InterruptedExcept
ion { |
201 VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", null, EGL10.
EGL_NO_CONTEXT); | 198 VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", null, EGL10.
EGL_NO_CONTEXT); |
202 VideoCapturerAndroidTestFixtures.stopRestartVideoSource(capturer); | 199 VideoCapturerAndroidTestFixtures.stopRestartVideoSource(capturer); |
203 } | 200 } |
204 | 201 |
205 @SmallTest | 202 @SmallTest |
206 // This test that the camera can be started at different resolutions. | 203 // This test that the camera can be started at different resolutions. |
207 // It does not test or use the C++ layer. | 204 // It does not test or use the C++ layer. |
208 public void testStartStopWithDifferentResolutions() throws InterruptedExceptio
n { | 205 public void testStartStopWithDifferentResolutions() throws InterruptedExceptio
n { |
209 String deviceName = CameraEnumerationAndroid.getDeviceName(0); | 206 String deviceName = CameraEnumerationAndroid.getDeviceName(0); |
210 VideoCapturerAndroid capturer = | 207 VideoCapturerAndroid capturer = |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 | 241 |
245 @MediumTest | 242 @MediumTest |
246 // This test that we can capture frames, keep the frames in a local renderer,
stop capturing, | 243 // This test that we can capture frames, keep the frames in a local renderer,
stop capturing, |
247 // and then return the frames. The difference between the test testReturnBuffe
rLate() is that we | 244 // and then return the frames. The difference between the test testReturnBuffe
rLate() is that we |
248 // also test the JNI and C++ AndroidVideoCapturer parts. | 245 // also test the JNI and C++ AndroidVideoCapturer parts. |
249 public void testReturnBufferLateEndToEnd() throws InterruptedException { | 246 public void testReturnBufferLateEndToEnd() throws InterruptedException { |
250 final VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", null); | 247 final VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", null); |
251 VideoCapturerAndroidTestFixtures.returnBufferLateEndToEnd(capturer); | 248 VideoCapturerAndroidTestFixtures.returnBufferLateEndToEnd(capturer); |
252 } | 249 } |
253 | 250 |
254 // TODO(perkj): Enable once VideoCapture to texture support has landed in C++. | |
255 @MediumTest | 251 @MediumTest |
256 public void DISABLED_testReturnBufferLateEndToEndUsingTextures() throws Interr
uptedException { | 252 public void testReturnBufferLateEndToEndUsingTextures() throws InterruptedExce
ption { |
257 final VideoCapturerAndroid capturer = | 253 final VideoCapturerAndroid capturer = |
258 VideoCapturerAndroid.create("", null, EGL10.EGL_NO_CONTEXT); | 254 VideoCapturerAndroid.create("", null, EGL10.EGL_NO_CONTEXT); |
259 VideoCapturerAndroidTestFixtures.returnBufferLateEndToEnd(capturer); | 255 VideoCapturerAndroidTestFixtures.returnBufferLateEndToEnd(capturer); |
260 } | 256 } |
261 } | 257 } |
OLD | NEW |