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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 virtual void OnReceivedUplinkRecoverablePacketLossFraction( | 182 virtual void OnReceivedUplinkRecoverablePacketLossFraction( |
183 float uplink_recoverable_packet_loss_fraction); | 183 float uplink_recoverable_packet_loss_fraction); |
184 | 184 |
185 // Provides target audio bitrate to this encoder to allow it to adapt. | 185 // Provides target audio bitrate to this encoder to allow it to adapt. |
186 virtual void OnReceivedTargetAudioBitrate(int target_bps); | 186 virtual void OnReceivedTargetAudioBitrate(int target_bps); |
187 | 187 |
188 // Provides target audio bitrate and corresponding probing interval of | 188 // Provides target audio bitrate and corresponding probing interval of |
189 // the bandwidth estimator to this encoder to allow it to adapt. | 189 // the bandwidth estimator to this encoder to allow it to adapt. |
190 virtual void OnReceivedUplinkBandwidth( | 190 virtual void OnReceivedUplinkBandwidth( |
191 int target_audio_bitrate_bps, | 191 int target_audio_bitrate_bps, |
192 rtc::Optional<int64_t> probing_interval_ms); | 192 rtc::Optional<int64_t> bwe_period_ms); |
193 | 193 |
194 // Provides RTT to this encoder to allow it to adapt. | 194 // Provides RTT to this encoder to allow it to adapt. |
195 virtual void OnReceivedRtt(int rtt_ms); | 195 virtual void OnReceivedRtt(int rtt_ms); |
196 | 196 |
197 // Provides overhead to this encoder to adapt. The overhead is the number of | 197 // Provides overhead to this encoder to adapt. The overhead is the number of |
198 // bytes that will be added to each packet the encoder generates. | 198 // bytes that will be added to each packet the encoder generates. |
199 virtual void OnReceivedOverhead(size_t overhead_bytes_per_packet); | 199 virtual void OnReceivedOverhead(size_t overhead_bytes_per_packet); |
200 | 200 |
201 // To allow encoder to adapt its frame length, it must be provided the frame | 201 // To allow encoder to adapt its frame length, it must be provided the frame |
202 // length range that receivers can accept. | 202 // length range that receivers can accept. |
203 virtual void SetReceiverFrameLengthRange(int min_frame_length_ms, | 203 virtual void SetReceiverFrameLengthRange(int min_frame_length_ms, |
204 int max_frame_length_ms); | 204 int max_frame_length_ms); |
205 | 205 |
206 protected: | 206 protected: |
207 // Subclasses implement this to perform the actual encoding. Called by | 207 // Subclasses implement this to perform the actual encoding. Called by |
208 // Encode(). | 208 // Encode(). |
209 virtual EncodedInfo EncodeImpl(uint32_t rtp_timestamp, | 209 virtual EncodedInfo EncodeImpl(uint32_t rtp_timestamp, |
210 rtc::ArrayView<const int16_t> audio, | 210 rtc::ArrayView<const int16_t> audio, |
211 rtc::Buffer* encoded) = 0; | 211 rtc::Buffer* encoded) = 0; |
212 }; | 212 }; |
213 } // namespace webrtc | 213 } // namespace webrtc |
214 #endif // WEBRTC_API_AUDIO_CODECS_AUDIO_ENCODER_H_ | 214 #endif // WEBRTC_API_AUDIO_CODECS_AUDIO_ENCODER_H_ |
OLD | NEW |