You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
3.4 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
  3. *
  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
  6. * tree. An additional intellectual property rights grant can be found
  7. * in the file PATENTS. All contributing project authors may
  8. * be found in the AUTHORS file in the root of the source tree.
  9. */
  10. #ifndef API_AUDIO_OPTIONS_H_
  11. #define API_AUDIO_OPTIONS_H_
  12. #include <stdint.h>
  13. #include <string>
  14. #include "absl/types/optional.h"
  15. namespace cricket {
  16. // Options that can be applied to a VoiceMediaChannel or a VoiceMediaEngine.
  17. // Used to be flags, but that makes it hard to selectively apply options.
  18. // We are moving all of the setting of options to structs like this,
  19. // but some things currently still use flags.
  20. struct AudioOptions {
  21. AudioOptions();
  22. ~AudioOptions();
  23. void SetAll(const AudioOptions& change);
  24. bool operator==(const AudioOptions& o) const;
  25. bool operator!=(const AudioOptions& o) const { return !(*this == o); }
  26. std::string ToString() const;
  27. // Audio processing that attempts to filter away the output signal from
  28. // later inbound pickup.
  29. absl::optional<bool> echo_cancellation;
  30. #if defined(WEBRTC_IOS)
  31. // Forces software echo cancellation on iOS. This is a temporary workaround
  32. // (until Apple fixes the bug) for a device with non-functioning AEC. May
  33. // improve performance on that particular device, but will cause unpredictable
  34. // behavior in all other cases. See http://bugs.webrtc.org/8682.
  35. absl::optional<bool> ios_force_software_aec_HACK;
  36. #endif
  37. // Audio processing to adjust the sensitivity of the local mic dynamically.
  38. absl::optional<bool> auto_gain_control;
  39. // Audio processing to filter out background noise.
  40. absl::optional<bool> noise_suppression;
  41. // Audio processing to remove background noise of lower frequencies.
  42. absl::optional<bool> highpass_filter;
  43. // Audio processing to swap the left and right channels.
  44. absl::optional<bool> stereo_swapping;
  45. // Audio receiver jitter buffer (NetEq) max capacity in number of packets.
  46. absl::optional<int> audio_jitter_buffer_max_packets;
  47. // Audio receiver jitter buffer (NetEq) fast accelerate mode.
  48. absl::optional<bool> audio_jitter_buffer_fast_accelerate;
  49. // Audio receiver jitter buffer (NetEq) minimum target delay in milliseconds.
  50. absl::optional<int> audio_jitter_buffer_min_delay_ms;
  51. // Audio receiver jitter buffer (NetEq) should handle retransmitted packets.
  52. absl::optional<bool> audio_jitter_buffer_enable_rtx_handling;
  53. // Audio processing to detect typing.
  54. absl::optional<bool> typing_detection;
  55. absl::optional<bool> experimental_agc;
  56. absl::optional<bool> experimental_ns;
  57. // Note that tx_agc_* only applies to non-experimental AGC.
  58. absl::optional<bool> residual_echo_detector;
  59. absl::optional<uint16_t> tx_agc_target_dbov;
  60. absl::optional<uint16_t> tx_agc_digital_compression_gain;
  61. absl::optional<bool> tx_agc_limiter;
  62. // Enable combined audio+bandwidth BWE.
  63. // TODO(pthatcher): This flag is set from the
  64. // "googCombinedAudioVideoBwe", but not used anywhere. So delete it,
  65. // and check if any other AudioOptions members are unused.
  66. absl::optional<bool> combined_audio_video_bwe;
  67. // Enable audio network adaptor.
  68. absl::optional<bool> audio_network_adaptor;
  69. // Config string for audio network adaptor.
  70. absl::optional<std::string> audio_network_adaptor_config;
  71. };
  72. } // namespace cricket
  73. #endif // API_AUDIO_OPTIONS_H_