| OLD | NEW |
| 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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 0, /* videoFps */ | 274 0, /* videoFps */ |
| 275 0, /* videoStartBitrate */ | 275 0, /* videoStartBitrate */ |
| 276 "", /* videoCodec */ | 276 "", /* videoCodec */ |
| 277 true, /* videoCodecHwAcceleration */ | 277 true, /* videoCodecHwAcceleration */ |
| 278 false, /* captureToToTexture */ | 278 false, /* captureToToTexture */ |
| 279 // Audio codec parameters. | 279 // Audio codec parameters. |
| 280 0, /* audioStartBitrate */ | 280 0, /* audioStartBitrate */ |
| 281 "OPUS", /* audioCodec */ | 281 "OPUS", /* audioCodec */ |
| 282 false, /* noAudioProcessing */ | 282 false, /* noAudioProcessing */ |
| 283 false, /* aecDump */ | 283 false, /* aecDump */ |
| 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 null, /* videoFileAsCamera */ |
| 290 0, 0 /* videoFileAsCameraWidth, videoFileAsCameraHeight */); |
| 289 return peerConnectionParameters; | 291 return peerConnectionParameters; |
| 290 } | 292 } |
| 291 | 293 |
| 292 private PeerConnectionParameters createParametersForVideoCall( | 294 private PeerConnectionParameters createParametersForVideoCall( |
| 293 String videoCodec, boolean captureToTexture) { | 295 String videoCodec, boolean captureToTexture) { |
| 294 final boolean useCamera2 = captureToTexture && Camera2Enumerator.isSupported
(); | 296 final boolean useCamera2 = captureToTexture && Camera2Enumerator.isSupported
(); |
| 295 | 297 |
| 296 PeerConnectionParameters peerConnectionParameters = | 298 PeerConnectionParameters peerConnectionParameters = |
| 297 new PeerConnectionParameters( | 299 new PeerConnectionParameters( |
| 298 true, /* videoCallEnabled */ | 300 true, /* videoCallEnabled */ |
| 299 true, /* loopback */ | 301 true, /* loopback */ |
| 300 false, /* tracing */ | 302 false, /* tracing */ |
| 301 // Video codec parameters. | 303 // Video codec parameters. |
| 302 useCamera2, /* useCamera2 */ | 304 useCamera2, /* useCamera2 */ |
| 303 0, /* videoWidth */ | 305 0, /* videoWidth */ |
| 304 0, /* videoHeight */ | 306 0, /* videoHeight */ |
| 305 0, /* videoFps */ | 307 0, /* videoFps */ |
| 306 0, /* videoStartBitrate */ | 308 0, /* videoStartBitrate */ |
| 307 videoCodec, /* videoCodec */ | 309 videoCodec, /* videoCodec */ |
| 308 true, /* videoCodecHwAcceleration */ | 310 true, /* videoCodecHwAcceleration */ |
| 309 captureToTexture, /* captureToToTexture */ | 311 captureToTexture, /* captureToToTexture */ |
| 310 // Audio codec parameters. | 312 // Audio codec parameters. |
| 311 0, /* audioStartBitrate */ | 313 0, /* audioStartBitrate */ |
| 312 "OPUS", /* audioCodec */ | 314 "OPUS", /* audioCodec */ |
| 313 false, /* noAudioProcessing */ | 315 false, /* noAudioProcessing */ |
| 314 false, /* aecDump */ | 316 false, /* aecDump */ |
| 315 false /* useOpenSLES */, | 317 false, /* useOpenSLES */ |
| 316 false /* disableBuiltInAEC */, | 318 false, /* disableBuiltInAEC */ |
| 317 false /* disableBuiltInAGC */, | 319 false, /* disableBuiltInAGC */ |
| 318 false /* disableBuiltInNS */, | 320 false, /* disableBuiltInNS */ |
| 319 false /* enableLevelControl */); | 321 false, /* enableLevelControl */ |
| 322 null, /* videoFileAsCamera */ |
| 323 0, 0 /* videoFileAsCameraWidth, videoFileAsCameraHeight */); |
| 324 |
| 325 |
| 320 return peerConnectionParameters; | 326 return peerConnectionParameters; |
| 321 } | 327 } |
| 322 | 328 |
| 323 @Override | 329 @Override |
| 324 public void setUp() { | 330 public void setUp() { |
| 325 signalingExecutor = Executors.newSingleThreadExecutor(); | 331 signalingExecutor = Executors.newSingleThreadExecutor(); |
| 326 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { | 332 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { |
| 327 eglBase = EglBase.create(); | 333 eglBase = EglBase.create(); |
| 328 } | 334 } |
| 329 } | 335 } |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 665 assertTrue("Remote video frames were not rendered after capture format cha
nge.", | 671 assertTrue("Remote video frames were not rendered after capture format cha
nge.", |
| 666 remoteRenderer.waitForFramesRendered(WAIT_TIMEOUT)); | 672 remoteRenderer.waitForFramesRendered(WAIT_TIMEOUT)); |
| 667 } | 673 } |
| 668 | 674 |
| 669 pcClient.close(); | 675 pcClient.close(); |
| 670 assertTrue(waitForPeerConnectionClosed(WAIT_TIMEOUT)); | 676 assertTrue(waitForPeerConnectionClosed(WAIT_TIMEOUT)); |
| 671 Log.d(TAG, "testCaptureFormatChange done."); | 677 Log.d(TAG, "testCaptureFormatChange done."); |
| 672 } | 678 } |
| 673 | 679 |
| 674 } | 680 } |
| OLD | NEW |