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

Side by Side 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: Add min transmit bitrate to Call::Stats, update test 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 pending_encoder_settings_.reset(); 581 pending_encoder_settings_.reset();
582 change_settings = true; 582 change_settings = true;
583 } else if (pending_state_change_) { 583 } else if (pending_state_change_) {
584 swap(pending_state_change, pending_state_change_); 584 swap(pending_state_change, pending_state_change_);
585 } 585 }
586 } 586 }
587 if (change_settings) { 587 if (change_settings) {
588 current_encoder_settings_->video_codec.startBitrate = std::max( 588 current_encoder_settings_->video_codec.startBitrate = std::max(
589 bitrate_allocator_->GetStartBitrate(this) / 1000, 589 bitrate_allocator_->GetStartBitrate(this) / 1000,
590 static_cast<int>(current_encoder_settings_->video_codec.minBitrate)); 590 static_cast<int>(current_encoder_settings_->video_codec.minBitrate));
591
592 bitrate_allocator_->AddObserver(
perkj_webrtc 2016/07/04 07:24:49 We should not add as observer unless the stream i
sprang_webrtc 2016/07/04 09:08:47 Done.
593 this, current_encoder_settings_->video_codec.minBitrate * 1000,
594 current_encoder_settings_->video_codec.maxBitrate * 1000,
595 CalulcateMaxPadBitrateBps(current_encoder_settings_->config,
596 config_.suspend_below_min_bitrate),
597 !config_.suspend_below_min_bitrate);
598
591 payload_router_.SetSendStreams(current_encoder_settings_->config.streams); 599 payload_router_.SetSendStreams(current_encoder_settings_->config.streams);
592 vie_encoder_.SetEncoder(current_encoder_settings_->video_codec, 600 vie_encoder_.SetEncoder(current_encoder_settings_->video_codec,
593 payload_router_.MaxPayloadLength()); 601 payload_router_.MaxPayloadLength());
594 602
595 // Clear stats for disabled layers. 603 // Clear stats for disabled layers.
596 for (size_t i = current_encoder_settings_->config.streams.size(); 604 for (size_t i = current_encoder_settings_->config.streams.size();
597 i < config_.rtp.ssrcs.size(); ++i) { 605 i < config_.rtp.ssrcs.size(); ++i) {
598 stats_proxy_.OnInactiveSsrc(config_.rtp.ssrcs[i]); 606 stats_proxy_.OnInactiveSsrc(config_.rtp.ssrcs[i]);
599 } 607 }
600 608
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 &module_nack_rate); 903 &module_nack_rate);
896 *sent_video_rate_bps += module_video_rate; 904 *sent_video_rate_bps += module_video_rate;
897 *sent_nack_rate_bps += module_nack_rate; 905 *sent_nack_rate_bps += module_nack_rate;
898 *sent_fec_rate_bps += module_fec_rate; 906 *sent_fec_rate_bps += module_fec_rate;
899 } 907 }
900 return 0; 908 return 0;
901 } 909 }
902 910
903 } // namespace internal 911 } // namespace internal
904 } // namespace webrtc 912 } // namespace webrtc
OLDNEW
« webrtc/video/end_to_end_tests.cc ('K') | « webrtc/video/end_to_end_tests.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698