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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 EglBase eglBase = EglBase.create(); | 301 EglBase eglBase = EglBase.create(); |
302 final VideoCapturerAndroid capturer = | 302 final VideoCapturerAndroid capturer = |
303 VideoCapturerAndroid.create("", null, eglBase.getEglBaseContext()); | 303 VideoCapturerAndroid.create("", null, eglBase.getEglBaseContext()); |
304 VideoCapturerAndroidTestFixtures.returnBufferLateEndToEnd(capturer); | 304 VideoCapturerAndroidTestFixtures.returnBufferLateEndToEnd(capturer); |
305 eglBase.release(); | 305 eglBase.release(); |
306 } | 306 } |
307 | 307 |
308 @MediumTest | 308 @MediumTest |
309 // This test that CameraEventsHandler.onError is triggered if video buffers ar
e not returned to | 309 // This test that CameraEventsHandler.onError is triggered if video buffers ar
e not returned to |
310 // the capturer. | 310 // the capturer. |
311 public void testCameraFreezedEventOnBufferStarvation() throws InterruptedExcep
tion { | 311 public void testCameraFreezedEventOnBufferStarvationUsingTextures() throws Int
erruptedException { |
| 312 EglBase eglBase = EglBase.create(); |
312 VideoCapturerAndroidTestFixtures.CameraEvents cameraEvents = | 313 VideoCapturerAndroidTestFixtures.CameraEvents cameraEvents = |
313 VideoCapturerAndroidTestFixtures.createCameraEvents(); | 314 VideoCapturerAndroidTestFixtures.createCameraEvents(); |
314 VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", cameraEvents
); | 315 VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", cameraEvents
, |
315 VideoCapturerAndroidTestFixtures.cameraFreezedEventOnBufferStarvation(captur
er, | 316 eglBase.getEglBaseContext()); |
| 317 VideoCapturerAndroidTestFixtures.cameraFreezedEventOnBufferStarvationUsingTe
xtures(capturer, |
316 cameraEvents, getInstrumentation().getContext()); | 318 cameraEvents, getInstrumentation().getContext()); |
| 319 eglBase.release(); |
317 } | 320 } |
318 | 321 |
319 @MediumTest | 322 @MediumTest |
320 // This test that frames forwarded to a renderer is scaled if onOutputFormatRe
quest is | 323 // This test that frames forwarded to a renderer is scaled if onOutputFormatRe
quest is |
321 // called. This test both Java and C++ parts of of the stack. | 324 // called. This test both Java and C++ parts of of the stack. |
322 public void testScaleCameraOutput() throws InterruptedException { | 325 public void testScaleCameraOutput() throws InterruptedException { |
323 VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", null); | 326 VideoCapturerAndroid capturer = VideoCapturerAndroid.create("", null); |
324 VideoCapturerAndroidTestFixtures.scaleCameraOutput(capturer); | 327 VideoCapturerAndroidTestFixtures.scaleCameraOutput(capturer); |
325 } | 328 } |
326 | 329 |
327 @MediumTest | 330 @MediumTest |
328 // This test that frames forwarded to a renderer is scaled if onOutputFormatRe
quest is | 331 // This test that frames forwarded to a renderer is scaled if onOutputFormatRe
quest is |
329 // called. This test both Java and C++ parts of of the stack. | 332 // called. This test both Java and C++ parts of of the stack. |
330 public void testScaleCameraOutputUsingTextures() throws InterruptedException { | 333 public void testScaleCameraOutputUsingTextures() throws InterruptedException { |
331 EglBase eglBase = EglBase.create(); | 334 EglBase eglBase = EglBase.create(); |
332 VideoCapturerAndroid capturer = | 335 VideoCapturerAndroid capturer = |
333 VideoCapturerAndroid.create("", null, eglBase.getEglBaseContext()); | 336 VideoCapturerAndroid.create("", null, eglBase.getEglBaseContext()); |
334 VideoCapturerAndroidTestFixtures.scaleCameraOutput(capturer); | 337 VideoCapturerAndroidTestFixtures.scaleCameraOutput(capturer); |
335 eglBase.release(); | 338 eglBase.release(); |
336 } | 339 } |
337 } | 340 } |
OLD | NEW |