| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 | 155 |
| 156 // Causes this encoder to let go of any other encoders it contains, and | 156 // Causes this encoder to let go of any other encoders it contains, and |
| 157 // returns a pointer to an array where they are stored (which is required to | 157 // returns a pointer to an array where they are stored (which is required to |
| 158 // live as long as this encoder). Unless the returned array is empty, you may | 158 // live as long as this encoder). Unless the returned array is empty, you may |
| 159 // not call any methods on this encoder afterwards, except for the | 159 // not call any methods on this encoder afterwards, except for the |
| 160 // destructor. The default implementation just returns an empty array. | 160 // destructor. The default implementation just returns an empty array. |
| 161 // NOTE: This method is subject to change. Do not call or override it. | 161 // NOTE: This method is subject to change. Do not call or override it. |
| 162 virtual rtc::ArrayView<std::unique_ptr<AudioEncoder>> | 162 virtual rtc::ArrayView<std::unique_ptr<AudioEncoder>> |
| 163 ReclaimContainedEncoders(); | 163 ReclaimContainedEncoders(); |
| 164 | 164 |
| 165 // Provides uplink bandwidth to this encoder to allow it to adapt. |
| 166 virtual void OnReceivedUplinkBandwidth(int uplink_bandwidth_bps); |
| 167 |
| 168 // Provides uplink packet loss fraction to this encoder to allow it to adapt. |
| 169 virtual void OnReceivedUplinkPacketLossFraction( |
| 170 float uplink_packet_loss_fraction); |
| 171 |
| 172 // Provides target audio bitrate to this encoder to allow it to adapt. |
| 173 virtual void OnReceivedTargetAudioBitrate(int target_audio_bitrate_bps); |
| 174 |
| 175 // Provides RTT to this encoder to allow it to adapt. |
| 176 virtual void OnReceivedRtt(int rtt_ms); |
| 177 |
| 165 protected: | 178 protected: |
| 166 // Subclasses implement this to perform the actual encoding. Called by | 179 // Subclasses implement this to perform the actual encoding. Called by |
| 167 // Encode(). | 180 // Encode(). |
| 168 virtual EncodedInfo EncodeImpl(uint32_t rtp_timestamp, | 181 virtual EncodedInfo EncodeImpl(uint32_t rtp_timestamp, |
| 169 rtc::ArrayView<const int16_t> audio, | 182 rtc::ArrayView<const int16_t> audio, |
| 170 rtc::Buffer* encoded) = 0; | 183 rtc::Buffer* encoded) = 0; |
| 171 }; | 184 }; |
| 172 } // namespace webrtc | 185 } // namespace webrtc |
| 173 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_H_ | 186 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_H_ |
| OLD | NEW |