| 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 SetFrom(&experimental_ns, change.experimental_ns); | 160 SetFrom(&experimental_ns, change.experimental_ns); |
| 161 SetFrom(&intelligibility_enhancer, change.intelligibility_enhancer); | 161 SetFrom(&intelligibility_enhancer, change.intelligibility_enhancer); |
| 162 SetFrom(&level_control, change.level_control); | 162 SetFrom(&level_control, change.level_control); |
| 163 SetFrom(&tx_agc_target_dbov, change.tx_agc_target_dbov); | 163 SetFrom(&tx_agc_target_dbov, change.tx_agc_target_dbov); |
| 164 SetFrom(&tx_agc_digital_compression_gain, | 164 SetFrom(&tx_agc_digital_compression_gain, |
| 165 change.tx_agc_digital_compression_gain); | 165 change.tx_agc_digital_compression_gain); |
| 166 SetFrom(&tx_agc_limiter, change.tx_agc_limiter); | 166 SetFrom(&tx_agc_limiter, change.tx_agc_limiter); |
| 167 SetFrom(&recording_sample_rate, change.recording_sample_rate); | 167 SetFrom(&recording_sample_rate, change.recording_sample_rate); |
| 168 SetFrom(&playout_sample_rate, change.playout_sample_rate); | 168 SetFrom(&playout_sample_rate, change.playout_sample_rate); |
| 169 SetFrom(&combined_audio_video_bwe, change.combined_audio_video_bwe); | 169 SetFrom(&combined_audio_video_bwe, change.combined_audio_video_bwe); |
| 170 SetFrom(&audio_network_adaptor, change.audio_network_adaptor); |
| 171 SetFrom(&audio_network_adaptor_config, change.audio_network_adaptor_config); |
| 170 SetFrom(&level_control_initial_peak_level_dbfs, | 172 SetFrom(&level_control_initial_peak_level_dbfs, |
| 171 change.level_control_initial_peak_level_dbfs); | 173 change.level_control_initial_peak_level_dbfs); |
| 172 } | 174 } |
| 173 | 175 |
| 174 bool operator==(const AudioOptions& o) const { | 176 bool operator==(const AudioOptions& o) const { |
| 175 return echo_cancellation == o.echo_cancellation && | 177 return echo_cancellation == o.echo_cancellation && |
| 176 auto_gain_control == o.auto_gain_control && | 178 auto_gain_control == o.auto_gain_control && |
| 177 noise_suppression == o.noise_suppression && | 179 noise_suppression == o.noise_suppression && |
| 178 highpass_filter == o.highpass_filter && | 180 highpass_filter == o.highpass_filter && |
| 179 stereo_swapping == o.stereo_swapping && | 181 stereo_swapping == o.stereo_swapping && |
| (...skipping 10 matching lines...) Expand all Loading... |
| 190 intelligibility_enhancer == o.intelligibility_enhancer && | 192 intelligibility_enhancer == o.intelligibility_enhancer && |
| 191 level_control == o.level_control && | 193 level_control == o.level_control && |
| 192 adjust_agc_delta == o.adjust_agc_delta && | 194 adjust_agc_delta == o.adjust_agc_delta && |
| 193 tx_agc_target_dbov == o.tx_agc_target_dbov && | 195 tx_agc_target_dbov == o.tx_agc_target_dbov && |
| 194 tx_agc_digital_compression_gain == | 196 tx_agc_digital_compression_gain == |
| 195 o.tx_agc_digital_compression_gain && | 197 o.tx_agc_digital_compression_gain && |
| 196 tx_agc_limiter == o.tx_agc_limiter && | 198 tx_agc_limiter == o.tx_agc_limiter && |
| 197 recording_sample_rate == o.recording_sample_rate && | 199 recording_sample_rate == o.recording_sample_rate && |
| 198 playout_sample_rate == o.playout_sample_rate && | 200 playout_sample_rate == o.playout_sample_rate && |
| 199 combined_audio_video_bwe == o.combined_audio_video_bwe && | 201 combined_audio_video_bwe == o.combined_audio_video_bwe && |
| 202 audio_network_adaptor == o.audio_network_adaptor && |
| 203 audio_network_adaptor_config == o.audio_network_adaptor_config && |
| 200 level_control_initial_peak_level_dbfs == | 204 level_control_initial_peak_level_dbfs == |
| 201 o.level_control_initial_peak_level_dbfs; | 205 o.level_control_initial_peak_level_dbfs; |
| 202 } | 206 } |
| 203 bool operator!=(const AudioOptions& o) const { return !(*this == o); } | 207 bool operator!=(const AudioOptions& o) const { return !(*this == o); } |
| 204 | 208 |
| 205 std::string ToString() const { | 209 std::string ToString() const { |
| 206 std::ostringstream ost; | 210 std::ostringstream ost; |
| 207 ost << "AudioOptions {"; | 211 ost << "AudioOptions {"; |
| 208 ost << ToStringIfSet("aec", echo_cancellation); | 212 ost << ToStringIfSet("aec", echo_cancellation); |
| 209 ost << ToStringIfSet("agc", auto_gain_control); | 213 ost << ToStringIfSet("agc", auto_gain_control); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 225 ost << ToStringIfSet("level_control", level_control); | 229 ost << ToStringIfSet("level_control", level_control); |
| 226 ost << ToStringIfSet("level_control_initial_peak_level_dbfs", | 230 ost << ToStringIfSet("level_control_initial_peak_level_dbfs", |
| 227 level_control_initial_peak_level_dbfs); | 231 level_control_initial_peak_level_dbfs); |
| 228 ost << ToStringIfSet("tx_agc_target_dbov", tx_agc_target_dbov); | 232 ost << ToStringIfSet("tx_agc_target_dbov", tx_agc_target_dbov); |
| 229 ost << ToStringIfSet("tx_agc_digital_compression_gain", | 233 ost << ToStringIfSet("tx_agc_digital_compression_gain", |
| 230 tx_agc_digital_compression_gain); | 234 tx_agc_digital_compression_gain); |
| 231 ost << ToStringIfSet("tx_agc_limiter", tx_agc_limiter); | 235 ost << ToStringIfSet("tx_agc_limiter", tx_agc_limiter); |
| 232 ost << ToStringIfSet("recording_sample_rate", recording_sample_rate); | 236 ost << ToStringIfSet("recording_sample_rate", recording_sample_rate); |
| 233 ost << ToStringIfSet("playout_sample_rate", playout_sample_rate); | 237 ost << ToStringIfSet("playout_sample_rate", playout_sample_rate); |
| 234 ost << ToStringIfSet("combined_audio_video_bwe", combined_audio_video_bwe); | 238 ost << ToStringIfSet("combined_audio_video_bwe", combined_audio_video_bwe); |
| 239 ost << ToStringIfSet("audio_network_adaptor", audio_network_adaptor); |
| 240 // The adaptor config is a serialized proto buffer and therefore not human |
| 241 // readable. So we comment out the following line. |
| 242 // ost << ToStringIfSet("audio_network_adaptor_config", |
| 243 // audio_network_adaptor_config); |
| 235 ost << "}"; | 244 ost << "}"; |
| 236 return ost.str(); | 245 return ost.str(); |
| 237 } | 246 } |
| 238 | 247 |
| 239 // Audio processing that attempts to filter away the output signal from | 248 // Audio processing that attempts to filter away the output signal from |
| 240 // later inbound pickup. | 249 // later inbound pickup. |
| 241 rtc::Optional<bool> echo_cancellation; | 250 rtc::Optional<bool> echo_cancellation; |
| 242 // Audio processing to adjust the sensitivity of the local mic dynamically. | 251 // Audio processing to adjust the sensitivity of the local mic dynamically. |
| 243 rtc::Optional<bool> auto_gain_control; | 252 rtc::Optional<bool> auto_gain_control; |
| 244 // Audio processing to filter out background noise. | 253 // Audio processing to filter out background noise. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 267 rtc::Optional<uint16_t> tx_agc_target_dbov; | 276 rtc::Optional<uint16_t> tx_agc_target_dbov; |
| 268 rtc::Optional<uint16_t> tx_agc_digital_compression_gain; | 277 rtc::Optional<uint16_t> tx_agc_digital_compression_gain; |
| 269 rtc::Optional<bool> tx_agc_limiter; | 278 rtc::Optional<bool> tx_agc_limiter; |
| 270 rtc::Optional<uint32_t> recording_sample_rate; | 279 rtc::Optional<uint32_t> recording_sample_rate; |
| 271 rtc::Optional<uint32_t> playout_sample_rate; | 280 rtc::Optional<uint32_t> playout_sample_rate; |
| 272 // Enable combined audio+bandwidth BWE. | 281 // Enable combined audio+bandwidth BWE. |
| 273 // TODO(pthatcher): This flag is set from the | 282 // TODO(pthatcher): This flag is set from the |
| 274 // "googCombinedAudioVideoBwe", but not used anywhere. So delete it, | 283 // "googCombinedAudioVideoBwe", but not used anywhere. So delete it, |
| 275 // and check if any other AudioOptions members are unused. | 284 // and check if any other AudioOptions members are unused. |
| 276 rtc::Optional<bool> combined_audio_video_bwe; | 285 rtc::Optional<bool> combined_audio_video_bwe; |
| 286 // Enable audio network adaptor. |
| 287 rtc::Optional<bool> audio_network_adaptor; |
| 288 // Config string for audio network adaptor. |
| 289 rtc::Optional<std::string> audio_network_adaptor_config; |
| 277 | 290 |
| 278 private: | 291 private: |
| 279 template <typename T> | 292 template <typename T> |
| 280 static void SetFrom(rtc::Optional<T>* s, const rtc::Optional<T>& o) { | 293 static void SetFrom(rtc::Optional<T>* s, const rtc::Optional<T>& o) { |
| 281 if (o) { | 294 if (o) { |
| 282 *s = o; | 295 *s = o; |
| 283 } | 296 } |
| 284 } | 297 } |
| 285 }; | 298 }; |
| 286 | 299 |
| (...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1146 // Signal when the media channel is ready to send the stream. Arguments are: | 1159 // Signal when the media channel is ready to send the stream. Arguments are: |
| 1147 // writable(bool) | 1160 // writable(bool) |
| 1148 sigslot::signal1<bool> SignalReadyToSend; | 1161 sigslot::signal1<bool> SignalReadyToSend; |
| 1149 // Signal for notifying that the remote side has closed the DataChannel. | 1162 // Signal for notifying that the remote side has closed the DataChannel. |
| 1150 sigslot::signal1<uint32_t> SignalStreamClosedRemotely; | 1163 sigslot::signal1<uint32_t> SignalStreamClosedRemotely; |
| 1151 }; | 1164 }; |
| 1152 | 1165 |
| 1153 } // namespace cricket | 1166 } // namespace cricket |
| 1154 | 1167 |
| 1155 #endif // WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_ | 1168 #endif // WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_ |
| OLD | NEW |