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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 // 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); | |
169 | 168 |
170 // Disables audio network adaptor. | 169 // Disables audio network adaptor. |
171 virtual void DisableAudioNetworkAdaptor(); | 170 virtual void DisableAudioNetworkAdaptor(); |
172 | 171 |
173 // Provides uplink packet loss fraction to this encoder to allow it to adapt. | 172 // 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]. | 173 // |uplink_packet_loss_fraction| is in the range [0.0, 1.0]. |
175 virtual void OnReceivedUplinkPacketLossFraction( | 174 virtual void OnReceivedUplinkPacketLossFraction( |
176 float uplink_packet_loss_fraction); | 175 float uplink_packet_loss_fraction); |
177 | 176 |
178 // Provides 1st-order-FEC-recoverable uplink packet loss rate to this encoder | 177 // Provides 1st-order-FEC-recoverable uplink packet loss rate to this encoder |
(...skipping 25 matching lines...) Expand all Loading... |
204 | 203 |
205 protected: | 204 protected: |
206 // Subclasses implement this to perform the actual encoding. Called by | 205 // Subclasses implement this to perform the actual encoding. Called by |
207 // Encode(). | 206 // Encode(). |
208 virtual EncodedInfo EncodeImpl(uint32_t rtp_timestamp, | 207 virtual EncodedInfo EncodeImpl(uint32_t rtp_timestamp, |
209 rtc::ArrayView<const int16_t> audio, | 208 rtc::ArrayView<const int16_t> audio, |
210 rtc::Buffer* encoded) = 0; | 209 rtc::Buffer* encoded) = 0; |
211 }; | 210 }; |
212 } // namespace webrtc | 211 } // namespace webrtc |
213 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_H_ | 212 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_H_ |
OLD | NEW |