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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 SetFrom(&experimental_ns, change.experimental_ns); | 161 SetFrom(&experimental_ns, change.experimental_ns); |
162 SetFrom(&intelligibility_enhancer, change.intelligibility_enhancer); | 162 SetFrom(&intelligibility_enhancer, change.intelligibility_enhancer); |
163 SetFrom(&level_control, change.level_control); | 163 SetFrom(&level_control, change.level_control); |
164 SetFrom(&tx_agc_target_dbov, change.tx_agc_target_dbov); | 164 SetFrom(&tx_agc_target_dbov, change.tx_agc_target_dbov); |
165 SetFrom(&tx_agc_digital_compression_gain, | 165 SetFrom(&tx_agc_digital_compression_gain, |
166 change.tx_agc_digital_compression_gain); | 166 change.tx_agc_digital_compression_gain); |
167 SetFrom(&tx_agc_limiter, change.tx_agc_limiter); | 167 SetFrom(&tx_agc_limiter, change.tx_agc_limiter); |
168 SetFrom(&recording_sample_rate, change.recording_sample_rate); | 168 SetFrom(&recording_sample_rate, change.recording_sample_rate); |
169 SetFrom(&playout_sample_rate, change.playout_sample_rate); | 169 SetFrom(&playout_sample_rate, change.playout_sample_rate); |
170 SetFrom(&combined_audio_video_bwe, change.combined_audio_video_bwe); | 170 SetFrom(&combined_audio_video_bwe, change.combined_audio_video_bwe); |
| 171 SetFrom(&audio_network_adaptor_config, change.audio_network_adaptor_config); |
171 } | 172 } |
172 | 173 |
173 bool operator==(const AudioOptions& o) const { | 174 bool operator==(const AudioOptions& o) const { |
174 return echo_cancellation == o.echo_cancellation && | 175 return echo_cancellation == o.echo_cancellation && |
175 auto_gain_control == o.auto_gain_control && | 176 auto_gain_control == o.auto_gain_control && |
176 noise_suppression == o.noise_suppression && | 177 noise_suppression == o.noise_suppression && |
177 highpass_filter == o.highpass_filter && | 178 highpass_filter == o.highpass_filter && |
178 stereo_swapping == o.stereo_swapping && | 179 stereo_swapping == o.stereo_swapping && |
179 audio_jitter_buffer_max_packets == | 180 audio_jitter_buffer_max_packets == |
180 o.audio_jitter_buffer_max_packets && | 181 o.audio_jitter_buffer_max_packets && |
181 audio_jitter_buffer_fast_accelerate == | 182 audio_jitter_buffer_fast_accelerate == |
182 o.audio_jitter_buffer_fast_accelerate && | 183 o.audio_jitter_buffer_fast_accelerate && |
183 typing_detection == o.typing_detection && | 184 typing_detection == o.typing_detection && |
184 aecm_generate_comfort_noise == o.aecm_generate_comfort_noise && | 185 aecm_generate_comfort_noise == o.aecm_generate_comfort_noise && |
185 experimental_agc == o.experimental_agc && | 186 experimental_agc == o.experimental_agc && |
186 extended_filter_aec == o.extended_filter_aec && | 187 extended_filter_aec == o.extended_filter_aec && |
187 delay_agnostic_aec == o.delay_agnostic_aec && | 188 delay_agnostic_aec == o.delay_agnostic_aec && |
188 experimental_ns == o.experimental_ns && | 189 experimental_ns == o.experimental_ns && |
189 intelligibility_enhancer == o.intelligibility_enhancer && | 190 intelligibility_enhancer == o.intelligibility_enhancer && |
190 level_control == o.level_control && | 191 level_control == o.level_control && |
191 adjust_agc_delta == o.adjust_agc_delta && | 192 adjust_agc_delta == o.adjust_agc_delta && |
192 tx_agc_target_dbov == o.tx_agc_target_dbov && | 193 tx_agc_target_dbov == o.tx_agc_target_dbov && |
193 tx_agc_digital_compression_gain == | 194 tx_agc_digital_compression_gain == |
194 o.tx_agc_digital_compression_gain && | 195 o.tx_agc_digital_compression_gain && |
195 tx_agc_limiter == o.tx_agc_limiter && | 196 tx_agc_limiter == o.tx_agc_limiter && |
196 recording_sample_rate == o.recording_sample_rate && | 197 recording_sample_rate == o.recording_sample_rate && |
197 playout_sample_rate == o.playout_sample_rate && | 198 playout_sample_rate == o.playout_sample_rate && |
198 combined_audio_video_bwe == o.combined_audio_video_bwe; | 199 combined_audio_video_bwe == o.combined_audio_video_bwe && |
| 200 audio_network_adaptor_config == o.audio_network_adaptor_config; |
199 } | 201 } |
200 bool operator!=(const AudioOptions& o) const { return !(*this == o); } | 202 bool operator!=(const AudioOptions& o) const { return !(*this == o); } |
201 | 203 |
202 std::string ToString() const { | 204 std::string ToString() const { |
203 std::ostringstream ost; | 205 std::ostringstream ost; |
204 ost << "AudioOptions {"; | 206 ost << "AudioOptions {"; |
205 ost << ToStringIfSet("aec", echo_cancellation); | 207 ost << ToStringIfSet("aec", echo_cancellation); |
206 ost << ToStringIfSet("agc", auto_gain_control); | 208 ost << ToStringIfSet("agc", auto_gain_control); |
207 ost << ToStringIfSet("ns", noise_suppression); | 209 ost << ToStringIfSet("ns", noise_suppression); |
208 ost << ToStringIfSet("hf", highpass_filter); | 210 ost << ToStringIfSet("hf", highpass_filter); |
(...skipping 11 matching lines...) Expand all Loading... |
220 ost << ToStringIfSet("experimental_ns", experimental_ns); | 222 ost << ToStringIfSet("experimental_ns", experimental_ns); |
221 ost << ToStringIfSet("intelligibility_enhancer", intelligibility_enhancer); | 223 ost << ToStringIfSet("intelligibility_enhancer", intelligibility_enhancer); |
222 ost << ToStringIfSet("level_control", level_control); | 224 ost << ToStringIfSet("level_control", level_control); |
223 ost << ToStringIfSet("tx_agc_target_dbov", tx_agc_target_dbov); | 225 ost << ToStringIfSet("tx_agc_target_dbov", tx_agc_target_dbov); |
224 ost << ToStringIfSet("tx_agc_digital_compression_gain", | 226 ost << ToStringIfSet("tx_agc_digital_compression_gain", |
225 tx_agc_digital_compression_gain); | 227 tx_agc_digital_compression_gain); |
226 ost << ToStringIfSet("tx_agc_limiter", tx_agc_limiter); | 228 ost << ToStringIfSet("tx_agc_limiter", tx_agc_limiter); |
227 ost << ToStringIfSet("recording_sample_rate", recording_sample_rate); | 229 ost << ToStringIfSet("recording_sample_rate", recording_sample_rate); |
228 ost << ToStringIfSet("playout_sample_rate", playout_sample_rate); | 230 ost << ToStringIfSet("playout_sample_rate", playout_sample_rate); |
229 ost << ToStringIfSet("combined_audio_video_bwe", combined_audio_video_bwe); | 231 ost << ToStringIfSet("combined_audio_video_bwe", combined_audio_video_bwe); |
| 232 ost << ToStringIfSet("audio_network_adaptor_config", |
| 233 audio_network_adaptor_config); |
230 ost << "}"; | 234 ost << "}"; |
231 return ost.str(); | 235 return ost.str(); |
232 } | 236 } |
233 | 237 |
234 // Audio processing that attempts to filter away the output signal from | 238 // Audio processing that attempts to filter away the output signal from |
235 // later inbound pickup. | 239 // later inbound pickup. |
236 rtc::Optional<bool> echo_cancellation; | 240 rtc::Optional<bool> echo_cancellation; |
237 // Audio processing to adjust the sensitivity of the local mic dynamically. | 241 // Audio processing to adjust the sensitivity of the local mic dynamically. |
238 rtc::Optional<bool> auto_gain_control; | 242 rtc::Optional<bool> auto_gain_control; |
239 // Audio processing to filter out background noise. | 243 // Audio processing to filter out background noise. |
(...skipping 20 matching lines...) Expand all Loading... |
260 rtc::Optional<uint16_t> tx_agc_target_dbov; | 264 rtc::Optional<uint16_t> tx_agc_target_dbov; |
261 rtc::Optional<uint16_t> tx_agc_digital_compression_gain; | 265 rtc::Optional<uint16_t> tx_agc_digital_compression_gain; |
262 rtc::Optional<bool> tx_agc_limiter; | 266 rtc::Optional<bool> tx_agc_limiter; |
263 rtc::Optional<uint32_t> recording_sample_rate; | 267 rtc::Optional<uint32_t> recording_sample_rate; |
264 rtc::Optional<uint32_t> playout_sample_rate; | 268 rtc::Optional<uint32_t> playout_sample_rate; |
265 // Enable combined audio+bandwidth BWE. | 269 // Enable combined audio+bandwidth BWE. |
266 // TODO(pthatcher): This flag is set from the | 270 // TODO(pthatcher): This flag is set from the |
267 // "googCombinedAudioVideoBwe", but not used anywhere. So delete it, | 271 // "googCombinedAudioVideoBwe", but not used anywhere. So delete it, |
268 // and check if any other AudioOptions members are unused. | 272 // and check if any other AudioOptions members are unused. |
269 rtc::Optional<bool> combined_audio_video_bwe; | 273 rtc::Optional<bool> combined_audio_video_bwe; |
| 274 // Enable audio network adaptor and its config string. |
| 275 rtc::Optional<std::string> audio_network_adaptor_config; |
270 | 276 |
271 private: | 277 private: |
272 template <typename T> | 278 template <typename T> |
273 static void SetFrom(rtc::Optional<T>* s, const rtc::Optional<T>& o) { | 279 static void SetFrom(rtc::Optional<T>* s, const rtc::Optional<T>& o) { |
274 if (o) { | 280 if (o) { |
275 *s = o; | 281 *s = o; |
276 } | 282 } |
277 } | 283 } |
278 }; | 284 }; |
279 | 285 |
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1134 // 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: |
1135 // writable(bool) | 1141 // writable(bool) |
1136 sigslot::signal1<bool> SignalReadyToSend; | 1142 sigslot::signal1<bool> SignalReadyToSend; |
1137 // Signal for notifying that the remote side has closed the DataChannel. | 1143 // Signal for notifying that the remote side has closed the DataChannel. |
1138 sigslot::signal1<uint32_t> SignalStreamClosedRemotely; | 1144 sigslot::signal1<uint32_t> SignalStreamClosedRemotely; |
1139 }; | 1145 }; |
1140 | 1146 |
1141 } // namespace cricket | 1147 } // namespace cricket |
1142 | 1148 |
1143 #endif // WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_ | 1149 #endif // WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_ |
OLD | NEW |