blob: 79f18c80c15bd18ed37f99d28354ca3fdf7a6b74 [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 Chapovalov8c8d49e2017-10-30 15:21:41 +010016#include "rtc_base/task_queue.h"
17
Danil Chapovalov398a7c62017-10-24 17:07:05 +020018namespace webrtc {
19class ReceiveStatisticsProvider;
20class Transport;
21
22struct 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 Chapovalov78161ca2017-10-26 12:09:41 +020038 // Canonical End-Point Identifier of the local particiapnt.
39 // Defined in rfc3550 section 6 note 2 and section 6.5.1.
Danil Chapovalov398a7c62017-10-24 17:07:05 +020040 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 Chapovalov8c8d49e2017-10-30 15:21:41 +010048 // Queue for scheduling delayed tasks, e.g. sending periodic compound packets.
49 rtc::TaskQueue* task_queue = nullptr;
Danil Chapovalov398a7c62017-10-24 17:07:05 +020050
51 // Rtcp report block generator for outgoing receiver reports.
52 ReceiveStatisticsProvider* receive_statistics = nullptr;
Danil Chapovalov8c8d49e2017-10-30 15:21:41 +010053
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 Chapovalov398a7c62017-10-24 17:07:05 +020067};
68
69} // namespace webrtc
70
71#endif // MODULES_RTP_RTCP_SOURCE_RTCP_TRANSCEIVER_CONFIG_H_