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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 mediaStream = factory.createLocalMediaStream("ARDAMS"); | 481 mediaStream = factory.createLocalMediaStream("ARDAMS"); |
482 if (videoCallEnabled) { | 482 if (videoCallEnabled) { |
483 String cameraDeviceName = CameraEnumerationAndroid.getDeviceName(0); | 483 String cameraDeviceName = CameraEnumerationAndroid.getDeviceName(0); |
484 String frontCameraDeviceName = | 484 String frontCameraDeviceName = |
485 CameraEnumerationAndroid.getNameOfFrontFacingDevice(); | 485 CameraEnumerationAndroid.getNameOfFrontFacingDevice(); |
486 if (numberOfCameras > 1 && frontCameraDeviceName != null) { | 486 if (numberOfCameras > 1 && frontCameraDeviceName != null) { |
487 cameraDeviceName = frontCameraDeviceName; | 487 cameraDeviceName = frontCameraDeviceName; |
488 } | 488 } |
489 Log.d(TAG, "Opening camera: " + cameraDeviceName); | 489 Log.d(TAG, "Opening camera: " + cameraDeviceName); |
490 videoCapturer = VideoCapturerAndroid.create(cameraDeviceName, null, | 490 videoCapturer = VideoCapturerAndroid.create(cameraDeviceName, null, |
491 peerConnectionParameters.captureToTexture ? renderEGLContext : null); | 491 peerConnectionParameters.captureToTexture); |
492 if (videoCapturer == null) { | 492 if (videoCapturer == null) { |
493 reportError("Failed to open camera"); | 493 reportError("Failed to open camera"); |
494 return; | 494 return; |
495 } | 495 } |
496 mediaStream.addTrack(createVideoTrack(videoCapturer)); | 496 mediaStream.addTrack(createVideoTrack(videoCapturer)); |
497 } | 497 } |
498 | 498 |
499 mediaStream.addTrack(createAudioTrack()); | 499 mediaStream.addTrack(createAudioTrack()); |
500 peerConnection.addStream(mediaStream); | 500 peerConnection.addStream(mediaStream); |
501 | 501 |
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1130 public void onCreateFailure(final String error) { | 1130 public void onCreateFailure(final String error) { |
1131 reportError("createSDP error: " + error); | 1131 reportError("createSDP error: " + error); |
1132 } | 1132 } |
1133 | 1133 |
1134 @Override | 1134 @Override |
1135 public void onSetFailure(final String error) { | 1135 public void onSetFailure(final String error) { |
1136 reportError("setSDP error: " + error); | 1136 reportError("setSDP error: " + error); |
1137 } | 1137 } |
1138 } | 1138 } |
1139 } | 1139 } |
OLD | NEW |