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

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

Issue 1356543003: ACM: Remove functions related to DTMF (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 3 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 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 { 814 {
815 CriticalSectionScoped lock(acm_crit_sect_.get()); 815 CriticalSectionScoped lock(acm_crit_sect_.get());
816 // Initialize receiver, if it is not initialized. Otherwise, initial delay 816 // Initialize receiver, if it is not initialized. Otherwise, initial delay
817 // is reset upon initialization of the receiver. 817 // is reset upon initialization of the receiver.
818 if (!receiver_initialized_) 818 if (!receiver_initialized_)
819 InitializeReceiverSafe(); 819 InitializeReceiverSafe();
820 } 820 }
821 return receiver_.SetInitialDelay(delay_ms); 821 return receiver_.SetInitialDelay(delay_ms);
822 } 822 }
823 823
824 int AudioCodingModuleImpl::SetDtmfPlayoutStatus(bool enable) {
825 return 0;
826 }
827
828 bool AudioCodingModuleImpl::DtmfPlayoutStatus() const {
829 return true;
830 }
831
832 int AudioCodingModuleImpl::EnableNack(size_t max_nack_list_size) { 824 int AudioCodingModuleImpl::EnableNack(size_t max_nack_list_size) {
833 return receiver_.EnableNack(max_nack_list_size); 825 return receiver_.EnableNack(max_nack_list_size);
834 } 826 }
835 827
836 void AudioCodingModuleImpl::DisableNack() { 828 void AudioCodingModuleImpl::DisableNack() {
837 receiver_.DisableNack(); 829 receiver_.DisableNack();
838 } 830 }
839 831
840 std::vector<uint16_t> AudioCodingModuleImpl::GetNackList( 832 std::vector<uint16_t> AudioCodingModuleImpl::GetNackList(
841 int64_t round_trip_time_ms) const { 833 int64_t round_trip_time_ms) const {
842 return receiver_.GetNackList(round_trip_time_ms); 834 return receiver_.GetNackList(round_trip_time_ms);
843 } 835 }
844 836
845 int AudioCodingModuleImpl::LeastRequiredDelayMs() const { 837 int AudioCodingModuleImpl::LeastRequiredDelayMs() const {
846 return receiver_.LeastRequiredDelayMs(); 838 return receiver_.LeastRequiredDelayMs();
847 } 839 }
848 840
849 void AudioCodingModuleImpl::GetDecodingCallStatistics( 841 void AudioCodingModuleImpl::GetDecodingCallStatistics(
850 AudioDecodingCallStats* call_stats) const { 842 AudioDecodingCallStats* call_stats) const {
851 receiver_.GetDecodingCallStatistics(call_stats); 843 receiver_.GetDecodingCallStatistics(call_stats);
852 } 844 }
853 845
854 } // namespace acm2 846 } // namespace acm2
855 847
856 AudioCodingImpl::AudioCodingImpl(const Config& config) { 848 AudioCodingImpl::AudioCodingImpl(const Config& config) {
857 AudioCodingModule::Config config_old = config.ToOldConfig(); 849 AudioCodingModule::Config config_old = config.ToOldConfig();
858 acm_old_.reset(new acm2::AudioCodingModuleImpl(config_old)); 850 acm_old_.reset(new acm2::AudioCodingModuleImpl(config_old));
859 acm_old_->RegisterTransportCallback(config.transport); 851 acm_old_->RegisterTransportCallback(config.transport);
860 acm_old_->RegisterVADCallback(config.vad_callback); 852 acm_old_->RegisterVADCallback(config.vad_callback);
861 acm_old_->SetDtmfPlayoutStatus(config.play_dtmf);
862 if (config.initial_playout_delay_ms > 0) { 853 if (config.initial_playout_delay_ms > 0) {
863 acm_old_->SetInitialPlayoutDelay(config.initial_playout_delay_ms); 854 acm_old_->SetInitialPlayoutDelay(config.initial_playout_delay_ms);
864 } 855 }
865 playout_frequency_hz_ = config.playout_frequency_hz; 856 playout_frequency_hz_ = config.playout_frequency_hz;
866 } 857 }
867 858
868 AudioCodingImpl::~AudioCodingImpl() = default; 859 AudioCodingImpl::~AudioCodingImpl() = default;
869 860
870 bool AudioCodingImpl::RegisterSendCodec(AudioEncoder* send_codec) { 861 bool AudioCodingImpl::RegisterSendCodec(AudioEncoder* send_codec) {
871 FATAL() << "Not implemented yet."; 862 FATAL() << "Not implemented yet.";
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
1135 *sample_rate_hz = 8000; 1126 *sample_rate_hz = 8000;
1136 *channels = 1; 1127 *channels = 1;
1137 break; 1128 break;
1138 default: 1129 default:
1139 FATAL() << "Codec type " << codec_type << " not supported."; 1130 FATAL() << "Codec type " << codec_type << " not supported.";
1140 } 1131 }
1141 return true; 1132 return true;
1142 } 1133 }
1143 1134
1144 } // namespace webrtc 1135 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698