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 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
504 return; | 504 return; |
505 } | 505 } |
506 mediaStream.addTrack(createVideoTrack(videoCapturer)); | 506 mediaStream.addTrack(createVideoTrack(videoCapturer)); |
507 } | 507 } |
508 | 508 |
509 mediaStream.addTrack(createAudioTrack()); | 509 mediaStream.addTrack(createAudioTrack()); |
510 peerConnection.addStream(mediaStream); | 510 peerConnection.addStream(mediaStream); |
511 | 511 |
512 if (peerConnectionParameters.aecDump) { | 512 if (peerConnectionParameters.aecDump) { |
513 try { | 513 try { |
514 aecDumpFileDescriptor = ParcelFileDescriptor.open( | 514 aecDumpFileDescriptor = ParcelFileDescriptor.open( |
sakal
2016/06/10 07:27:41
Please use 2 space indentation instead of 4 space
| |
515 new File(Environment.getExternalStorageDirectory().getPath() | 515 new File(Environment.getExternalStorageDirectory().getPath() + File.separator |
516 + "Download/audio.aecdump"), | 516 + "Download/audio.aecdump"), |
517 ParcelFileDescriptor.MODE_READ_WRITE | | 517 ParcelFileDescriptor.MODE_READ_WRITE | ParcelFileDescriptor.MO DE_CREATE |
518 ParcelFileDescriptor.MODE_CREATE | | 518 | ParcelFileDescriptor.MODE_TRUNCATE); |
519 ParcelFileDescriptor.MODE_TRUNCATE); | 519 factory.startAecDump(aecDumpFileDescriptor.getFd(), -1); |
520 factory.startAecDump(aecDumpFileDescriptor.getFd(), -1); | |
521 } catch(IOException e) { | 520 } catch(IOException e) { |
522 Log.e(TAG, "Can not open aecdump file", e); | 521 Log.e(TAG, "Can not open aecdump file", e); |
523 } | 522 } |
524 } | 523 } |
525 | 524 |
526 Log.d(TAG, "Peer connection created."); | 525 Log.d(TAG, "Peer connection created."); |
527 } | 526 } |
528 | 527 |
529 private void closeInternal() { | 528 private void closeInternal() { |
530 if (factory != null && peerConnectionParameters.aecDump) { | 529 if (factory != null && peerConnectionParameters.aecDump) { |
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1136 public void onCreateFailure(final String error) { | 1135 public void onCreateFailure(final String error) { |
1137 reportError("createSDP error: " + error); | 1136 reportError("createSDP error: " + error); |
1138 } | 1137 } |
1139 | 1138 |
1140 @Override | 1139 @Override |
1141 public void onSetFailure(final String error) { | 1140 public void onSetFailure(final String error) { |
1142 reportError("setSDP error: " + error); | 1141 reportError("setSDP error: " + error); |
1143 } | 1142 } |
1144 } | 1143 } |
1145 } | 1144 } |
OLD | NEW |