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

Side by Side Diff: webrtc/audio/audio_send_stream.cc

Issue 2996643002: BWE allocation strategy
Patch Set: . Created 3 years, 4 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) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 LOG(LS_ERROR) << "Failed to set up send codec state."; 228 LOG(LS_ERROR) << "Failed to set up send codec state.";
229 } 229 }
230 230
231 ReconfigureBitrateObserver(stream, new_config); 231 ReconfigureBitrateObserver(stream, new_config);
232 stream->config_ = new_config; 232 stream->config_ = new_config;
233 } 233 }
234 234
235 void AudioSendStream::Start() { 235 void AudioSendStream::Start() {
236 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); 236 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
237 if (config_.min_bitrate_bps != -1 && config_.max_bitrate_bps != -1) { 237 if (config_.min_bitrate_bps != -1 && config_.max_bitrate_bps != -1) {
238 // Audio BWE is enabled
239 transport_->packet_sender()->SetAccountForAudioPackets(true);
238 ConfigureBitrateObserver(config_.min_bitrate_bps, config_.max_bitrate_bps); 240 ConfigureBitrateObserver(config_.min_bitrate_bps, config_.max_bitrate_bps);
239 } 241 }
240 242
241 ScopedVoEInterface<VoEBase> base(voice_engine()); 243 ScopedVoEInterface<VoEBase> base(voice_engine());
242 int error = base->StartSend(config_.voe_channel_id); 244 int error = base->StartSend(config_.voe_channel_id);
243 if (error != 0) { 245 if (error != 0) {
244 LOG(LS_ERROR) << "AudioSendStream::Start failed with error: " << error; 246 LOG(LS_ERROR) << "AudioSendStream::Start failed with error: " << error;
245 } 247 }
246 } 248 }
247 249
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 if (rtp_rtcp_module_->RegisterSendPayload(codec) != 0) { 653 if (rtp_rtcp_module_->RegisterSendPayload(codec) != 0) {
652 LOG(LS_ERROR) << "RegisterCngPayloadType() failed to register CN to " 654 LOG(LS_ERROR) << "RegisterCngPayloadType() failed to register CN to "
653 "RTP/RTCP module"; 655 "RTP/RTCP module";
654 } 656 }
655 } 657 }
656 } 658 }
657 659
658 660
659 } // namespace internal 661 } // namespace internal
660 } // namespace webrtc 662 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698