blob: 07f4c515235202483d3ba54dbccf41d58534fc7d [file] [log] [blame]
Danil Chapovalov398a7c62017-10-24 17:07:05 +02001/*
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 Chapovalova7e418c2017-11-21 11:08:53 +010016#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
Danil Chapovalov8c8d49e2017-10-30 15:21:41 +010017#include "rtc_base/task_queue.h"
18
Danil Chapovalov398a7c62017-10-24 17:07:05 +020019namespace webrtc {
20class ReceiveStatisticsProvider;
21class Transport;
22
23struct RtcpTransceiverConfig {
24 RtcpTransceiverConfig();
25 RtcpTransceiverConfig(const RtcpTransceiverConfig&);
26 RtcpTransceiverConfig& operator=(const RtcpTransceiverConfig&);
27 ~RtcpTransceiverConfig();
28
29 // Logs the error and returns false if configuration miss key objects or
30 // is inconsistant. May log warnings.
31 bool Validate() const;
32
33 // Used to prepend all log messages. Can be empty.
34 std::string debug_id;
35
36 // Ssrc to use as default sender ssrc, e.g. for transport-wide feedbacks.
37 uint32_t feedback_ssrc = 1;
38
Danil Chapovalov78161ca2017-10-26 12:09:41 +020039 // Canonical End-Point Identifier of the local particiapnt.
40 // Defined in rfc3550 section 6 note 2 and section 6.5.1.
Danil Chapovalov398a7c62017-10-24 17:07:05 +020041 std::string cname;
42
43 // Maximum packet size outgoing transport accepts.
44 size_t max_packet_size = 1200;
45
46 // Transport to send rtcp packets to. Should be set.
47 Transport* outgoing_transport = nullptr;
48
Danil Chapovalov8c8d49e2017-10-30 15:21:41 +010049 // Queue for scheduling delayed tasks, e.g. sending periodic compound packets.
50 rtc::TaskQueue* task_queue = nullptr;
Danil Chapovalov398a7c62017-10-24 17:07:05 +020051
52 // Rtcp report block generator for outgoing receiver reports.
53 ReceiveStatisticsProvider* receive_statistics = nullptr;
Danil Chapovalov8c8d49e2017-10-30 15:21:41 +010054
Danil Chapovalova7e418c2017-11-21 11:08:53 +010055 // Configures if sending should
56 // enforce compound packets: https://tools.ietf.org/html/rfc4585#section-3.1
57 // or allow reduced size packets: https://tools.ietf.org/html/rfc5506
58 // Receiving accepts both compound and reduced-size packets.
59 RtcpMode rtcp_mode = RtcpMode::kCompound;
Danil Chapovalov8c8d49e2017-10-30 15:21:41 +010060 //
61 // Tuning parameters.
62 //
63 // Delay before 1st periodic compound packet.
64 int initial_report_delay_ms = 500;
65
66 // Period between periodic compound packets.
67 int report_period_ms = 1000;
68
69 //
70 // Flags for features and experiments.
71 //
72 bool schedule_periodic_compound_packets = true;
Danil Chapovalov398a7c62017-10-24 17:07:05 +020073};
74
75} // namespace webrtc
76
77#endif // MODULES_RTP_RTCP_SOURCE_RTCP_TRANSCEIVER_CONFIG_H_