Chromium Code Reviews| Index: webrtc/audio/audio_send_stream.h |
| diff --git a/webrtc/audio/audio_send_stream.h b/webrtc/audio/audio_send_stream.h |
| index 264f9b3a69f53d9c71e732919e10619e51edb26c..a993d5f2f9c03f4add6ea239a9123f3b7bae1a6c 100644 |
| --- a/webrtc/audio/audio_send_stream.h |
| +++ b/webrtc/audio/audio_send_stream.h |
| @@ -17,6 +17,7 @@ |
| #include "webrtc/audio_state.h" |
| #include "webrtc/base/constructormagic.h" |
| #include "webrtc/base/thread_checker.h" |
| +#include "webrtc/call/bitrate_allocator.h" |
| namespace webrtc { |
| class CongestionController; |
| @@ -27,11 +28,13 @@ class ChannelProxy; |
| } // namespace voe |
| namespace internal { |
| -class AudioSendStream final : public webrtc::AudioSendStream { |
| +class AudioSendStream final : public webrtc::AudioSendStream, |
| + public webrtc::BitrateAllocatorObserver { |
| public: |
| AudioSendStream(const webrtc::AudioSendStream::Config& config, |
| const rtc::scoped_refptr<webrtc::AudioState>& audio_state, |
| - CongestionController* congestion_controller); |
| + CongestionController* congestion_controller, |
| + BitrateAllocator* bitrate_allocator); |
| ~AudioSendStream() override; |
| // webrtc::AudioSendStream implementation. |
| @@ -44,6 +47,12 @@ class AudioSendStream final : public webrtc::AudioSendStream { |
| void SignalNetworkState(NetworkState state); |
| bool DeliverRtcp(const uint8_t* packet, size_t length); |
| + |
| + // Implements BitrateAllocatorObserver. |
| + uint32_t OnBitrateUpdated(uint32_t bitrate_bps, |
| + uint8_t fraction_loss, |
| + int64_t rtt) override; |
| + |
| const webrtc::AudioSendStream::Config& config() const; |
| private: |
| @@ -54,6 +63,8 @@ class AudioSendStream final : public webrtc::AudioSendStream { |
| rtc::scoped_refptr<webrtc::AudioState> audio_state_; |
| std::unique_ptr<voe::ChannelProxy> channel_proxy_; |
| + BitrateAllocator* const bitrate_allocator_; |
|
minyue-webrtc
2016/07/21 10:59:19
use smart pointer if possible
mflodman
2016/07/22 13:50:29
The BitrateAllocator isn't owned by this class and
|
| + |
| RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioSendStream); |
| }; |
| } // namespace internal |