Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: webrtc/modules/audio_coding/codecs/audio_encoder.h

Issue 2528933002: Adding OnReceivedOverhead to AudioEncoder. (Closed)
Patch Set: new touch Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
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].
175 virtual void OnReceivedUplinkPacketLossFraction( 175 virtual void OnReceivedUplinkPacketLossFraction(
176 float uplink_packet_loss_fraction); 176 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_audio_bitrate_bps); 179 virtual void OnReceivedTargetAudioBitrate(int target_audio_bitrate_bps);
180 180
181 // Provides RTT to this encoder to allow it to adapt. 181 // Provides RTT to this encoder to allow it to adapt.
182 virtual void OnReceivedRtt(int rtt_ms); 182 virtual void OnReceivedRtt(int rtt_ms);
183 183
184 // Provides overhead to this encoder to adapt. The overhead is the number of
185 // bytes that will be add to each payload the encoder generates. With this
kwiberg-webrtc 2016/12/03 00:30:56 "add" -> "added" And maybe "payload" -> "packet"?
minyue-webrtc 2016/12/06 09:04:19 Done.
186 // and the total bandwidth and target bitrate provided by
187 // |OnReceivedUplinkBandwidth| and |OnReceivedTargetAudioBitrate|
188 // respectively, the encoder can decide its frame length and payload rate.
kwiberg-webrtc 2016/12/03 00:30:56 Aren't the round-trip time and the packet loss rat
minyue-webrtc 2016/12/06 09:04:19 Round trip time is not taken into account right no
kwiberg-webrtc 2016/12/06 09:43:25 Acknowledged.
189 virtual void OnReceivedOverhead(size_t overhead_bytes_per_packet);
190
184 // To allow encoder to adapt its frame length, it must be provided the frame 191 // To allow encoder to adapt its frame length, it must be provided the frame
185 // length range that receivers can accept. 192 // length range that receivers can accept.
186 virtual void SetReceiverFrameLengthRange(int min_frame_length_ms, 193 virtual void SetReceiverFrameLengthRange(int min_frame_length_ms,
187 int max_frame_length_ms); 194 int max_frame_length_ms);
188 195
189 protected: 196 protected:
190 // Subclasses implement this to perform the actual encoding. Called by 197 // Subclasses implement this to perform the actual encoding. Called by
191 // Encode(). 198 // Encode().
192 virtual EncodedInfo EncodeImpl(uint32_t rtp_timestamp, 199 virtual EncodedInfo EncodeImpl(uint32_t rtp_timestamp,
193 rtc::ArrayView<const int16_t> audio, 200 rtc::ArrayView<const int16_t> audio,
194 rtc::Buffer* encoded) = 0; 201 rtc::Buffer* encoded) = 0;
195 }; 202 };
196 } // namespace webrtc 203 } // namespace webrtc
197 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_H_ 204 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698