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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 | 164 |
165 // Enables audio network adaptor. Returns true if successful. | 165 // Enables audio network adaptor. Returns true if successful. |
166 virtual bool EnableAudioNetworkAdaptor(const std::string& config_string, | 166 virtual bool EnableAudioNetworkAdaptor(const std::string& config_string, |
167 RtcEventLog* event_log, | 167 RtcEventLog* event_log, |
168 const Clock* clock); | 168 const Clock* clock); |
169 | 169 |
170 // Disables audio network adaptor. | 170 // Disables audio network adaptor. |
171 virtual void DisableAudioNetworkAdaptor(); | 171 virtual void DisableAudioNetworkAdaptor(); |
172 | 172 |
173 // Provides uplink packet loss fraction to this encoder to allow it to adapt. | 173 // Provides uplink packet loss fraction to this encoder to allow it to adapt. |
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] or unknown. |
175 virtual void OnReceivedUplinkPacketLossFraction( | 175 virtual void OnReceivedUplinkPacketLossFraction( |
176 float uplink_packet_loss_fraction); | 176 const rtc::Optional<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_bps); | 179 virtual void OnReceivedTargetAudioBitrate(int target_bps); |
180 | 180 |
181 // Provides target audio bitrate and corresponding probing interval of | 181 // Provides target audio bitrate and corresponding probing interval of |
182 // the bandwidth estimator to this encoder to allow it to adapt. | 182 // the bandwidth estimator to this encoder to allow it to adapt. |
183 virtual void OnReceivedUplinkBandwidth( | 183 virtual void OnReceivedUplinkBandwidth( |
184 int target_audio_bitrate_bps, | 184 int target_audio_bitrate_bps, |
185 rtc::Optional<int64_t> probing_interval_ms); | 185 rtc::Optional<int64_t> probing_interval_ms); |
186 | 186 |
(...skipping 11 matching lines...) Expand all Loading... |
198 | 198 |
199 protected: | 199 protected: |
200 // Subclasses implement this to perform the actual encoding. Called by | 200 // Subclasses implement this to perform the actual encoding. Called by |
201 // Encode(). | 201 // Encode(). |
202 virtual EncodedInfo EncodeImpl(uint32_t rtp_timestamp, | 202 virtual EncodedInfo EncodeImpl(uint32_t rtp_timestamp, |
203 rtc::ArrayView<const int16_t> audio, | 203 rtc::ArrayView<const int16_t> audio, |
204 rtc::Buffer* encoded) = 0; | 204 rtc::Buffer* encoded) = 0; |
205 }; | 205 }; |
206 } // namespace webrtc | 206 } // namespace webrtc |
207 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_H_ | 207 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_H_ |
OLD | NEW |