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

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

Issue 2020353003: AudioDecoderIsacT: Require caller to always specify sample rate (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 6 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 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 int AudioCodingModuleImpl::PlayoutFrequency() const { 703 int AudioCodingModuleImpl::PlayoutFrequency() const {
704 WEBRTC_TRACE(webrtc::kTraceStream, webrtc::kTraceAudioCoding, id_, 704 WEBRTC_TRACE(webrtc::kTraceStream, webrtc::kTraceAudioCoding, id_,
705 "PlayoutFrequency()"); 705 "PlayoutFrequency()");
706 return receiver_.last_output_sample_rate_hz(); 706 return receiver_.last_output_sample_rate_hz();
707 } 707 }
708 708
709 int AudioCodingModuleImpl::RegisterReceiveCodec(const CodecInst& codec) { 709 int AudioCodingModuleImpl::RegisterReceiveCodec(const CodecInst& codec) {
710 rtc::CritScope lock(&acm_crit_sect_); 710 rtc::CritScope lock(&acm_crit_sect_);
711 auto* ef = encoder_factory_.get(); 711 auto* ef = encoder_factory_.get();
712 return RegisterReceiveCodecUnlocked( 712 return RegisterReceiveCodecUnlocked(
713 codec, [ef] { return ef->rent_a_codec.RentIsacDecoder(); }); 713 codec, [&] { return ef->rent_a_codec.RentIsacDecoder(codec.plfreq); });
714 } 714 }
715 715
716 int AudioCodingModuleImpl::RegisterReceiveCodec( 716 int AudioCodingModuleImpl::RegisterReceiveCodec(
717 const CodecInst& codec, 717 const CodecInst& codec,
718 FunctionView<std::unique_ptr<AudioDecoder>()> isac_factory) { 718 FunctionView<std::unique_ptr<AudioDecoder>()> isac_factory) {
719 rtc::CritScope lock(&acm_crit_sect_); 719 rtc::CritScope lock(&acm_crit_sect_);
720 return RegisterReceiveCodecUnlocked(codec, isac_factory); 720 return RegisterReceiveCodecUnlocked(codec, isac_factory);
721 } 721 }
722 722
723 int AudioCodingModuleImpl::RegisterReceiveCodecUnlocked( 723 int AudioCodingModuleImpl::RegisterReceiveCodecUnlocked(
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 return receiver_.LeastRequiredDelayMs(); 975 return receiver_.LeastRequiredDelayMs();
976 } 976 }
977 977
978 void AudioCodingModuleImpl::GetDecodingCallStatistics( 978 void AudioCodingModuleImpl::GetDecodingCallStatistics(
979 AudioDecodingCallStats* call_stats) const { 979 AudioDecodingCallStats* call_stats) const {
980 receiver_.GetDecodingCallStatistics(call_stats); 980 receiver_.GetDecodingCallStatistics(call_stats);
981 } 981 }
982 982
983 } // namespace acm2 983 } // namespace acm2
984 } // namespace webrtc 984 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/audio_coding/acm2/rent_a_codec.h » ('j') | webrtc/modules/utility/source/coder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698