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

Side by Side Diff: webrtc/examples/androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java

Issue 2354883002: Add new Camera2Enumerator.isSupported with Context parameter. (Closed)
Patch Set: Cleanup. Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « webrtc/examples/androidapp/src/org/appspot/apprtc/SettingsActivity.java ('k') | no next file » | 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 * Copyright 2014 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2014 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 false /* useOpenSLES */, 284 false /* useOpenSLES */,
285 false /* disableBuiltInAEC */, 285 false /* disableBuiltInAEC */,
286 false /* disableBuiltInAGC */, 286 false /* disableBuiltInAGC */,
287 false /* disableBuiltInNS */, 287 false /* disableBuiltInNS */,
288 false /* enableLevelControl */); 288 false /* enableLevelControl */);
289 return peerConnectionParameters; 289 return peerConnectionParameters;
290 } 290 }
291 291
292 private PeerConnectionParameters createParametersForVideoCall( 292 private PeerConnectionParameters createParametersForVideoCall(
293 String videoCodec, boolean captureToTexture) { 293 String videoCodec, boolean captureToTexture) {
294 final boolean useCamera2 = captureToTexture && Camera2Enumerator.isSupported (); 294 final boolean useCamera2 = captureToTexture
295 && Camera2Enumerator.isSupported(getInstrumentation().getTargetContext() );
295 296
296 PeerConnectionParameters peerConnectionParameters = 297 PeerConnectionParameters peerConnectionParameters =
297 new PeerConnectionParameters( 298 new PeerConnectionParameters(
298 true, /* videoCallEnabled */ 299 true, /* videoCallEnabled */
299 true, /* loopback */ 300 true, /* loopback */
300 false, /* tracing */ 301 false, /* tracing */
301 // Video codec parameters. 302 // Video codec parameters.
302 useCamera2, /* useCamera2 */ 303 useCamera2, /* useCamera2 */
303 0, /* videoWidth */ 304 0, /* videoWidth */
304 0, /* videoHeight */ 305 0, /* videoHeight */
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 assertTrue("Remote video frames were not rendered after capture format cha nge.", 666 assertTrue("Remote video frames were not rendered after capture format cha nge.",
666 remoteRenderer.waitForFramesRendered(WAIT_TIMEOUT)); 667 remoteRenderer.waitForFramesRendered(WAIT_TIMEOUT));
667 } 668 }
668 669
669 pcClient.close(); 670 pcClient.close();
670 assertTrue(waitForPeerConnectionClosed(WAIT_TIMEOUT)); 671 assertTrue(waitForPeerConnectionClosed(WAIT_TIMEOUT));
671 Log.d(TAG, "testCaptureFormatChange done."); 672 Log.d(TAG, "testCaptureFormatChange done.");
672 } 673 }
673 674
674 } 675 }
OLDNEW
« no previous file with comments | « webrtc/examples/androidapp/src/org/appspot/apprtc/SettingsActivity.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698