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

Unified Diff: webrtc/audio/audio_send_stream.cc

Issue 2247213005: Fixing config for Audio BWE. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebasing Created 4 years, 2 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/audio/audio_send_stream.cc
diff --git a/webrtc/audio/audio_send_stream.cc b/webrtc/audio/audio_send_stream.cc
index 5c08c9b8a2ce7cedc52bdd7ddf278b90eba138d1..b174c75a7dd398c1591145e47060d25757b81324 100644
--- a/webrtc/audio/audio_send_stream.cc
+++ b/webrtc/audio/audio_send_stream.cc
@@ -100,12 +100,12 @@ AudioSendStream::~AudioSendStream() {
void AudioSendStream::Start() {
RTC_DCHECK(thread_checker_.CalledOnValidThread());
- if (config_.min_bitrate_kbps != -1 && config_.max_bitrate_kbps != -1) {
- RTC_DCHECK_GE(config_.max_bitrate_kbps, config_.min_bitrate_kbps);
+ if (config_.min_bitrate_bps != -1 && config_.max_bitrate_bps != -1) {
+ RTC_DCHECK_GE(config_.max_bitrate_bps, config_.min_bitrate_bps);
rtc::Event thread_sync_event(false /* manual_reset */, false);
worker_queue_->PostTask([this, &thread_sync_event] {
- bitrate_allocator_->AddObserver(this, config_.min_bitrate_kbps * 1000,
- config_.max_bitrate_kbps * 1000, 0, true);
+ bitrate_allocator_->AddObserver(this, config_.min_bitrate_bps,
+ config_.max_bitrate_bps, 0, true);
thread_sync_event.Set();
});
thread_sync_event.Wait(rtc::Event::kForever);
@@ -248,10 +248,10 @@ uint32_t AudioSendStream::OnBitrateUpdated(uint32_t bitrate_bps,
uint8_t fraction_loss,
int64_t rtt) {
RTC_DCHECK_GE(bitrate_bps,
- static_cast<uint32_t>(config_.min_bitrate_kbps * 1000));
+ static_cast<uint32_t>(config_.min_bitrate_bps));
// The bitrate allocator might allocate an higher than max configured bitrate
// if there is room, to allow for, as example, extra FEC. Ignore that for now.
- const uint32_t max_bitrate_bps = config_.max_bitrate_kbps * 1000;
+ const uint32_t max_bitrate_bps = config_.max_bitrate_bps;
if (bitrate_bps > max_bitrate_bps)
bitrate_bps = max_bitrate_bps;

Powered by Google App Engine
This is Rietveld 408576698