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

Unified Diff: webrtc/video/video_send_stream.cc

Issue 2106183002: Fix bug where min transmit bitrate wasn't working (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed comments 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
Index: webrtc/video/video_send_stream.cc
diff --git a/webrtc/video/video_send_stream.cc b/webrtc/video/video_send_stream.cc
index eeb9580b6b707e1c454491fc3339c9508eb5215a..43b4c04036ed09e3781c6ffb39c63a01ed30c110 100644
--- a/webrtc/video/video_send_stream.cc
+++ b/webrtc/video/video_send_stream.cc
@@ -588,6 +588,16 @@ void VideoSendStream::EncoderProcess() {
current_encoder_settings_->video_codec.startBitrate = std::max(
bitrate_allocator_->GetStartBitrate(this) / 1000,
static_cast<int>(current_encoder_settings_->video_codec.minBitrate));
+
+ if (state_ == State::kStarted) {
+ bitrate_allocator_->AddObserver(
+ this, current_encoder_settings_->video_codec.minBitrate * 1000,
+ current_encoder_settings_->video_codec.maxBitrate * 1000,
+ CalulcateMaxPadBitrateBps(current_encoder_settings_->config,
+ config_.suspend_below_min_bitrate),
+ !config_.suspend_below_min_bitrate);
+ }
+
payload_router_.SetSendStreams(current_encoder_settings_->config.streams);
vie_encoder_.SetEncoder(current_encoder_settings_->video_codec,
payload_router_.MaxPayloadLength());

Powered by Google App Engine
This is Rietveld 408576698