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