OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2004 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
100 | 100 |
101 // This function returns true if we are using SRTP. | 101 // This function returns true if we are using SRTP. |
102 bool secure() const { return srtp_filter_.IsActive(); } | 102 bool secure() const { return srtp_filter_.IsActive(); } |
103 // The following function returns true if we are using | 103 // The following function returns true if we are using |
104 // DTLS-based keying. If you turned off SRTP later, however | 104 // DTLS-based keying. If you turned off SRTP later, however |
105 // you could have secure() == false and dtls_secure() == true. | 105 // you could have secure() == false and dtls_secure() == true. |
106 bool secure_dtls() const { return dtls_keyed_; } | 106 bool secure_dtls() const { return dtls_keyed_; } |
107 | 107 |
108 bool writable() const { return writable_; } | 108 bool writable() const { return writable_; } |
109 | 109 |
110 bool SetTransport(TransportChannel* rtp_transport, | 110 // Set the transport(s), and update writability and "ready-to-send" state. |
111 // |rtp_transport| must be non-null. | |
112 // |rtcp_transport| must be supplied if NeedsRtcpTransport() is true (meaning | |
113 // RTCP muxing is not fully active yet). | |
114 // |rtp_transport| and |rtcp_transport| must share the same transport name as | |
115 // well. | |
116 void SetTransports(TransportChannel* rtp_transport, | |
111 TransportChannel* rtcp_transport); | 117 TransportChannel* rtcp_transport); |
112 bool PushdownLocalDescription(const SessionDescription* local_desc, | 118 bool PushdownLocalDescription(const SessionDescription* local_desc, |
113 ContentAction action, | 119 ContentAction action, |
114 std::string* error_desc); | 120 std::string* error_desc); |
115 bool PushdownRemoteDescription(const SessionDescription* remote_desc, | 121 bool PushdownRemoteDescription(const SessionDescription* remote_desc, |
116 ContentAction action, | 122 ContentAction action, |
117 std::string* error_desc); | 123 std::string* error_desc); |
118 // Channel control | 124 // Channel control |
119 bool SetLocalContent(const MediaContentDescription* content, | 125 bool SetLocalContent(const MediaContentDescription* content, |
120 ContentAction action, | 126 ContentAction action, |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
187 virtual cricket::MediaType media_type() = 0; | 193 virtual cricket::MediaType media_type() = 0; |
188 | 194 |
189 bool SetCryptoOptions(const rtc::CryptoOptions& crypto_options); | 195 bool SetCryptoOptions(const rtc::CryptoOptions& crypto_options); |
190 | 196 |
191 // This function returns true if we require SRTP for call setup. | 197 // This function returns true if we require SRTP for call setup. |
192 bool srtp_required_for_testing() const { return srtp_required_; } | 198 bool srtp_required_for_testing() const { return srtp_required_; } |
193 | 199 |
194 protected: | 200 protected: |
195 virtual MediaChannel* media_channel() const { return media_channel_; } | 201 virtual MediaChannel* media_channel() const { return media_channel_; } |
196 | 202 |
197 // Sets the |rtp_transport_| (and |rtcp_transport_|, if | 203 void SetTransport_n(TransportChannel* rtp_transport, |
Zhi Huang
2017/01/16 01:51:50
"SetTransports_n" as well?
Taylor Brandstetter
2017/01/16 11:44:08
Done.
| |
198 // |rtcp_enabled_| is true). | |
199 // This method also updates writability and "ready-to-send" state. | |
200 bool SetTransport_n(TransportChannel* rtp_transport, | |
201 TransportChannel* rtcp_transport); | 204 TransportChannel* rtcp_transport); |
202 | 205 |
203 // This does not update writability or "ready-to-send" state; it just | 206 // This does not update writability or "ready-to-send" state; it just |
204 // disconnects from the old channel and connects to the new one. | 207 // disconnects from the old channel and connects to the new one. |
205 void SetTransportChannel_n(bool rtcp, TransportChannel* new_transport); | 208 void SetTransportChannel_n(bool rtcp, TransportChannel* new_transport); |
206 | 209 |
207 bool was_ever_writable() const { return was_ever_writable_; } | 210 bool was_ever_writable() const { return was_ever_writable_; } |
208 void set_local_content_direction(MediaContentDirection direction) { | 211 void set_local_content_direction(MediaContentDirection direction) { |
209 local_content_direction_ = direction; | 212 local_content_direction_ = direction; |
210 } | 213 } |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
721 // SetSendParameters. | 724 // SetSendParameters. |
722 DataSendParameters last_send_params_; | 725 DataSendParameters last_send_params_; |
723 // Last DataRecvParameters sent down to the media_channel() via | 726 // Last DataRecvParameters sent down to the media_channel() via |
724 // SetRecvParameters. | 727 // SetRecvParameters. |
725 DataRecvParameters last_recv_params_; | 728 DataRecvParameters last_recv_params_; |
726 }; | 729 }; |
727 | 730 |
728 } // namespace cricket | 731 } // namespace cricket |
729 | 732 |
730 #endif // WEBRTC_PC_CHANNEL_H_ | 733 #endif // WEBRTC_PC_CHANNEL_H_ |
OLD | NEW |