Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: webrtc/pc/channel.h

Issue 2637503003: More minor improvements to BaseChannel/transport code. (Closed)
Patch Set: Merge with master Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/p2p/base/transportcontroller.cc ('k') | webrtc/pc/channel.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 TransportChannel* rtcp_transport); 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,
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,
121 std::string* error_desc); 127 std::string* error_desc);
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 SetTransports_n(TransportChannel* rtp_transport,
198 // |rtcp_enabled_| is true). 204 TransportChannel* rtcp_transport);
199 // This method also updates writability and "ready-to-send" state.
200 bool SetTransport_n(TransportChannel* rtp_transport,
201 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 }
211 void set_remote_content_direction(MediaContentDirection direction) { 214 void set_remote_content_direction(MediaContentDirection direction) {
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_
OLDNEW
« no previous file with comments | « webrtc/p2p/base/transportcontroller.cc ('k') | webrtc/pc/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698