Danil Chapovalov | 398a7c6 | 2017-10-24 17:07:05 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2017 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 | |
| 11 | #ifndef MODULES_RTP_RTCP_SOURCE_RTCP_TRANSCEIVER_CONFIG_H_ |
| 12 | #define MODULES_RTP_RTCP_SOURCE_RTCP_TRANSCEIVER_CONFIG_H_ |
| 13 | |
| 14 | #include <string> |
| 15 | |
Danil Chapovalov | 8c8d49e | 2017-10-30 15:21:41 +0100 | [diff] [blame] | 16 | #include "rtc_base/task_queue.h" |
| 17 | |
Danil Chapovalov | 398a7c6 | 2017-10-24 17:07:05 +0200 | [diff] [blame] | 18 | namespace webrtc { |
| 19 | class ReceiveStatisticsProvider; |
| 20 | class Transport; |
| 21 | |
| 22 | struct RtcpTransceiverConfig { |
| 23 | RtcpTransceiverConfig(); |
| 24 | RtcpTransceiverConfig(const RtcpTransceiverConfig&); |
| 25 | RtcpTransceiverConfig& operator=(const RtcpTransceiverConfig&); |
| 26 | ~RtcpTransceiverConfig(); |
| 27 | |
| 28 | // Logs the error and returns false if configuration miss key objects or |
| 29 | // is inconsistant. May log warnings. |
| 30 | bool Validate() const; |
| 31 | |
| 32 | // Used to prepend all log messages. Can be empty. |
| 33 | std::string debug_id; |
| 34 | |
| 35 | // Ssrc to use as default sender ssrc, e.g. for transport-wide feedbacks. |
| 36 | uint32_t feedback_ssrc = 1; |
| 37 | |
Danil Chapovalov | 78161ca | 2017-10-26 12:09:41 +0200 | [diff] [blame] | 38 | // Canonical End-Point Identifier of the local particiapnt. |
| 39 | // Defined in rfc3550 section 6 note 2 and section 6.5.1. |
Danil Chapovalov | 398a7c6 | 2017-10-24 17:07:05 +0200 | [diff] [blame] | 40 | std::string cname; |
| 41 | |
| 42 | // Maximum packet size outgoing transport accepts. |
| 43 | size_t max_packet_size = 1200; |
| 44 | |
| 45 | // Transport to send rtcp packets to. Should be set. |
| 46 | Transport* outgoing_transport = nullptr; |
| 47 | |
Danil Chapovalov | 8c8d49e | 2017-10-30 15:21:41 +0100 | [diff] [blame] | 48 | // Queue for scheduling delayed tasks, e.g. sending periodic compound packets. |
| 49 | rtc::TaskQueue* task_queue = nullptr; |
Danil Chapovalov | 398a7c6 | 2017-10-24 17:07:05 +0200 | [diff] [blame] | 50 | |
| 51 | // Rtcp report block generator for outgoing receiver reports. |
| 52 | ReceiveStatisticsProvider* receive_statistics = nullptr; |
Danil Chapovalov | 8c8d49e | 2017-10-30 15:21:41 +0100 | [diff] [blame] | 53 | |
| 54 | // |
| 55 | // Tuning parameters. |
| 56 | // |
| 57 | // Delay before 1st periodic compound packet. |
| 58 | int initial_report_delay_ms = 500; |
| 59 | |
| 60 | // Period between periodic compound packets. |
| 61 | int report_period_ms = 1000; |
| 62 | |
| 63 | // |
| 64 | // Flags for features and experiments. |
| 65 | // |
| 66 | bool schedule_periodic_compound_packets = true; |
Danil Chapovalov | 398a7c6 | 2017-10-24 17:07:05 +0200 | [diff] [blame] | 67 | }; |
| 68 | |
| 69 | } // namespace webrtc |
| 70 | |
| 71 | #endif // MODULES_RTP_RTCP_SOURCE_RTCP_TRANSCEIVER_CONFIG_H_ |