blob: 5dbebe6ed9a6fdad4674cf54af601b5ccd67a1e0 [file] [log] [blame]
zsteind48dbda2017-04-04 19:45:57 -07001/*
2 * Copyright 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 WEBRTC_PC_RTPTRANSPORT_H_
12#define WEBRTC_PC_RTPTRANSPORT_H_
13
14namespace rtc {
15
16class PacketTransportInternal;
17
18} // namespace rtc
19
20namespace webrtc {
21
22class RtpTransport {
23 public:
24 RtpTransport(const RtpTransport&) = delete;
25 RtpTransport& operator=(const RtpTransport&) = delete;
26
27 explicit RtpTransport(bool rtcp_mux_required)
28 : rtcp_mux_required_(rtcp_mux_required) {}
29
30 bool rtcp_mux_required() const { return rtcp_mux_required_; }
31
32 rtc::PacketTransportInternal* rtp_packet_transport() const {
33 return rtp_packet_transport_;
34 }
35 void set_rtp_packet_transport(rtc::PacketTransportInternal* rtp) {
36 rtp_packet_transport_ = rtp;
37 }
38
39 rtc::PacketTransportInternal* rtcp_packet_transport() const {
40 return rtcp_packet_transport_;
41 }
42 void set_rtcp_packet_transport(rtc::PacketTransportInternal* rtcp);
43
44 private:
45 // True if RTCP-multiplexing is required. rtcp_packet_transport_ should
46 // always be null in this case.
47 const bool rtcp_mux_required_;
48
49 // TODO(zstein): Revisit ownership here - transports are currently owned by
50 // TransportController
51 rtc::PacketTransportInternal* rtp_packet_transport_ = nullptr;
52 rtc::PacketTransportInternal* rtcp_packet_transport_ = nullptr;
53};
54
55} // namespace webrtc
56
57#endif // WEBRTC_PC_RTPTRANSPORT_H_