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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 client.createPeerConnectionFactory( | 256 client.createPeerConnectionFactory( |
257 getInstrumentation().getContext(), peerConnectionParameters, this); | 257 getInstrumentation().getContext(), peerConnectionParameters, this); |
258 client.createPeerConnection(eglContext, localRenderer, remoteRenderer, signa
lingParameters); | 258 client.createPeerConnection(eglContext, localRenderer, remoteRenderer, signa
lingParameters); |
259 client.createOffer(); | 259 client.createOffer(); |
260 return client; | 260 return client; |
261 } | 261 } |
262 | 262 |
263 private PeerConnectionParameters createParametersForAudioCall() { | 263 private PeerConnectionParameters createParametersForAudioCall() { |
264 PeerConnectionParameters peerConnectionParameters = | 264 PeerConnectionParameters peerConnectionParameters = |
265 new PeerConnectionParameters( | 265 new PeerConnectionParameters( |
266 false, true, false, // videoCallEnabled, loopback, tracing. | 266 false, /* videoCallEnabled */ |
267 0, 0, 0, 0, "", true, false, // video codec parameters. | 267 true, /* loopback */ |
268 0, "OPUS", false, false, false); // audio codec parameters. | 268 false, /* tracing */ |
| 269 // Video codec parameters. |
| 270 0, /* videoWidth */ |
| 271 0, /* videoHeight */ |
| 272 0, /* videoFps */ |
| 273 0, /* videoStartBitrate */ |
| 274 "", /* videoCodec */ |
| 275 true, /* videoCodecHwAcceleration */ |
| 276 false, /* captureToToTexture */ |
| 277 // Audio codec parameters. |
| 278 0, /* audioStartBitrate */ |
| 279 "OPUS", /* audioCodec */ |
| 280 false, /* noAudioProcessing */ |
| 281 false, /* aecDump */ |
| 282 false /* useOpenSLES */, |
| 283 false /* disableBuiltInAEC */); |
269 return peerConnectionParameters; | 284 return peerConnectionParameters; |
270 } | 285 } |
271 | 286 |
272 private PeerConnectionParameters createParametersForVideoCall( | 287 private PeerConnectionParameters createParametersForVideoCall( |
273 String videoCodec, boolean captureToTexture) { | 288 String videoCodec, boolean captureToTexture) { |
274 PeerConnectionParameters peerConnectionParameters = | 289 PeerConnectionParameters peerConnectionParameters = |
275 new PeerConnectionParameters( | 290 new PeerConnectionParameters( |
276 true, true, false, // videoCallEnabled, loopback, tracing. | 291 true, /* videoCallEnabled */ |
277 0, 0, 0, 0, videoCodec, true, captureToTexture, // video codec param
eters. | 292 true, /* loopback */ |
278 0, "OPUS", false, false, false); // audio codec parameters. | 293 false, /* tracing */ |
| 294 // Video codec parameters. |
| 295 0, /* videoWidth */ |
| 296 0, /* videoHeight */ |
| 297 0, /* videoFps */ |
| 298 0, /* videoStartBitrate */ |
| 299 videoCodec, /* videoCodec */ |
| 300 true, /* videoCodecHwAcceleration */ |
| 301 captureToTexture, /* captureToToTexture */ |
| 302 // Audio codec parameters. |
| 303 0, /* audioStartBitrate */ |
| 304 "OPUS", /* audioCodec */ |
| 305 false, /* noAudioProcessing */ |
| 306 false, /* aecDump */ |
| 307 false /* useOpenSLES */, |
| 308 false /* disableBuiltInAEC */); |
279 return peerConnectionParameters; | 309 return peerConnectionParameters; |
280 } | 310 } |
281 | 311 |
| 312 |
282 @Override | 313 @Override |
283 public void setUp() { | 314 public void setUp() { |
284 signalingExecutor = Executors.newSingleThreadExecutor(); | 315 signalingExecutor = Executors.newSingleThreadExecutor(); |
285 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { | 316 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { |
286 eglBase = EglBase.create(); | 317 eglBase = EglBase.create(); |
287 } | 318 } |
288 } | 319 } |
289 | 320 |
290 @Override | 321 @Override |
291 public void tearDown() { | 322 public void tearDown() { |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 assertTrue("Remote video frames were not rendered after capture format cha
nge.", | 655 assertTrue("Remote video frames were not rendered after capture format cha
nge.", |
625 remoteRenderer.waitForFramesRendered(WAIT_TIMEOUT)); | 656 remoteRenderer.waitForFramesRendered(WAIT_TIMEOUT)); |
626 } | 657 } |
627 | 658 |
628 pcClient.close(); | 659 pcClient.close(); |
629 assertTrue(waitForPeerConnectionClosed(WAIT_TIMEOUT)); | 660 assertTrue(waitForPeerConnectionClosed(WAIT_TIMEOUT)); |
630 Log.d(TAG, "testCaptureFormatChange done."); | 661 Log.d(TAG, "testCaptureFormatChange done."); |
631 } | 662 } |
632 | 663 |
633 } | 664 } |
OLD | NEW |