Chromium Code Reviews| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 155 | 155 |
| 156 // Causes this encoder to let go of any other encoders it contains, and | 156 // Causes this encoder to let go of any other encoders it contains, and |
| 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 // Enable/disable audio network adaptor. Return whether setting is succeeded. | |
|
kwiberg-webrtc
2016/09/27 09:35:54
Is it supposed to be default enabled or default di
minyue-webrtc
2016/09/27 16:02:32
As FEC, the default value is given by VoE. A diffe
kwiberg-webrtc
2016/09/28 08:24:09
I think it makes more sense for it to be default d
minyue-webrtc
2016/09/29 15:34:24
Now it is default disabled since |audio_network_ad
| |
| 166 virtual bool SetAudioNetworkAdaptor(bool enable); | |
| 167 | |
| 168 // Provides uplink bandwidth to this encoder to allow it to adapt. | |
| 169 virtual void OnReceivedUplinkBandwidth(int uplink_bandwidth_bps); | |
| 170 | |
| 171 // Provides uplink packet loss fraction to this encoder to allow it to adapt. | |
| 172 virtual void OnReceivedUplinkPacketLossFraction( | |
| 173 float uplink_packet_loss_fraction); | |
| 174 | |
| 175 // Provides target audio bitrate to this encoder to allow it to adapt. | |
| 176 virtual void OnReceivedTargetAudioBitrate(int target_audio_bitrate_bps); | |
| 177 | |
| 178 // Provides RTT to this encoder to allow it to adapt. | |
| 179 virtual void OnReceivedRtt(int rtt_ms); | |
| 180 | |
| 181 // To allow encoder to adapt its frame length, it must be provided the frame | |
| 182 // length range that receives can accept. | |
| 183 virtual void SetReceiverFrameLengthRange(int min_frame_length_ms, | |
| 184 int max_frame_length_ms); | |
|
kwiberg-webrtc
2016/09/27 09:35:54
How is the encoder supposed to behave prior to the
minyue-webrtc
2016/09/27 16:02:33
Audio network adaptor is configured so that it onl
| |
| 185 | |
| 165 protected: | 186 protected: |
| 166 // Subclasses implement this to perform the actual encoding. Called by | 187 // Subclasses implement this to perform the actual encoding. Called by |
| 167 // Encode(). | 188 // Encode(). |
| 168 virtual EncodedInfo EncodeImpl(uint32_t rtp_timestamp, | 189 virtual EncodedInfo EncodeImpl(uint32_t rtp_timestamp, |
| 169 rtc::ArrayView<const int16_t> audio, | 190 rtc::ArrayView<const int16_t> audio, |
| 170 rtc::Buffer* encoded) = 0; | 191 rtc::Buffer* encoded) = 0; |
| 171 }; | 192 }; |
| 172 } // namespace webrtc | 193 } // namespace webrtc |
| 173 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_H_ | 194 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_H_ |
| OLD | NEW |