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, change.audio_network_adaptor); | |
172 SetFrom(&audio_network_adaptor_config, change.audio_network_adaptor_config); | |
171 } | 173 } |
172 | 174 |
173 bool operator==(const AudioOptions& o) const { | 175 bool operator==(const AudioOptions& o) const { |
174 return echo_cancellation == o.echo_cancellation && | 176 return echo_cancellation == o.echo_cancellation && |
175 auto_gain_control == o.auto_gain_control && | 177 auto_gain_control == o.auto_gain_control && |
176 noise_suppression == o.noise_suppression && | 178 noise_suppression == o.noise_suppression && |
177 highpass_filter == o.highpass_filter && | 179 highpass_filter == o.highpass_filter && |
178 stereo_swapping == o.stereo_swapping && | 180 stereo_swapping == o.stereo_swapping && |
179 audio_jitter_buffer_max_packets == | 181 audio_jitter_buffer_max_packets == |
180 o.audio_jitter_buffer_max_packets && | 182 o.audio_jitter_buffer_max_packets && |
181 audio_jitter_buffer_fast_accelerate == | 183 audio_jitter_buffer_fast_accelerate == |
182 o.audio_jitter_buffer_fast_accelerate && | 184 o.audio_jitter_buffer_fast_accelerate && |
183 typing_detection == o.typing_detection && | 185 typing_detection == o.typing_detection && |
184 aecm_generate_comfort_noise == o.aecm_generate_comfort_noise && | 186 aecm_generate_comfort_noise == o.aecm_generate_comfort_noise && |
185 experimental_agc == o.experimental_agc && | 187 experimental_agc == o.experimental_agc && |
186 extended_filter_aec == o.extended_filter_aec && | 188 extended_filter_aec == o.extended_filter_aec && |
187 delay_agnostic_aec == o.delay_agnostic_aec && | 189 delay_agnostic_aec == o.delay_agnostic_aec && |
188 experimental_ns == o.experimental_ns && | 190 experimental_ns == o.experimental_ns && |
189 intelligibility_enhancer == o.intelligibility_enhancer && | 191 intelligibility_enhancer == o.intelligibility_enhancer && |
190 level_control == o.level_control && | 192 level_control == o.level_control && |
191 adjust_agc_delta == o.adjust_agc_delta && | 193 adjust_agc_delta == o.adjust_agc_delta && |
192 tx_agc_target_dbov == o.tx_agc_target_dbov && | 194 tx_agc_target_dbov == o.tx_agc_target_dbov && |
193 tx_agc_digital_compression_gain == | 195 tx_agc_digital_compression_gain == |
194 o.tx_agc_digital_compression_gain && | 196 o.tx_agc_digital_compression_gain && |
195 tx_agc_limiter == o.tx_agc_limiter && | 197 tx_agc_limiter == o.tx_agc_limiter && |
196 recording_sample_rate == o.recording_sample_rate && | 198 recording_sample_rate == o.recording_sample_rate && |
197 playout_sample_rate == o.playout_sample_rate && | 199 playout_sample_rate == o.playout_sample_rate && |
198 combined_audio_video_bwe == o.combined_audio_video_bwe; | 200 combined_audio_video_bwe == o.combined_audio_video_bwe && |
201 audio_network_adaptor == o.audio_network_adaptor && | |
202 audio_network_adaptor_config == o.audio_network_adaptor_config; | |
199 } | 203 } |
200 bool operator!=(const AudioOptions& o) const { return !(*this == o); } | 204 bool operator!=(const AudioOptions& o) const { return !(*this == o); } |
201 | 205 |
202 std::string ToString() const { | 206 std::string ToString() const { |
203 std::ostringstream ost; | 207 std::ostringstream ost; |
204 ost << "AudioOptions {"; | 208 ost << "AudioOptions {"; |
205 ost << ToStringIfSet("aec", echo_cancellation); | 209 ost << ToStringIfSet("aec", echo_cancellation); |
206 ost << ToStringIfSet("agc", auto_gain_control); | 210 ost << ToStringIfSet("agc", auto_gain_control); |
207 ost << ToStringIfSet("ns", noise_suppression); | 211 ost << ToStringIfSet("ns", noise_suppression); |
208 ost << ToStringIfSet("hf", highpass_filter); | 212 ost << ToStringIfSet("hf", highpass_filter); |
(...skipping 11 matching lines...) Expand all Loading... | |
220 ost << ToStringIfSet("experimental_ns", experimental_ns); | 224 ost << ToStringIfSet("experimental_ns", experimental_ns); |
221 ost << ToStringIfSet("intelligibility_enhancer", intelligibility_enhancer); | 225 ost << ToStringIfSet("intelligibility_enhancer", intelligibility_enhancer); |
222 ost << ToStringIfSet("level_control", level_control); | 226 ost << ToStringIfSet("level_control", level_control); |
223 ost << ToStringIfSet("tx_agc_target_dbov", tx_agc_target_dbov); | 227 ost << ToStringIfSet("tx_agc_target_dbov", tx_agc_target_dbov); |
224 ost << ToStringIfSet("tx_agc_digital_compression_gain", | 228 ost << ToStringIfSet("tx_agc_digital_compression_gain", |
225 tx_agc_digital_compression_gain); | 229 tx_agc_digital_compression_gain); |
226 ost << ToStringIfSet("tx_agc_limiter", tx_agc_limiter); | 230 ost << ToStringIfSet("tx_agc_limiter", tx_agc_limiter); |
227 ost << ToStringIfSet("recording_sample_rate", recording_sample_rate); | 231 ost << ToStringIfSet("recording_sample_rate", recording_sample_rate); |
228 ost << ToStringIfSet("playout_sample_rate", playout_sample_rate); | 232 ost << ToStringIfSet("playout_sample_rate", playout_sample_rate); |
229 ost << ToStringIfSet("combined_audio_video_bwe", combined_audio_video_bwe); | 233 ost << ToStringIfSet("combined_audio_video_bwe", combined_audio_video_bwe); |
234 ost << ToStringIfSet("audio_network_adaptor", audio_network_adaptor); | |
the sun
2016/10/25 09:25:46
audio_network_adaptor_config missing?
minyue-webrtc
2016/10/27 14:33:10
I don't know if to String will be useful for audio
the sun
2016/10/28 18:21:52
Oh? What does it look like? Is it really not possi
minyue-webrtc
2016/10/28 18:41:57
It is a proto buffer serialized string. it is a st
the sun
2016/10/28 19:04:47
Ah, in that case, just leave:
// The adaptor confi
| |
230 ost << "}"; | 235 ost << "}"; |
231 return ost.str(); | 236 return ost.str(); |
232 } | 237 } |
233 | 238 |
234 // Audio processing that attempts to filter away the output signal from | 239 // Audio processing that attempts to filter away the output signal from |
235 // later inbound pickup. | 240 // later inbound pickup. |
236 rtc::Optional<bool> echo_cancellation; | 241 rtc::Optional<bool> echo_cancellation; |
237 // Audio processing to adjust the sensitivity of the local mic dynamically. | 242 // Audio processing to adjust the sensitivity of the local mic dynamically. |
238 rtc::Optional<bool> auto_gain_control; | 243 rtc::Optional<bool> auto_gain_control; |
239 // Audio processing to filter out background noise. | 244 // Audio processing to filter out background noise. |
(...skipping 20 matching lines...) Expand all Loading... | |
260 rtc::Optional<uint16_t> tx_agc_target_dbov; | 265 rtc::Optional<uint16_t> tx_agc_target_dbov; |
261 rtc::Optional<uint16_t> tx_agc_digital_compression_gain; | 266 rtc::Optional<uint16_t> tx_agc_digital_compression_gain; |
262 rtc::Optional<bool> tx_agc_limiter; | 267 rtc::Optional<bool> tx_agc_limiter; |
263 rtc::Optional<uint32_t> recording_sample_rate; | 268 rtc::Optional<uint32_t> recording_sample_rate; |
264 rtc::Optional<uint32_t> playout_sample_rate; | 269 rtc::Optional<uint32_t> playout_sample_rate; |
265 // Enable combined audio+bandwidth BWE. | 270 // Enable combined audio+bandwidth BWE. |
266 // TODO(pthatcher): This flag is set from the | 271 // TODO(pthatcher): This flag is set from the |
267 // "googCombinedAudioVideoBwe", but not used anywhere. So delete it, | 272 // "googCombinedAudioVideoBwe", but not used anywhere. So delete it, |
268 // and check if any other AudioOptions members are unused. | 273 // and check if any other AudioOptions members are unused. |
269 rtc::Optional<bool> combined_audio_video_bwe; | 274 rtc::Optional<bool> combined_audio_video_bwe; |
275 // Enable audio network adaptor. | |
276 rtc::Optional<bool> audio_network_adaptor; | |
minyue-webrtc
2016/10/24 10:57:11
I initially wanted to let audio_network_adaptor_co
the sun
2016/10/25 09:46:32
How are you going to roll the feature out? If you'
minyue-webrtc
2016/10/27 14:33:10
The feature is configured in a way that it is up t
the sun
2016/10/28 19:04:47
Btw, what happened to your idea of only having the
minyue-webrtc
2016/10/28 20:15:03
I initially wanted to let audio_network_adaptor_co
the sun
2016/10/28 20:33:08
I probably misunderstood then - I thought you said
minyue-webrtc
2016/10/28 21:05:45
If we use only a Option<string>, when a second set
| |
277 // Config string for audio network adaptor. | |
278 rtc::Optional<std::string> audio_network_adaptor_config; | |
270 | 279 |
271 private: | 280 private: |
272 template <typename T> | 281 template <typename T> |
273 static void SetFrom(rtc::Optional<T>* s, const rtc::Optional<T>& o) { | 282 static void SetFrom(rtc::Optional<T>* s, const rtc::Optional<T>& o) { |
274 if (o) { | 283 if (o) { |
275 *s = o; | 284 *s = o; |
276 } | 285 } |
277 } | 286 } |
278 }; | 287 }; |
279 | 288 |
(...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: | 1143 // Signal when the media channel is ready to send the stream. Arguments are: |
1135 // writable(bool) | 1144 // writable(bool) |
1136 sigslot::signal1<bool> SignalReadyToSend; | 1145 sigslot::signal1<bool> SignalReadyToSend; |
1137 // Signal for notifying that the remote side has closed the DataChannel. | 1146 // Signal for notifying that the remote side has closed the DataChannel. |
1138 sigslot::signal1<uint32_t> SignalStreamClosedRemotely; | 1147 sigslot::signal1<uint32_t> SignalStreamClosedRemotely; |
1139 }; | 1148 }; |
1140 | 1149 |
1141 } // namespace cricket | 1150 } // namespace cricket |
1142 | 1151 |
1143 #endif // WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_ | 1152 #endif // WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_ |
OLD | NEW |