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

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

Issue 1565133002: Remove the 'audioDebugRecording' media constraint and the aec_dump AudioOptions flag. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@wvoe_options
Patch Set: le rebase Created 4 years, 10 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
« no previous file with comments | « webrtc/media/base/mediachannel.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 // Opus bitrate should be in the range between 6000 and 510000. 86 // Opus bitrate should be in the range between 6000 and 510000.
87 const int kOpusMinBitrate = 6000; 87 const int kOpusMinBitrate = 6000;
88 const int kOpusMaxBitrate = 510000; 88 const int kOpusMaxBitrate = 510000;
89 89
90 // Default audio dscp value. 90 // Default audio dscp value.
91 // See http://tools.ietf.org/html/rfc2474 for details. 91 // See http://tools.ietf.org/html/rfc2474 for details.
92 // See also http://tools.ietf.org/html/draft-jennings-rtcweb-qos-00 92 // See also http://tools.ietf.org/html/draft-jennings-rtcweb-qos-00
93 const rtc::DiffServCodePoint kAudioDscpValue = rtc::DSCP_EF; 93 const rtc::DiffServCodePoint kAudioDscpValue = rtc::DSCP_EF;
94 94
95 // Ensure we open the file in a writeable path on ChromeOS and Android. This
96 // workaround can be removed when it's possible to specify a filename for audio
97 // option based AEC dumps.
98 //
99 // TODO(grunell): Use a string in the options instead of hardcoding it here
100 // and let the embedder choose the filename (crbug.com/264223).
101 //
102 // NOTE(ajm): Don't use hardcoded paths on platforms not explicitly specified
103 // below.
104 #if defined(CHROMEOS)
105 const char kAecDumpByAudioOptionFilename[] = "/tmp/audio.aecdump";
106 #elif defined(ANDROID)
107 const char kAecDumpByAudioOptionFilename[] = "/sdcard/audio.aecdump";
108 #else
109 const char kAecDumpByAudioOptionFilename[] = "audio.aecdump";
110 #endif
111
112 // Constants from voice_engine_defines.h. 95 // Constants from voice_engine_defines.h.
113 const int kMinTelephoneEventCode = 0; // RFC4733 (Section 2.3.1) 96 const int kMinTelephoneEventCode = 0; // RFC4733 (Section 2.3.1)
114 const int kMaxTelephoneEventCode = 255; 97 const int kMaxTelephoneEventCode = 255;
115 const int kMinTelephoneEventDuration = 100; 98 const int kMinTelephoneEventDuration = 100;
116 const int kMaxTelephoneEventDuration = 60000; // Actual limit is 2^16 99 const int kMaxTelephoneEventDuration = 60000; // Actual limit is 2^16
117 100
118 class ProxySink : public webrtc::AudioSinkInterface { 101 class ProxySink : public webrtc::AudioSinkInterface {
119 public: 102 public:
120 ProxySink(AudioSinkInterface* sink) : sink_(sink) { RTC_DCHECK(sink); } 103 ProxySink(AudioSinkInterface* sink) : sink_(sink) { RTC_DCHECK(sink); }
121 104
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 options.highpass_filter = rtc::Optional<bool>(true); 591 options.highpass_filter = rtc::Optional<bool>(true);
609 options.stereo_swapping = rtc::Optional<bool>(false); 592 options.stereo_swapping = rtc::Optional<bool>(false);
610 options.audio_jitter_buffer_max_packets = rtc::Optional<int>(50); 593 options.audio_jitter_buffer_max_packets = rtc::Optional<int>(50);
611 options.audio_jitter_buffer_fast_accelerate = rtc::Optional<bool>(false); 594 options.audio_jitter_buffer_fast_accelerate = rtc::Optional<bool>(false);
612 options.typing_detection = rtc::Optional<bool>(true); 595 options.typing_detection = rtc::Optional<bool>(true);
613 options.adjust_agc_delta = rtc::Optional<int>(0); 596 options.adjust_agc_delta = rtc::Optional<int>(0);
614 options.experimental_agc = rtc::Optional<bool>(false); 597 options.experimental_agc = rtc::Optional<bool>(false);
615 options.extended_filter_aec = rtc::Optional<bool>(false); 598 options.extended_filter_aec = rtc::Optional<bool>(false);
616 options.delay_agnostic_aec = rtc::Optional<bool>(false); 599 options.delay_agnostic_aec = rtc::Optional<bool>(false);
617 options.experimental_ns = rtc::Optional<bool>(false); 600 options.experimental_ns = rtc::Optional<bool>(false);
618 options.aec_dump = rtc::Optional<bool>(false);
619 if (!ApplyOptions(options)) { 601 if (!ApplyOptions(options)) {
620 return false; 602 return false;
621 } 603 }
622 } 604 }
623 605
624 // Print our codec list again for the call diagnostic log 606 // Print our codec list again for the call diagnostic log
625 LOG(LS_INFO) << "WebRtc VoiceEngine codecs:"; 607 LOG(LS_INFO) << "WebRtc VoiceEngine codecs:";
626 for (const AudioCodec& codec : codecs_) { 608 for (const AudioCodec& codec : codecs_) {
627 LOG(LS_INFO) << ToString(codec); 609 LOG(LS_INFO) << ToString(codec);
628 } 610 }
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 } 843 }
862 } 844 }
863 845
864 if (options.adjust_agc_delta) { 846 if (options.adjust_agc_delta) {
865 LOG(LS_INFO) << "Adjust agc delta is " << *options.adjust_agc_delta; 847 LOG(LS_INFO) << "Adjust agc delta is " << *options.adjust_agc_delta;
866 if (!AdjustAgcLevel(*options.adjust_agc_delta)) { 848 if (!AdjustAgcLevel(*options.adjust_agc_delta)) {
867 return false; 849 return false;
868 } 850 }
869 } 851 }
870 852
871 if (options.aec_dump) {
872 LOG(LS_INFO) << "Aec dump is enabled? " << *options.aec_dump;
873 if (*options.aec_dump)
874 StartAecDump(kAecDumpByAudioOptionFilename);
875 else
876 StopAecDump();
877 }
878
879 webrtc::Config config; 853 webrtc::Config config;
880 854
881 if (options.delay_agnostic_aec) 855 if (options.delay_agnostic_aec)
882 delay_agnostic_aec_ = options.delay_agnostic_aec; 856 delay_agnostic_aec_ = options.delay_agnostic_aec;
883 if (delay_agnostic_aec_) { 857 if (delay_agnostic_aec_) {
884 LOG(LS_INFO) << "Delay agnostic aec is enabled? " << *delay_agnostic_aec_; 858 LOG(LS_INFO) << "Delay agnostic aec is enabled? " << *delay_agnostic_aec_;
885 config.Set<webrtc::DelayAgnostic>( 859 config.Set<webrtc::DelayAgnostic>(
886 new webrtc::DelayAgnostic(*delay_agnostic_aec_)); 860 new webrtc::DelayAgnostic(*delay_agnostic_aec_));
887 } 861 }
888 862
(...skipping 1657 matching lines...) Expand 10 before | Expand all | Expand 10 after
2546 } 2520 }
2547 } else { 2521 } else {
2548 LOG(LS_INFO) << "Stopping playout for channel #" << channel; 2522 LOG(LS_INFO) << "Stopping playout for channel #" << channel;
2549 engine()->voe()->base()->StopPlayout(channel); 2523 engine()->voe()->base()->StopPlayout(channel);
2550 } 2524 }
2551 return true; 2525 return true;
2552 } 2526 }
2553 } // namespace cricket 2527 } // namespace cricket
2554 2528
2555 #endif // HAVE_WEBRTC_VOICE 2529 #endif // HAVE_WEBRTC_VOICE
OLDNEW
« no previous file with comments | « webrtc/media/base/mediachannel.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698