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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 // |uplink_packet_loss_fraction| is in the range [0.0, 1.0]. | 174 // |uplink_packet_loss_fraction| is in the range [0.0, 1.0]. |
175 virtual void OnReceivedUplinkPacketLossFraction( | 175 virtual void OnReceivedUplinkPacketLossFraction( |
176 float uplink_packet_loss_fraction); | 176 float uplink_packet_loss_fraction); |
177 | 177 |
178 // Provides target audio bitrate to this encoder to allow it to adapt. | 178 // Provides target audio bitrate to this encoder to allow it to adapt. |
179 virtual void OnReceivedTargetAudioBitrate(int target_audio_bitrate_bps); | 179 virtual void OnReceivedTargetAudioBitrate(int target_audio_bitrate_bps); |
180 | 180 |
181 // Provides RTT to this encoder to allow it to adapt. | 181 // Provides RTT to this encoder to allow it to adapt. |
182 virtual void OnReceivedRtt(int rtt_ms); | 182 virtual void OnReceivedRtt(int rtt_ms); |
183 | 183 |
| 184 // Provides overhead to this encoder to adapt. The overhead is the number of |
| 185 // bytes that will be added to each packet the encoder generates. |
| 186 virtual void OnReceivedOverhead(size_t overhead_bytes_per_packet); |
| 187 |
184 // To allow encoder to adapt its frame length, it must be provided the frame | 188 // To allow encoder to adapt its frame length, it must be provided the frame |
185 // length range that receivers can accept. | 189 // length range that receivers can accept. |
186 virtual void SetReceiverFrameLengthRange(int min_frame_length_ms, | 190 virtual void SetReceiverFrameLengthRange(int min_frame_length_ms, |
187 int max_frame_length_ms); | 191 int max_frame_length_ms); |
188 | 192 |
189 protected: | 193 protected: |
190 // Subclasses implement this to perform the actual encoding. Called by | 194 // Subclasses implement this to perform the actual encoding. Called by |
191 // Encode(). | 195 // Encode(). |
192 virtual EncodedInfo EncodeImpl(uint32_t rtp_timestamp, | 196 virtual EncodedInfo EncodeImpl(uint32_t rtp_timestamp, |
193 rtc::ArrayView<const int16_t> audio, | 197 rtc::ArrayView<const int16_t> audio, |
194 rtc::Buffer* encoded) = 0; | 198 rtc::Buffer* encoded) = 0; |
195 }; | 199 }; |
196 } // namespace webrtc | 200 } // namespace webrtc |
197 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_H_ | 201 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_H_ |
OLD | NEW |