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

Unified Diff: webrtc/audio/audio_send_stream.h

Issue 2165743003: Variable audio bitrate. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase Created 4 years, 5 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
« no previous file with comments | « webrtc/audio/DEPS ('k') | webrtc/audio/audio_send_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
+
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioSendStream);
};
} // namespace internal
« no previous file with comments | « webrtc/audio/DEPS ('k') | webrtc/audio/audio_send_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698