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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 SetFrom(&experimental_ns, change.experimental_ns); | 159 SetFrom(&experimental_ns, change.experimental_ns); |
160 SetFrom(&intelligibility_enhancer, change.intelligibility_enhancer); | 160 SetFrom(&intelligibility_enhancer, change.intelligibility_enhancer); |
161 SetFrom(&level_control, change.level_control); | 161 SetFrom(&level_control, change.level_control); |
162 SetFrom(&tx_agc_target_dbov, change.tx_agc_target_dbov); | 162 SetFrom(&tx_agc_target_dbov, change.tx_agc_target_dbov); |
163 SetFrom(&tx_agc_digital_compression_gain, | 163 SetFrom(&tx_agc_digital_compression_gain, |
164 change.tx_agc_digital_compression_gain); | 164 change.tx_agc_digital_compression_gain); |
165 SetFrom(&tx_agc_limiter, change.tx_agc_limiter); | 165 SetFrom(&tx_agc_limiter, change.tx_agc_limiter); |
166 SetFrom(&recording_sample_rate, change.recording_sample_rate); | 166 SetFrom(&recording_sample_rate, change.recording_sample_rate); |
167 SetFrom(&playout_sample_rate, change.playout_sample_rate); | 167 SetFrom(&playout_sample_rate, change.playout_sample_rate); |
168 SetFrom(&combined_audio_video_bwe, change.combined_audio_video_bwe); | 168 SetFrom(&combined_audio_video_bwe, change.combined_audio_video_bwe); |
| 169 SetFrom(&level_control_initial_peak_level_dbfs, |
| 170 change.level_control_initial_peak_level_dbfs); |
169 } | 171 } |
170 | 172 |
171 bool operator==(const AudioOptions& o) const { | 173 bool operator==(const AudioOptions& o) const { |
172 return echo_cancellation == o.echo_cancellation && | 174 return echo_cancellation == o.echo_cancellation && |
173 auto_gain_control == o.auto_gain_control && | 175 auto_gain_control == o.auto_gain_control && |
174 noise_suppression == o.noise_suppression && | 176 noise_suppression == o.noise_suppression && |
175 highpass_filter == o.highpass_filter && | 177 highpass_filter == o.highpass_filter && |
176 stereo_swapping == o.stereo_swapping && | 178 stereo_swapping == o.stereo_swapping && |
177 audio_jitter_buffer_max_packets == | 179 audio_jitter_buffer_max_packets == |
178 o.audio_jitter_buffer_max_packets && | 180 o.audio_jitter_buffer_max_packets && |
179 audio_jitter_buffer_fast_accelerate == | 181 audio_jitter_buffer_fast_accelerate == |
180 o.audio_jitter_buffer_fast_accelerate && | 182 o.audio_jitter_buffer_fast_accelerate && |
181 typing_detection == o.typing_detection && | 183 typing_detection == o.typing_detection && |
182 aecm_generate_comfort_noise == o.aecm_generate_comfort_noise && | 184 aecm_generate_comfort_noise == o.aecm_generate_comfort_noise && |
183 experimental_agc == o.experimental_agc && | 185 experimental_agc == o.experimental_agc && |
184 extended_filter_aec == o.extended_filter_aec && | 186 extended_filter_aec == o.extended_filter_aec && |
185 delay_agnostic_aec == o.delay_agnostic_aec && | 187 delay_agnostic_aec == o.delay_agnostic_aec && |
186 experimental_ns == o.experimental_ns && | 188 experimental_ns == o.experimental_ns && |
187 intelligibility_enhancer == o.intelligibility_enhancer && | 189 intelligibility_enhancer == o.intelligibility_enhancer && |
188 level_control == o.level_control && | 190 level_control == o.level_control && |
189 adjust_agc_delta == o.adjust_agc_delta && | 191 adjust_agc_delta == o.adjust_agc_delta && |
190 tx_agc_target_dbov == o.tx_agc_target_dbov && | 192 tx_agc_target_dbov == o.tx_agc_target_dbov && |
191 tx_agc_digital_compression_gain == | 193 tx_agc_digital_compression_gain == |
192 o.tx_agc_digital_compression_gain && | 194 o.tx_agc_digital_compression_gain && |
193 tx_agc_limiter == o.tx_agc_limiter && | 195 tx_agc_limiter == o.tx_agc_limiter && |
194 recording_sample_rate == o.recording_sample_rate && | 196 recording_sample_rate == o.recording_sample_rate && |
195 playout_sample_rate == o.playout_sample_rate && | 197 playout_sample_rate == o.playout_sample_rate && |
196 combined_audio_video_bwe == o.combined_audio_video_bwe; | 198 combined_audio_video_bwe == o.combined_audio_video_bwe && |
| 199 level_control_initial_peak_level_dbfs == |
| 200 o.level_control_initial_peak_level_dbfs; |
197 } | 201 } |
198 bool operator!=(const AudioOptions& o) const { return !(*this == o); } | 202 bool operator!=(const AudioOptions& o) const { return !(*this == o); } |
199 | 203 |
200 std::string ToString() const { | 204 std::string ToString() const { |
201 std::ostringstream ost; | 205 std::ostringstream ost; |
202 ost << "AudioOptions {"; | 206 ost << "AudioOptions {"; |
203 ost << ToStringIfSet("aec", echo_cancellation); | 207 ost << ToStringIfSet("aec", echo_cancellation); |
204 ost << ToStringIfSet("agc", auto_gain_control); | 208 ost << ToStringIfSet("agc", auto_gain_control); |
205 ost << ToStringIfSet("ns", noise_suppression); | 209 ost << ToStringIfSet("ns", noise_suppression); |
206 ost << ToStringIfSet("hf", highpass_filter); | 210 ost << ToStringIfSet("hf", highpass_filter); |
(...skipping 11 matching lines...) Expand all Loading... |
218 ost << ToStringIfSet("experimental_ns", experimental_ns); | 222 ost << ToStringIfSet("experimental_ns", experimental_ns); |
219 ost << ToStringIfSet("intelligibility_enhancer", intelligibility_enhancer); | 223 ost << ToStringIfSet("intelligibility_enhancer", intelligibility_enhancer); |
220 ost << ToStringIfSet("level_control", level_control); | 224 ost << ToStringIfSet("level_control", level_control); |
221 ost << ToStringIfSet("tx_agc_target_dbov", tx_agc_target_dbov); | 225 ost << ToStringIfSet("tx_agc_target_dbov", tx_agc_target_dbov); |
222 ost << ToStringIfSet("tx_agc_digital_compression_gain", | 226 ost << ToStringIfSet("tx_agc_digital_compression_gain", |
223 tx_agc_digital_compression_gain); | 227 tx_agc_digital_compression_gain); |
224 ost << ToStringIfSet("tx_agc_limiter", tx_agc_limiter); | 228 ost << ToStringIfSet("tx_agc_limiter", tx_agc_limiter); |
225 ost << ToStringIfSet("recording_sample_rate", recording_sample_rate); | 229 ost << ToStringIfSet("recording_sample_rate", recording_sample_rate); |
226 ost << ToStringIfSet("playout_sample_rate", playout_sample_rate); | 230 ost << ToStringIfSet("playout_sample_rate", playout_sample_rate); |
227 ost << ToStringIfSet("combined_audio_video_bwe", combined_audio_video_bwe); | 231 ost << ToStringIfSet("combined_audio_video_bwe", combined_audio_video_bwe); |
| 232 ost << ToStringIfSet("level_control_initial_peak_level_dbfs", |
| 233 level_control_initial_peak_level_dbfs); |
228 ost << "}"; | 234 ost << "}"; |
229 return ost.str(); | 235 return ost.str(); |
230 } | 236 } |
231 | 237 |
232 // Audio processing that attempts to filter away the output signal from | 238 // Audio processing that attempts to filter away the output signal from |
233 // later inbound pickup. | 239 // later inbound pickup. |
234 rtc::Optional<bool> echo_cancellation; | 240 rtc::Optional<bool> echo_cancellation; |
235 // Audio processing to adjust the sensitivity of the local mic dynamically. | 241 // Audio processing to adjust the sensitivity of the local mic dynamically. |
236 rtc::Optional<bool> auto_gain_control; | 242 rtc::Optional<bool> auto_gain_control; |
237 // Audio processing to filter out background noise. | 243 // Audio processing to filter out background noise. |
238 rtc::Optional<bool> noise_suppression; | 244 rtc::Optional<bool> noise_suppression; |
239 // Audio processing to remove background noise of lower frequencies. | 245 // Audio processing to remove background noise of lower frequencies. |
240 rtc::Optional<bool> highpass_filter; | 246 rtc::Optional<bool> highpass_filter; |
241 // Audio processing to swap the left and right channels. | 247 // Audio processing to swap the left and right channels. |
242 rtc::Optional<bool> stereo_swapping; | 248 rtc::Optional<bool> stereo_swapping; |
243 // Audio receiver jitter buffer (NetEq) max capacity in number of packets. | 249 // Audio receiver jitter buffer (NetEq) max capacity in number of packets. |
244 rtc::Optional<int> audio_jitter_buffer_max_packets; | 250 rtc::Optional<int> audio_jitter_buffer_max_packets; |
245 // Audio receiver jitter buffer (NetEq) fast accelerate mode. | 251 // Audio receiver jitter buffer (NetEq) fast accelerate mode. |
246 rtc::Optional<bool> audio_jitter_buffer_fast_accelerate; | 252 rtc::Optional<bool> audio_jitter_buffer_fast_accelerate; |
247 // Audio processing to detect typing. | 253 // Audio processing to detect typing. |
248 rtc::Optional<bool> typing_detection; | 254 rtc::Optional<bool> typing_detection; |
249 rtc::Optional<bool> aecm_generate_comfort_noise; | 255 rtc::Optional<bool> aecm_generate_comfort_noise; |
250 rtc::Optional<int> adjust_agc_delta; | 256 rtc::Optional<int> adjust_agc_delta; |
251 rtc::Optional<bool> experimental_agc; | 257 rtc::Optional<bool> experimental_agc; |
252 rtc::Optional<bool> extended_filter_aec; | 258 rtc::Optional<bool> extended_filter_aec; |
253 rtc::Optional<bool> delay_agnostic_aec; | 259 rtc::Optional<bool> delay_agnostic_aec; |
254 rtc::Optional<bool> experimental_ns; | 260 rtc::Optional<bool> experimental_ns; |
255 rtc::Optional<bool> intelligibility_enhancer; | 261 rtc::Optional<bool> intelligibility_enhancer; |
256 rtc::Optional<bool> level_control; | 262 rtc::Optional<bool> level_control; |
| 263 // Specifies an optional initialization value for the level controller. |
| 264 rtc::Optional<float> level_control_initial_peak_level_dbfs; |
257 // Note that tx_agc_* only applies to non-experimental AGC. | 265 // Note that tx_agc_* only applies to non-experimental AGC. |
258 rtc::Optional<uint16_t> tx_agc_target_dbov; | 266 rtc::Optional<uint16_t> tx_agc_target_dbov; |
259 rtc::Optional<uint16_t> tx_agc_digital_compression_gain; | 267 rtc::Optional<uint16_t> tx_agc_digital_compression_gain; |
260 rtc::Optional<bool> tx_agc_limiter; | 268 rtc::Optional<bool> tx_agc_limiter; |
261 rtc::Optional<uint32_t> recording_sample_rate; | 269 rtc::Optional<uint32_t> recording_sample_rate; |
262 rtc::Optional<uint32_t> playout_sample_rate; | 270 rtc::Optional<uint32_t> playout_sample_rate; |
263 // Enable combined audio+bandwidth BWE. | 271 // Enable combined audio+bandwidth BWE. |
264 // TODO(pthatcher): This flag is set from the | 272 // TODO(pthatcher): This flag is set from the |
265 // "googCombinedAudioVideoBwe", but not used anywhere. So delete it, | 273 // "googCombinedAudioVideoBwe", but not used anywhere. So delete it, |
266 // and check if any other AudioOptions members are unused. | 274 // and check if any other AudioOptions members are unused. |
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1132 // Signal when the media channel is ready to send the stream. Arguments are: | 1140 // Signal when the media channel is ready to send the stream. Arguments are: |
1133 // writable(bool) | 1141 // writable(bool) |
1134 sigslot::signal1<bool> SignalReadyToSend; | 1142 sigslot::signal1<bool> SignalReadyToSend; |
1135 // Signal for notifying that the remote side has closed the DataChannel. | 1143 // Signal for notifying that the remote side has closed the DataChannel. |
1136 sigslot::signal1<uint32_t> SignalStreamClosedRemotely; | 1144 sigslot::signal1<uint32_t> SignalStreamClosedRemotely; |
1137 }; | 1145 }; |
1138 | 1146 |
1139 } // namespace cricket | 1147 } // namespace cricket |
1140 | 1148 |
1141 #endif // WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_ | 1149 #endif // WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_ |
OLD | NEW |