Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: webrtc/media/base/mediachannel.h

Issue 2408143003: Added a level controller initialization value to MediaConstraints. (Closed)
Patch Set: Rebase. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/api/mediaconstraintsinterface.cc ('k') | webrtc/media/engine/webrtcvoiceengine.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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(&level_control_initial_peak_level_dbfs,
172 change.level_control_initial_peak_level_dbfs);
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 level_control_initial_peak_level_dbfs ==
202 o.level_control_initial_peak_level_dbfs;
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);
209 ost << ToStringIfSet("swap", stereo_swapping); 213 ost << ToStringIfSet("swap", stereo_swapping);
210 ost << ToStringIfSet("audio_jitter_buffer_max_packets", 214 ost << ToStringIfSet("audio_jitter_buffer_max_packets",
211 audio_jitter_buffer_max_packets); 215 audio_jitter_buffer_max_packets);
212 ost << ToStringIfSet("audio_jitter_buffer_fast_accelerate", 216 ost << ToStringIfSet("audio_jitter_buffer_fast_accelerate",
213 audio_jitter_buffer_fast_accelerate); 217 audio_jitter_buffer_fast_accelerate);
214 ost << ToStringIfSet("typing", typing_detection); 218 ost << ToStringIfSet("typing", typing_detection);
215 ost << ToStringIfSet("comfort_noise", aecm_generate_comfort_noise); 219 ost << ToStringIfSet("comfort_noise", aecm_generate_comfort_noise);
216 ost << ToStringIfSet("agc_delta", adjust_agc_delta); 220 ost << ToStringIfSet("agc_delta", adjust_agc_delta);
217 ost << ToStringIfSet("experimental_agc", experimental_agc); 221 ost << ToStringIfSet("experimental_agc", experimental_agc);
218 ost << ToStringIfSet("extended_filter_aec", extended_filter_aec); 222 ost << ToStringIfSet("extended_filter_aec", extended_filter_aec);
219 ost << ToStringIfSet("delay_agnostic_aec", delay_agnostic_aec); 223 ost << ToStringIfSet("delay_agnostic_aec", delay_agnostic_aec);
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);
227 ost << ToStringIfSet("level_control_initial_peak_level_dbfs",
228 level_control_initial_peak_level_dbfs);
223 ost << ToStringIfSet("tx_agc_target_dbov", tx_agc_target_dbov); 229 ost << ToStringIfSet("tx_agc_target_dbov", tx_agc_target_dbov);
224 ost << ToStringIfSet("tx_agc_digital_compression_gain", 230 ost << ToStringIfSet("tx_agc_digital_compression_gain",
225 tx_agc_digital_compression_gain); 231 tx_agc_digital_compression_gain);
226 ost << ToStringIfSet("tx_agc_limiter", tx_agc_limiter); 232 ost << ToStringIfSet("tx_agc_limiter", tx_agc_limiter);
227 ost << ToStringIfSet("recording_sample_rate", recording_sample_rate); 233 ost << ToStringIfSet("recording_sample_rate", recording_sample_rate);
228 ost << ToStringIfSet("playout_sample_rate", playout_sample_rate); 234 ost << ToStringIfSet("playout_sample_rate", playout_sample_rate);
229 ost << ToStringIfSet("combined_audio_video_bwe", combined_audio_video_bwe); 235 ost << ToStringIfSet("combined_audio_video_bwe", combined_audio_video_bwe);
230 ost << "}"; 236 ost << "}";
231 return ost.str(); 237 return ost.str();
232 } 238 }
(...skipping 16 matching lines...) Expand all
249 // Audio processing to detect typing. 255 // Audio processing to detect typing.
250 rtc::Optional<bool> typing_detection; 256 rtc::Optional<bool> typing_detection;
251 rtc::Optional<bool> aecm_generate_comfort_noise; 257 rtc::Optional<bool> aecm_generate_comfort_noise;
252 rtc::Optional<int> adjust_agc_delta; 258 rtc::Optional<int> adjust_agc_delta;
253 rtc::Optional<bool> experimental_agc; 259 rtc::Optional<bool> experimental_agc;
254 rtc::Optional<bool> extended_filter_aec; 260 rtc::Optional<bool> extended_filter_aec;
255 rtc::Optional<bool> delay_agnostic_aec; 261 rtc::Optional<bool> delay_agnostic_aec;
256 rtc::Optional<bool> experimental_ns; 262 rtc::Optional<bool> experimental_ns;
257 rtc::Optional<bool> intelligibility_enhancer; 263 rtc::Optional<bool> intelligibility_enhancer;
258 rtc::Optional<bool> level_control; 264 rtc::Optional<bool> level_control;
265 // Specifies an optional initialization value for the level controller.
266 rtc::Optional<float> level_control_initial_peak_level_dbfs;
259 // Note that tx_agc_* only applies to non-experimental AGC. 267 // Note that tx_agc_* only applies to non-experimental AGC.
260 rtc::Optional<uint16_t> tx_agc_target_dbov; 268 rtc::Optional<uint16_t> tx_agc_target_dbov;
261 rtc::Optional<uint16_t> tx_agc_digital_compression_gain; 269 rtc::Optional<uint16_t> tx_agc_digital_compression_gain;
262 rtc::Optional<bool> tx_agc_limiter; 270 rtc::Optional<bool> tx_agc_limiter;
263 rtc::Optional<uint32_t> recording_sample_rate; 271 rtc::Optional<uint32_t> recording_sample_rate;
264 rtc::Optional<uint32_t> playout_sample_rate; 272 rtc::Optional<uint32_t> playout_sample_rate;
265 // Enable combined audio+bandwidth BWE. 273 // Enable combined audio+bandwidth BWE.
266 // TODO(pthatcher): This flag is set from the 274 // TODO(pthatcher): This flag is set from the
267 // "googCombinedAudioVideoBwe", but not used anywhere. So delete it, 275 // "googCombinedAudioVideoBwe", but not used anywhere. So delete it,
268 // and check if any other AudioOptions members are unused. 276 // and check if any other AudioOptions members are unused.
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after
1134 // Signal when the media channel is ready to send the stream. Arguments are: 1142 // Signal when the media channel is ready to send the stream. Arguments are:
1135 // writable(bool) 1143 // writable(bool)
1136 sigslot::signal1<bool> SignalReadyToSend; 1144 sigslot::signal1<bool> SignalReadyToSend;
1137 // Signal for notifying that the remote side has closed the DataChannel. 1145 // Signal for notifying that the remote side has closed the DataChannel.
1138 sigslot::signal1<uint32_t> SignalStreamClosedRemotely; 1146 sigslot::signal1<uint32_t> SignalStreamClosedRemotely;
1139 }; 1147 };
1140 1148
1141 } // namespace cricket 1149 } // namespace cricket
1142 1150
1143 #endif // WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_ 1151 #endif // WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_
OLDNEW
« no previous file with comments | « webrtc/api/mediaconstraintsinterface.cc ('k') | webrtc/media/engine/webrtcvoiceengine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698