call_config.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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 CALL_CALL_CONFIG_H_
  11. #define CALL_CALL_CONFIG_H_
  12. #include "api/fec_controller.h"
  13. #include "api/neteq/neteq_factory.h"
  14. #include "api/network_state_predictor.h"
  15. #include "api/rtc_error.h"
  16. #include "api/task_queue/task_queue_factory.h"
  17. #include "api/transport/bitrate_settings.h"
  18. #include "api/transport/network_control.h"
  19. #include "api/transport/webrtc_key_value_config.h"
  20. #include "call/audio_state.h"
  21. namespace webrtc {
  22. class AudioProcessing;
  23. class RtcEventLog;
  24. struct CallConfig {
  25. explicit CallConfig(RtcEventLog* event_log);
  26. CallConfig(const CallConfig&);
  27. ~CallConfig();
  28. // Bitrate config used until valid bitrate estimates are calculated. Also
  29. // used to cap total bitrate used. This comes from the remote connection.
  30. BitrateConstraints bitrate_config;
  31. // AudioState which is possibly shared between multiple calls.
  32. rtc::scoped_refptr<AudioState> audio_state;
  33. // Audio Processing Module to be used in this call.
  34. AudioProcessing* audio_processing = nullptr;
  35. // RtcEventLog to use for this call. Required.
  36. // Use webrtc::RtcEventLog::CreateNull() for a null implementation.
  37. RtcEventLog* event_log = nullptr;
  38. // FecController to use for this call.
  39. FecControllerFactoryInterface* fec_controller_factory = nullptr;
  40. // Task Queue Factory to be used in this call. Required.
  41. TaskQueueFactory* task_queue_factory = nullptr;
  42. // NetworkStatePredictor to use for this call.
  43. NetworkStatePredictorFactoryInterface* network_state_predictor_factory =
  44. nullptr;
  45. // Network controller factory to use for this call.
  46. NetworkControllerFactoryInterface* network_controller_factory = nullptr;
  47. // NetEq factory to use for this call.
  48. NetEqFactory* neteq_factory = nullptr;
  49. // Key-value mapping of internal configurations to apply,
  50. // e.g. field trials.
  51. const WebRtcKeyValueConfig* trials = nullptr;
  52. };
  53. } // namespace webrtc
  54. #endif // CALL_CALL_CONFIG_H_