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

Unified Diff: webrtc/modules/audio_coding/codecs/audio_encoder.h

Issue 2362703002: Adding audio network adaptor to AudioEncoderOpus. (Closed)
Patch Set: some updates Created 4 years, 3 months 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/codecs/audio_encoder.h
diff --git a/webrtc/modules/audio_coding/codecs/audio_encoder.h b/webrtc/modules/audio_coding/codecs/audio_encoder.h
index f09525f145d2cc661bf2da00931ac9e2da10f22f..dcd6efc9d65f600c6cd6b7aeab1334df6eaf8d8c 100644
--- a/webrtc/modules/audio_coding/codecs/audio_encoder.h
+++ b/webrtc/modules/audio_coding/codecs/audio_encoder.h
@@ -162,6 +162,27 @@ class AudioEncoder {
virtual rtc::ArrayView<std::unique_ptr<AudioEncoder>>
ReclaimContainedEncoders();
+ // 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
+ virtual bool SetAudioNetworkAdaptor(bool enable);
+
+ // Provides uplink bandwidth to this encoder to allow it to adapt.
+ virtual void OnReceivedUplinkBandwidth(int uplink_bandwidth_bps);
+
+ // Provides uplink packet loss fraction to this encoder to allow it to adapt.
+ virtual void OnReceivedUplinkPacketLossFraction(
+ float uplink_packet_loss_fraction);
+
+ // Provides target audio bitrate to this encoder to allow it to adapt.
+ virtual void OnReceivedTargetAudioBitrate(int target_audio_bitrate_bps);
+
+ // Provides RTT to this encoder to allow it to adapt.
+ virtual void OnReceivedRtt(int rtt_ms);
+
+ // To allow encoder to adapt its frame length, it must be provided the frame
+ // length range that receives can accept.
+ virtual void SetReceiverFrameLengthRange(int min_frame_length_ms,
+ 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
+
protected:
// Subclasses implement this to perform the actual encoding. Called by
// Encode().

Powered by Google App Engine
This is Rietveld 408576698