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 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 factory.createAudioSource(audioConstraints))); | 491 factory.createAudioSource(audioConstraints))); |
492 peerConnection.addStream(mediaStream); | 492 peerConnection.addStream(mediaStream); |
493 | 493 |
494 if (peerConnectionParameters.aecDump) { | 494 if (peerConnectionParameters.aecDump) { |
495 try { | 495 try { |
496 aecDumpFileDescriptor = ParcelFileDescriptor.open( | 496 aecDumpFileDescriptor = ParcelFileDescriptor.open( |
497 new File("/sdcard/Download/audio.aecdump"), | 497 new File("/sdcard/Download/audio.aecdump"), |
498 ParcelFileDescriptor.MODE_READ_WRITE | | 498 ParcelFileDescriptor.MODE_READ_WRITE | |
499 ParcelFileDescriptor.MODE_CREATE | | 499 ParcelFileDescriptor.MODE_CREATE | |
500 ParcelFileDescriptor.MODE_TRUNCATE); | 500 ParcelFileDescriptor.MODE_TRUNCATE); |
501 factory.startAecDump(aecDumpFileDescriptor.getFd()); | 501 factory.startAecDump(aecDumpFileDescriptor.getFd(), -1); |
502 } catch(IOException e) { | 502 } catch(IOException e) { |
503 Log.e(TAG, "Can not open aecdump file", e); | 503 Log.e(TAG, "Can not open aecdump file", e); |
504 } | 504 } |
505 } | 505 } |
506 | 506 |
507 Log.d(TAG, "Peer connection created."); | 507 Log.d(TAG, "Peer connection created."); |
508 } | 508 } |
509 | 509 |
510 private void closeInternal() { | 510 private void closeInternal() { |
511 if (factory != null && peerConnectionParameters.aecDump) { | 511 if (factory != null && peerConnectionParameters.aecDump) { |
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1076 public void onCreateFailure(final String error) { | 1076 public void onCreateFailure(final String error) { |
1077 reportError("createSDP error: " + error); | 1077 reportError("createSDP error: " + error); |
1078 } | 1078 } |
1079 | 1079 |
1080 @Override | 1080 @Override |
1081 public void onSetFailure(final String error) { | 1081 public void onSetFailure(final String error) { |
1082 reportError("setSDP error: " + error); | 1082 reportError("setSDP error: " + error); |
1083 } | 1083 } |
1084 } | 1084 } |
1085 } | 1085 } |
OLD | NEW |