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 167 matching lines...) Loading... |
178 virtual void OnReceivedUplinkPacketLossFraction( | 178 virtual void OnReceivedUplinkPacketLossFraction( |
179 float uplink_packet_loss_fraction); | 179 float uplink_packet_loss_fraction); |
180 | 180 |
181 // Provides target audio bitrate to this encoder to allow it to adapt. | 181 // Provides target audio bitrate to this encoder to allow it to adapt. |
182 virtual void OnReceivedTargetAudioBitrate(int target_audio_bitrate_bps); | 182 virtual void OnReceivedTargetAudioBitrate(int target_audio_bitrate_bps); |
183 | 183 |
184 // Provides RTT to this encoder to allow it to adapt. | 184 // Provides RTT to this encoder to allow it to adapt. |
185 virtual void OnReceivedRtt(int rtt_ms); | 185 virtual void OnReceivedRtt(int rtt_ms); |
186 | 186 |
187 // To allow encoder to adapt its frame length, it must be provided the frame | 187 // To allow encoder to adapt its frame length, it must be provided the frame |
188 // length range that receives can accept. | 188 // length range that receivers can accept. |
189 virtual void SetReceiverFrameLengthRange(int min_frame_length_ms, | 189 virtual void SetReceiverFrameLengthRange(int min_frame_length_ms, |
190 int max_frame_length_ms); | 190 int max_frame_length_ms); |
191 | 191 |
192 protected: | 192 protected: |
193 // Subclasses implement this to perform the actual encoding. Called by | 193 // Subclasses implement this to perform the actual encoding. Called by |
194 // Encode(). | 194 // Encode(). |
195 virtual EncodedInfo EncodeImpl(uint32_t rtp_timestamp, | 195 virtual EncodedInfo EncodeImpl(uint32_t rtp_timestamp, |
196 rtc::ArrayView<const int16_t> audio, | 196 rtc::ArrayView<const int16_t> audio, |
197 rtc::Buffer* encoded) = 0; | 197 rtc::Buffer* encoded) = 0; |
198 }; | 198 }; |
199 } // namespace webrtc | 199 } // namespace webrtc |
200 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_H_ | 200 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_H_ |
OLD | NEW |