| 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 |
| 13 | #include "api/environment/environment.h" |
| 14 | #include "api/fec_controller.h" |
| 15 | #include "api/metronome/metronome.h" |
| 16 | #include "api/neteq/neteq_factory.h" |
| 17 | #include "api/network_state_predictor.h" |
| 18 | #include "api/transport/bitrate_settings.h" |
| 19 | #include "api/transport/network_control.h" |
| 20 | #include "call/audio_state.h" |
| 21 | #include "call/rtp_transport_config.h" |
| 22 | #include "call/rtp_transport_controller_send_factory_interface.h" |
| 23 |
| 24 | namespace webrtc { |
| 25 |
| 26 | class AudioProcessing; |
| 27 |
| 28 | struct CallConfig { |
| 29 | // If `network_task_queue` is set to nullptr, Call will assume that network |
| 30 | // related callbacks will be made on the same TQ as the Call instance was |
| 31 | // constructed on. |
| 32 | explicit CallConfig(const Environment& env, |
| 33 | TaskQueueBase* network_task_queue = nullptr); |
| 34 |
| 35 | CallConfig(const CallConfig&); |
| 36 |
| 37 | ~CallConfig(); |
| 38 |
| 39 | RtpTransportConfig ExtractTransportConfig() const; |
| 40 |
| 41 | Environment env; |
| 42 |
| 43 | // Bitrate config used until valid bitrate estimates are calculated. Also |
| 44 | // used to cap total bitrate used. This comes from the remote connection. |
| 45 | BitrateConstraints bitrate_config; |
| 46 |
| 47 | // AudioState which is possibly shared between multiple calls. |
| 48 | rtc::scoped_refptr<AudioState> audio_state; |
| 49 |
| 50 | // Audio Processing Module to be used in this call. |
| 51 | AudioProcessing* audio_processing = nullptr; |
| 52 |
| 53 | // FecController to use for this call. |
| 54 | FecControllerFactoryInterface* fec_controller_factory = nullptr; |
| 55 |
| 56 | // NetworkStatePredictor to use for this call. |
| 57 | NetworkStatePredictorFactoryInterface* network_state_predictor_factory = |
| 58 | nullptr; |
| 59 |
| 60 | // Network controller factory to use for this call. |
| 61 | NetworkControllerFactoryInterface* network_controller_factory = nullptr; |
| 62 |
| 63 | // NetEq factory to use for this call. |
| 64 | NetEqFactory* neteq_factory = nullptr; |
| 65 |
| 66 | TaskQueueBase* const network_task_queue_ = nullptr; |
| 67 | // RtpTransportControllerSend to use for this call. |
| 68 | RtpTransportControllerSendFactoryInterface* |
| 69 | rtp_transport_controller_send_factory = nullptr; |
| 70 |
| 71 | Metronome* decode_metronome = nullptr; |
| 72 | Metronome* encode_metronome = nullptr; |
| 73 |
| 74 | // The burst interval of the pacer, see TaskQueuePacedSender constructor. |
| 75 | absl::optional<TimeDelta> pacer_burst_interval; |
| 76 |
| 77 | // Enables send packet batching from the egress RTP sender. |
| 78 | bool enable_send_packet_batching = false; |
| 79 | }; |
| 80 |
| 81 | } // namespace webrtc |
| 82 |
| 83 | #endif // CALL_CALL_CONFIG_H_ |
| 84 |