| Index: webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h
|
| diff --git a/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h b/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h
|
| index 48fb494dbe180bb7b151c5fe36767c83c84411be..6bc1eecda6c5275a29d1927e7c8878d926dd45e9 100644
|
| --- a/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h
|
| +++ b/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h
|
| @@ -20,6 +20,7 @@
|
|
|
| namespace webrtc {
|
|
|
| +class AudioNetworkAdaptor;
|
| struct CodecInst;
|
|
|
| class AudioEncoderOpus final : public AudioEncoder {
|
| @@ -47,6 +48,7 @@ class AudioEncoderOpus final : public AudioEncoder {
|
| int max_playback_rate_hz = 48000;
|
| int complexity = kDefaultComplexity;
|
| bool dtx_enabled = false;
|
| + bool audio_network_adaptor_enabled = false;
|
|
|
| private:
|
| #if defined(WEBRTC_ANDROID) || defined(WEBRTC_IOS) || defined(WEBRTC_ARCH_ARM)
|
| @@ -82,6 +84,11 @@ class AudioEncoderOpus final : public AudioEncoder {
|
| void SetProjectedPacketLossRate(double fraction) override;
|
| void SetTargetBitrate(int target_bps) override;
|
|
|
| + void OnReceivedUplinkBandwidth(int uplink_bandwidth_bps) override;
|
| + void OnReceivedUplinkPacketLossFraction(float uplink_packet_loss_fraction) override;
|
| + void OnReceivedTargetAudioBitrate(int target_audio_bitrate_bps) override;
|
| + void OnReceivedRtt(int rtt_ms) override;
|
| +
|
| // Getters for testing.
|
| double packet_loss_rate() const { return packet_loss_rate_; }
|
| ApplicationMode application() const { return config_.application; }
|
| @@ -96,12 +103,19 @@ class AudioEncoderOpus final : public AudioEncoder {
|
| size_t SamplesPer10msFrame() const;
|
| size_t SufficientOutputBufferSize() const;
|
| bool RecreateEncoderInstance(const Config& config);
|
| + void SetFrameLength(int frame_length_ms);
|
| + void SetNumChannelsToEncode(size_t num_channels_to_encode);
|
| + void ApplyAudioNetworkAdaptor();
|
|
|
| Config config_;
|
| double packet_loss_rate_;
|
| std::vector<int16_t> input_buffer_;
|
| OpusEncInst* inst_;
|
| uint32_t first_timestamp_in_buffer_;
|
| + size_t num_channels_to_encode_;
|
| + int next_frame_size_ms_;
|
| + std::unique_ptr<AudioNetworkAdaptor> audio_network_adaptor_;
|
| +
|
| RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderOpus);
|
| };
|
|
|
|
|