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

Side by Side Diff: webrtc/modules/audio_coding/acm2/audio_coding_module.cc

Issue 2546493002: Update smoothed bitrate. (Closed)
Patch Set: Deprecated OnReceivedTargetAudioBitrate. Created 3 years, 12 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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 "SendFrequency Failed, no codec is registered"); 641 "SendFrequency Failed, no codec is registered");
642 return -1; 642 return -1;
643 } 643 }
644 644
645 return encoder_stack_->SampleRateHz(); 645 return encoder_stack_->SampleRateHz();
646 } 646 }
647 647
648 void AudioCodingModuleImpl::SetBitRate(int bitrate_bps) { 648 void AudioCodingModuleImpl::SetBitRate(int bitrate_bps) {
649 rtc::CritScope lock(&acm_crit_sect_); 649 rtc::CritScope lock(&acm_crit_sect_);
650 if (encoder_stack_) { 650 if (encoder_stack_) {
651 encoder_stack_->OnReceivedTargetAudioBitrate(bitrate_bps); 651 encoder_stack_->OnReceivedTargetAudioBitrate(bitrate_bps,
652 rtc::Optional<int64_t>());
652 } 653 }
653 } 654 }
654 655
655 // Register a transport callback which will be called to deliver 656 // Register a transport callback which will be called to deliver
656 // the encoded buffers. 657 // the encoded buffers.
657 int AudioCodingModuleImpl::RegisterTransportCallback( 658 int AudioCodingModuleImpl::RegisterTransportCallback(
658 AudioPacketizationCallback* transport) { 659 AudioPacketizationCallback* transport) {
659 rtc::CritScope lock(&callback_crit_sect_); 660 rtc::CritScope lock(&callback_crit_sect_);
660 packetization_callback_ = transport; 661 packetization_callback_ = transport;
661 return 0; 662 return 0;
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
1375 // Checks the validity of the parameters of the given codec 1376 // Checks the validity of the parameters of the given codec
1376 bool AudioCodingModule::IsCodecValid(const CodecInst& codec) { 1377 bool AudioCodingModule::IsCodecValid(const CodecInst& codec) {
1377 bool valid = acm2::RentACodec::IsCodecValid(codec); 1378 bool valid = acm2::RentACodec::IsCodecValid(codec);
1378 if (!valid) 1379 if (!valid)
1379 WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, -1, 1380 WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, -1,
1380 "Invalid codec setting"); 1381 "Invalid codec setting");
1381 return valid; 1382 return valid;
1382 } 1383 }
1383 1384
1384 } // namespace webrtc 1385 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/audio_coding/codecs/audio_encoder.h » ('j') | webrtc/modules/audio_coding/codecs/audio_encoder.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698