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

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

Issue 1530843002: Android VideoCapture : Use NV21 instead of YUV12 and clean up. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years 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
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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698