OLD | NEW |
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 | 94 |
95 // Starts AEC dump using an existing file. A maximum file size in bytes can be | 95 // Starts AEC dump using an existing file. A maximum file size in bytes can be |
96 // specified. When the maximum file size is reached, logging is stopped and | 96 // specified. When the maximum file size is reached, logging is stopped and |
97 // the file is closed. If max_size_bytes is set to <= 0, no limit will be | 97 // the file is closed. If max_size_bytes is set to <= 0, no limit will be |
98 // used. | 98 // used. |
99 bool StartAecDump(rtc::PlatformFile file, int64_t max_size_bytes); | 99 bool StartAecDump(rtc::PlatformFile file, int64_t max_size_bytes); |
100 | 100 |
101 // Stops AEC dump. | 101 // Stops AEC dump. |
102 void StopAecDump(); | 102 void StopAecDump(); |
103 | 103 |
104 const webrtc::AudioProcessing::Config& GetApmConfigForTest() const { | 104 const webrtc::AudioProcessing::Config GetApmConfigForTest() const { |
105 return apm_config_; | 105 return apm()->GetConfig(); |
106 } | 106 } |
107 | 107 |
108 private: | 108 private: |
109 // Every option that is "set" will be applied. Every option not "set" will be | 109 // Every option that is "set" will be applied. Every option not "set" will be |
110 // ignored. This allows us to selectively turn on and off different options | 110 // ignored. This allows us to selectively turn on and off different options |
111 // easily at any time. | 111 // easily at any time. |
112 bool ApplyOptions(const AudioOptions& options); | 112 bool ApplyOptions(const AudioOptions& options); |
113 | 113 |
114 // webrtc::TraceCallback: | 114 // webrtc::TraceCallback: |
115 void Print(webrtc::TraceLevel level, const char* trace, int length) override; | 115 void Print(webrtc::TraceLevel level, const char* trace, int length) override; |
116 | 116 |
117 void StartAecDump(const std::string& filename); | 117 void StartAecDump(const std::string& filename); |
118 int CreateVoEChannel(); | 118 int CreateVoEChannel(); |
119 | 119 |
120 std::unique_ptr<rtc::TaskQueue> low_priority_worker_queue_; | 120 std::unique_ptr<rtc::TaskQueue> low_priority_worker_queue_; |
121 | 121 |
122 webrtc::AudioDeviceModule* adm(); | 122 webrtc::AudioDeviceModule* adm(); |
123 webrtc::AudioProcessing* apm(); | 123 webrtc::AudioProcessing* apm() const; |
124 webrtc::voe::TransmitMixer* transmit_mixer(); | 124 webrtc::voe::TransmitMixer* transmit_mixer(); |
125 | 125 |
126 AudioCodecs CollectCodecs( | 126 AudioCodecs CollectCodecs( |
127 const std::vector<webrtc::AudioCodecSpec>& specs) const; | 127 const std::vector<webrtc::AudioCodecSpec>& specs) const; |
128 | 128 |
129 rtc::ThreadChecker signal_thread_checker_; | 129 rtc::ThreadChecker signal_thread_checker_; |
130 rtc::ThreadChecker worker_thread_checker_; | 130 rtc::ThreadChecker worker_thread_checker_; |
131 | 131 |
132 // The audio device manager. | 132 // The audio device manager. |
133 rtc::scoped_refptr<webrtc::AudioDeviceModule> adm_; | 133 rtc::scoped_refptr<webrtc::AudioDeviceModule> adm_; |
(...skipping 19 matching lines...) Expand all Loading... |
153 // level controller, and intelligibility_enhancer values, and apply them | 153 // level controller, and intelligibility_enhancer values, and apply them |
154 // in case they are missing in the audio options. We need to do this because | 154 // in case they are missing in the audio options. We need to do this because |
155 // SetExtraOptions() will revert to defaults for options which are not | 155 // SetExtraOptions() will revert to defaults for options which are not |
156 // provided. | 156 // provided. |
157 rtc::Optional<bool> extended_filter_aec_; | 157 rtc::Optional<bool> extended_filter_aec_; |
158 rtc::Optional<bool> delay_agnostic_aec_; | 158 rtc::Optional<bool> delay_agnostic_aec_; |
159 rtc::Optional<bool> experimental_ns_; | 159 rtc::Optional<bool> experimental_ns_; |
160 rtc::Optional<bool> intelligibility_enhancer_; | 160 rtc::Optional<bool> intelligibility_enhancer_; |
161 rtc::Optional<bool> level_control_; | 161 rtc::Optional<bool> level_control_; |
162 | 162 |
163 webrtc::AudioProcessing::Config apm_config_; | |
164 | |
165 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceEngine); | 163 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceEngine); |
166 }; | 164 }; |
167 | 165 |
168 // WebRtcVoiceMediaChannel is an implementation of VoiceMediaChannel that uses | 166 // WebRtcVoiceMediaChannel is an implementation of VoiceMediaChannel that uses |
169 // WebRtc Voice Engine. | 167 // WebRtc Voice Engine. |
170 class WebRtcVoiceMediaChannel final : public VoiceMediaChannel, | 168 class WebRtcVoiceMediaChannel final : public VoiceMediaChannel, |
171 public webrtc::Transport { | 169 public webrtc::Transport { |
172 public: | 170 public: |
173 WebRtcVoiceMediaChannel(WebRtcVoiceEngine* engine, | 171 WebRtcVoiceMediaChannel(WebRtcVoiceEngine* engine, |
174 const MediaConfig& config, | 172 const MediaConfig& config, |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; | 303 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; |
306 | 304 |
307 rtc::Optional<webrtc::AudioSendStream::Config::SendCodecSpec> | 305 rtc::Optional<webrtc::AudioSendStream::Config::SendCodecSpec> |
308 send_codec_spec_; | 306 send_codec_spec_; |
309 | 307 |
310 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); | 308 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); |
311 }; | 309 }; |
312 } // namespace cricket | 310 } // namespace cricket |
313 | 311 |
314 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ | 312 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ |
OLD | NEW |