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 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
47 PacketTransportInterface* rtcp, | 47 PacketTransportInterface* rtcp, |
48 RtpTransportControllerAdapter* rtp_transport_controller); | 48 RtpTransportControllerAdapter* rtp_transport_controller); |
49 | 49 |
50 ~RtpTransportAdapter() override; | 50 ~RtpTransportAdapter() override; |
51 | 51 |
52 // RtpTransportInterface implementation. | 52 // RtpTransportInterface implementation. |
53 PacketTransportInterface* GetRtpPacketTransport() const override; | 53 PacketTransportInterface* GetRtpPacketTransport() const override; |
54 PacketTransportInterface* GetRtcpPacketTransport() const override; | 54 PacketTransportInterface* GetRtcpPacketTransport() const override; |
55 RTCError SetRtcpParameters(const RtcpParameters& parameters) override; | 55 RTCError SetRtcpParameters(const RtcpParameters& parameters) override; |
56 RtcpParameters GetRtcpParameters() const override { return rtcp_parameters_; } | 56 RtcpParameters GetRtcpParameters() const override { return rtcp_parameters_; } |
57 RTCError SetRtpTransportParameters( | |
58 const RtpTransportParameters& parameters) override; | |
59 RtpTransportParameters GetRtpTransportParameters() const override; | |
57 | 60 |
58 // SRTP specific implementation. | 61 // SRTP specific implementation. |
59 RTCError SetSrtpSendKey(const cricket::CryptoParams& params) override; | 62 RTCError SetSrtpSendKey(const cricket::CryptoParams& params) override; |
60 RTCError SetSrtpReceiveKey(const cricket::CryptoParams& params) override; | 63 RTCError SetSrtpReceiveKey(const cricket::CryptoParams& params) override; |
61 | 64 |
62 // Methods used internally by OrtcFactory. | 65 // Methods used internally by OrtcFactory. |
63 RtpTransportControllerAdapter* rtp_transport_controller() { | 66 RtpTransportControllerAdapter* rtp_transport_controller() { |
64 return rtp_transport_controller_; | 67 return rtp_transport_controller_; |
65 } | 68 } |
66 void TakeOwnershipOfRtpTransportController( | 69 void TakeOwnershipOfRtpTransportController( |
67 std::unique_ptr<RtpTransportControllerInterface> controller); | 70 std::unique_ptr<RtpTransportControllerInterface> controller); |
68 | 71 |
69 // Used by RtpTransportControllerAdapter to tell when it should stop | 72 // Used by RtpTransportControllerAdapter to tell when it should stop |
70 // returning this transport from GetTransports(). | 73 // returning this transport from GetTransports(). |
71 sigslot::signal1<RtpTransportAdapter*> SignalDestroyed; | 74 sigslot::signal1<RtpTransportAdapter*> SignalDestroyed; |
72 | 75 |
73 // Used by the RtpTransportControllerAdapter to tell if an rtp sender or | 76 // Used by the RtpTransportControllerAdapter to tell if an rtp sender or |
74 // receiver can be created. | 77 // receiver can be created. |
75 bool is_srtp_transport() { return is_srtp_transport_; } | 78 bool is_srtp_transport() { return is_srtp_transport_; } |
76 // Used by the RtpTransportControllerAdapter to set keys for senders and | 79 // Used by the RtpTransportControllerAdapter to set keys for senders and |
77 // receivers. | 80 // receivers. |
78 rtc::Optional<cricket::CryptoParams> send_key() { return send_key_; } | 81 rtc::Optional<cricket::CryptoParams> send_key() { return send_key_; } |
79 rtc::Optional<cricket::CryptoParams> receive_key() { return receive_key_; } | 82 rtc::Optional<cricket::CryptoParams> receive_key() { return receive_key_; } |
80 | 83 |
81 protected: | 84 protected: |
82 RtpTransportAdapter* GetInternal() override { return this; } | 85 RtpTransportAdapter* GetInternal() override { return this; } |
83 | 86 |
84 private: | 87 private: |
85 RtpTransportAdapter(const RtcpParameters& rtcp_parameters, | 88 RtpTransportAdapter(const RtcpParameters& rtcp_parameters, |
Taylor Brandstetter
2017/07/12 16:19:50
Since the constructor (and factory methods) take R
sprang_webrtc
2017/07/16 09:34:03
Done.
| |
86 PacketTransportInterface* rtp, | 89 PacketTransportInterface* rtp, |
87 PacketTransportInterface* rtcp, | 90 PacketTransportInterface* rtcp, |
88 RtpTransportControllerAdapter* rtp_transport_controller, | 91 RtpTransportControllerAdapter* rtp_transport_controller, |
89 bool is_srtp_transport); | 92 bool is_srtp_transport); |
90 | 93 |
91 PacketTransportInterface* rtp_packet_transport_; | 94 PacketTransportInterface* rtp_packet_transport_; |
92 PacketTransportInterface* rtcp_packet_transport_; | 95 PacketTransportInterface* rtcp_packet_transport_; |
93 RtpTransportControllerAdapter* rtp_transport_controller_; | 96 RtpTransportControllerAdapter* rtp_transport_controller_; |
94 // Non-null if this class owns the transport controller. | 97 // Non-null if this class owns the transport controller. |
95 std::unique_ptr<RtpTransportControllerInterface> | 98 std::unique_ptr<RtpTransportControllerInterface> |
96 owned_rtp_transport_controller_; | 99 owned_rtp_transport_controller_; |
97 RtcpParameters rtcp_parameters_; | 100 RtcpParameters rtcp_parameters_; |
101 RtpTransportParameters rtp_transport_parameters_; | |
98 | 102 |
99 // SRTP specific members. | 103 // SRTP specific members. |
100 rtc::Optional<cricket::CryptoParams> send_key_; | 104 rtc::Optional<cricket::CryptoParams> send_key_; |
101 rtc::Optional<cricket::CryptoParams> receive_key_; | 105 rtc::Optional<cricket::CryptoParams> receive_key_; |
102 bool is_srtp_transport_; | 106 bool is_srtp_transport_; |
103 | 107 |
104 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RtpTransportAdapter); | 108 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RtpTransportAdapter); |
105 }; | 109 }; |
106 | 110 |
107 } // namespace webrtc | 111 } // namespace webrtc |
108 | 112 |
109 #endif // WEBRTC_ORTC_RTPTRANSPORTADAPTER_H_ | 113 #endif // WEBRTC_ORTC_RTPTRANSPORTADAPTER_H_ |
OLD | NEW |