| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 726 aux_rtp_header_->type.Audio.channel = 1; | 726 aux_rtp_header_->type.Audio.channel = 1; |
| 727 } | 727 } |
| 728 | 728 |
| 729 aux_rtp_header_->header.timestamp = timestamp; | 729 aux_rtp_header_->header.timestamp = timestamp; |
| 730 IncomingPacket(incoming_payload, payload_length, *aux_rtp_header_); | 730 IncomingPacket(incoming_payload, payload_length, *aux_rtp_header_); |
| 731 // Get ready for the next payload. | 731 // Get ready for the next payload. |
| 732 aux_rtp_header_->header.sequenceNumber++; | 732 aux_rtp_header_->header.sequenceNumber++; |
| 733 return 0; | 733 return 0; |
| 734 } | 734 } |
| 735 | 735 |
| 736 // TODO(henrik.lundin): Remove? Only used in tests. Deprecated in VoiceEngine. | |
| 737 int AudioCodingModuleImpl::SetISACMaxRate(int max_bit_per_sec) { | |
| 738 CriticalSectionScoped lock(acm_crit_sect_.get()); | |
| 739 | |
| 740 if (!HaveValidEncoder("SetISACMaxRate")) { | |
| 741 return -1; | |
| 742 } | |
| 743 | |
| 744 codec_manager_.CurrentEncoder()->SetMaxBitrate(max_bit_per_sec); | |
| 745 return 0; | |
| 746 } | |
| 747 | |
| 748 // TODO(henrik.lundin): Remove? Only used in tests. Deprecated in VoiceEngine. | |
| 749 int AudioCodingModuleImpl::SetISACMaxPayloadSize(int max_size_bytes) { | |
| 750 CriticalSectionScoped lock(acm_crit_sect_.get()); | |
| 751 | |
| 752 if (!HaveValidEncoder("SetISACMaxPayloadSize")) { | |
| 753 return -1; | |
| 754 } | |
| 755 | |
| 756 codec_manager_.CurrentEncoder()->SetMaxPayloadSize(max_size_bytes); | |
| 757 return 0; | |
| 758 } | |
| 759 | |
| 760 int AudioCodingModuleImpl::SetOpusApplication(OpusApplicationMode application) { | 736 int AudioCodingModuleImpl::SetOpusApplication(OpusApplicationMode application) { |
| 761 CriticalSectionScoped lock(acm_crit_sect_.get()); | 737 CriticalSectionScoped lock(acm_crit_sect_.get()); |
| 762 if (!HaveValidEncoder("SetOpusApplication")) { | 738 if (!HaveValidEncoder("SetOpusApplication")) { |
| 763 return -1; | 739 return -1; |
| 764 } | 740 } |
| 765 if (!codec_manager_.CurrentEncoderIsOpus()) | 741 if (!codec_manager_.CurrentEncoderIsOpus()) |
| 766 return -1; | 742 return -1; |
| 767 AudioEncoder::Application app; | 743 AudioEncoder::Application app; |
| 768 switch (application) { | 744 switch (application) { |
| 769 case kVoip: | 745 case kVoip: |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1157 *channels = 1; | 1133 *channels = 1; |
| 1158 break; | 1134 break; |
| 1159 #endif | 1135 #endif |
| 1160 default: | 1136 default: |
| 1161 FATAL() << "Codec type " << codec_type << " not supported."; | 1137 FATAL() << "Codec type " << codec_type << " not supported."; |
| 1162 } | 1138 } |
| 1163 return true; | 1139 return true; |
| 1164 } | 1140 } |
| 1165 | 1141 |
| 1166 } // namespace webrtc | 1142 } // namespace webrtc |
| OLD | NEW |