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

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: on Stefan's suggestion Created 4 years, 1 month 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/api/call/audio_send_stream.cc ('k') | webrtc/audio/audio_send_stream_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/audio/audio_send_stream.cc
diff --git a/webrtc/audio/audio_send_stream.cc b/webrtc/audio/audio_send_stream.cc
index ad6366bc8095deebe830b33c9115cf77afe83adf..7e8e426ed9a2eeb42cc8d57ffcdc38c8d7960e88 100644
--- a/webrtc/audio/audio_send_stream.cc
+++ b/webrtc/audio/audio_send_stream.cc
@@ -101,12 +101,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);
@@ -249,10 +249,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;
« no previous file with comments | « webrtc/api/call/audio_send_stream.cc ('k') | webrtc/audio/audio_send_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698