| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2017 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #ifndef WEBRTC_PC_RTPTRANSPORT_H_ | 11 #ifndef WEBRTC_PC_RTPTRANSPORT_H_ |
| 12 #define WEBRTC_PC_RTPTRANSPORT_H_ | 12 #define WEBRTC_PC_RTPTRANSPORT_H_ |
| 13 | 13 |
| 14 #include "webrtc/api/ortc/rtptransportinterface.h" |
| 15 |
| 14 namespace rtc { | 16 namespace rtc { |
| 15 | 17 |
| 16 class PacketTransportInternal; | 18 class PacketTransportInternal; |
| 17 | 19 |
| 18 } // namespace rtc | 20 } // namespace rtc |
| 19 | 21 |
| 20 namespace webrtc { | 22 namespace webrtc { |
| 21 | 23 |
| 22 class RtpTransport { | 24 class RtpTransport : public RtpTransportInterface { |
| 23 public: | 25 public: |
| 24 RtpTransport(const RtpTransport&) = delete; | 26 RtpTransport(const RtpTransport&) = delete; |
| 25 RtpTransport& operator=(const RtpTransport&) = delete; | 27 RtpTransport& operator=(const RtpTransport&) = delete; |
| 26 | 28 |
| 27 explicit RtpTransport(bool rtcp_mux_required) | 29 explicit RtpTransport(bool rtcp_mux_required) |
| 28 : rtcp_mux_required_(rtcp_mux_required) {} | 30 : rtcp_mux_required_(rtcp_mux_required) {} |
| 29 | 31 |
| 30 bool rtcp_mux_required() const { return rtcp_mux_required_; } | 32 bool rtcp_mux_required() const { return rtcp_mux_required_; } |
| 31 | 33 |
| 32 rtc::PacketTransportInternal* rtp_packet_transport() const { | 34 rtc::PacketTransportInternal* rtp_packet_transport() const { |
| 33 return rtp_packet_transport_; | 35 return rtp_packet_transport_; |
| 34 } | 36 } |
| 35 void set_rtp_packet_transport(rtc::PacketTransportInternal* rtp) { | 37 void set_rtp_packet_transport(rtc::PacketTransportInternal* rtp); |
| 36 rtp_packet_transport_ = rtp; | |
| 37 } | |
| 38 | 38 |
| 39 rtc::PacketTransportInternal* rtcp_packet_transport() const { | 39 rtc::PacketTransportInternal* rtcp_packet_transport() const { |
| 40 return rtcp_packet_transport_; | 40 return rtcp_packet_transport_; |
| 41 } | 41 } |
| 42 void set_rtcp_packet_transport(rtc::PacketTransportInternal* rtcp); | 42 void set_rtcp_packet_transport(rtc::PacketTransportInternal* rtcp); |
| 43 | 43 |
| 44 PacketTransportInterface* GetRtpPacketTransport() const override; |
| 45 PacketTransportInterface* GetRtcpPacketTransport() const override; |
| 46 |
| 47 // TODO(zstein): Use these RtcpParameters for configuration elsewhere. |
| 48 RTCError SetRtcpParameters(const RtcpParameters& parameters) override; |
| 49 RtcpParameters GetRtcpParameters() const override; |
| 50 |
| 51 protected: |
| 52 // TODO(zstein): Remove this when we remove RtpTransportAdapter. |
| 53 RtpTransportAdapter* GetInternal() override; |
| 54 |
| 44 private: | 55 private: |
| 45 // True if RTCP-multiplexing is required. rtcp_packet_transport_ should | 56 // True if RTCP-multiplexing is required. rtcp_packet_transport_ should |
| 46 // always be null in this case. | 57 // always be null in this case. |
| 47 const bool rtcp_mux_required_; | 58 const bool rtcp_mux_required_; |
| 48 | 59 |
| 49 // TODO(zstein): Revisit ownership here - transports are currently owned by | |
| 50 // TransportController | |
| 51 rtc::PacketTransportInternal* rtp_packet_transport_ = nullptr; | 60 rtc::PacketTransportInternal* rtp_packet_transport_ = nullptr; |
| 52 rtc::PacketTransportInternal* rtcp_packet_transport_ = nullptr; | 61 rtc::PacketTransportInternal* rtcp_packet_transport_ = nullptr; |
| 62 |
| 63 RtcpParameters rtcp_parameters_; |
| 53 }; | 64 }; |
| 54 | 65 |
| 55 } // namespace webrtc | 66 } // namespace webrtc |
| 56 | 67 |
| 57 #endif // WEBRTC_PC_RTPTRANSPORT_H_ | 68 #endif // WEBRTC_PC_RTPTRANSPORT_H_ |
| OLD | NEW |