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

Side by Side Diff: webrtc/media/engine/webrtcvoiceengine.cc

Issue 2415403002: Introduced the new parameter setting scheme for activating the high-pass filter in APM (Closed)
Patch Set: Changes in response to reviewer comments Created 4 years 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) 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2004 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 807 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 } 818 }
819 if (voep->SetNsStatus(*options.noise_suppression, ns_mode) == -1) { 819 if (voep->SetNsStatus(*options.noise_suppression, ns_mode) == -1) {
820 LOG_RTCERR2(SetNsStatus, *options.noise_suppression, ns_mode); 820 LOG_RTCERR2(SetNsStatus, *options.noise_suppression, ns_mode);
821 return false; 821 return false;
822 } else { 822 } else {
823 LOG(LS_INFO) << "Noise suppression set to " << *options.noise_suppression 823 LOG(LS_INFO) << "Noise suppression set to " << *options.noise_suppression
824 << " with mode " << ns_mode; 824 << " with mode " << ns_mode;
825 } 825 }
826 } 826 }
827 827
828 if (options.highpass_filter) {
829 LOG(LS_INFO) << "High pass filter enabled? " << *options.highpass_filter;
830 if (voep->EnableHighPassFilter(*options.highpass_filter) == -1) {
831 LOG_RTCERR1(SetHighpassFilterStatus, *options.highpass_filter);
832 return false;
833 }
834 }
835
836 if (options.stereo_swapping) { 828 if (options.stereo_swapping) {
837 LOG(LS_INFO) << "Stereo swapping enabled? " << *options.stereo_swapping; 829 LOG(LS_INFO) << "Stereo swapping enabled? " << *options.stereo_swapping;
838 voep->EnableStereoChannelSwapping(*options.stereo_swapping); 830 voep->EnableStereoChannelSwapping(*options.stereo_swapping);
839 if (voep->IsStereoChannelSwappingEnabled() != *options.stereo_swapping) { 831 if (voep->IsStereoChannelSwappingEnabled() != *options.stereo_swapping) {
840 LOG_RTCERR1(EnableStereoChannelSwapping, *options.stereo_swapping); 832 LOG_RTCERR1(EnableStereoChannelSwapping, *options.stereo_swapping);
841 return false; 833 return false;
842 } 834 }
843 } 835 }
844 836
845 if (options.audio_jitter_buffer_max_packets) { 837 if (options.audio_jitter_buffer_max_packets) {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 LOG(LS_INFO) << "Level control: " 905 LOG(LS_INFO) << "Level control: "
914 << (!!level_control_ ? *level_control_ : -1); 906 << (!!level_control_ ? *level_control_ : -1);
915 if (level_control_) { 907 if (level_control_) {
916 apm_config_.level_controller.enabled = *level_control_; 908 apm_config_.level_controller.enabled = *level_control_;
917 if (options.level_control_initial_peak_level_dbfs) { 909 if (options.level_control_initial_peak_level_dbfs) {
918 apm_config_.level_controller.initial_peak_level_dbfs = 910 apm_config_.level_controller.initial_peak_level_dbfs =
919 *options.level_control_initial_peak_level_dbfs; 911 *options.level_control_initial_peak_level_dbfs;
920 } 912 }
921 } 913 }
922 914
915 if (options.highpass_filter) {
916 apm_config_.high_pass_filter.enabled = *options.highpass_filter;
917 }
918
923 apm()->SetExtraOptions(config); 919 apm()->SetExtraOptions(config);
924 apm()->ApplyConfig(apm_config_); 920 apm()->ApplyConfig(apm_config_);
925 921
926 if (options.recording_sample_rate) { 922 if (options.recording_sample_rate) {
927 LOG(LS_INFO) << "Recording sample rate is " 923 LOG(LS_INFO) << "Recording sample rate is "
928 << *options.recording_sample_rate; 924 << *options.recording_sample_rate;
929 if (adm()->SetRecordingSampleRate(*options.recording_sample_rate)) { 925 if (adm()->SetRecordingSampleRate(*options.recording_sample_rate)) {
930 LOG_RTCERR1(SetRecordingSampleRate, *options.recording_sample_rate); 926 LOG_RTCERR1(SetRecordingSampleRate, *options.recording_sample_rate);
931 } 927 }
932 } 928 }
(...skipping 1709 matching lines...) Expand 10 before | Expand all | Expand 10 after
2642 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); 2638 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
2643 const auto it = send_streams_.find(ssrc); 2639 const auto it = send_streams_.find(ssrc);
2644 if (it != send_streams_.end()) { 2640 if (it != send_streams_.end()) {
2645 return it->second->channel(); 2641 return it->second->channel();
2646 } 2642 }
2647 return -1; 2643 return -1;
2648 } 2644 }
2649 } // namespace cricket 2645 } // namespace cricket
2650 2646
2651 #endif // HAVE_WEBRTC_VOICE 2647 #endif // HAVE_WEBRTC_VOICE
OLDNEW
« no previous file with comments | « webrtc/media/engine/webrtcvoiceengine.h ('k') | webrtc/media/engine/webrtcvoiceengine_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698