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

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: Stats contain current configured min bitrate 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 01c2fc836c7d4a35dde12d1a13b4cd2fbb8e5cf0..4b0ed8b1a5fd8a78c29dbf3890530ecea2120833 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