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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
128 } | 128 } |
129 | 129 |
130 rtcp_parameters_ = new_parameters; | 130 rtcp_parameters_ = new_parameters; |
131 return RTCError::OK(); | 131 return RTCError::OK(); |
132 } | 132 } |
133 | 133 |
134 RtcpParameters RtpTransport::GetRtcpParameters() const { | 134 RtcpParameters RtpTransport::GetRtcpParameters() const { |
135 return rtcp_parameters_; | 135 return rtcp_parameters_; |
136 } | 136 } |
137 | 137 |
138 RTCError RtpTransport::SetRtpTransportParameters( | |
139 const RtpTransportParameters& parameters) { | |
140 if (rtp_transport_parameters_.keepalive.timeout_interval_ms > 0 && | |
Taylor Brandstetter
2017/07/12 16:19:50
The parameters in this class don't appear to be us
ilnik
2017/07/21 12:21:19
Acknowledged.
| |
141 rtp_transport_parameters_.keepalive != parameters.keepalive) { | |
142 LOG_AND_RETURN_ERROR( | |
143 RTCErrorType::INVALID_STATE, | |
144 "Cannot change RTP keep-alive parameters once enabled."); | |
145 } | |
146 | |
147 rtp_transport_parameters_ = parameters; | |
148 return RTCError::OK(); | |
149 } | |
150 | |
151 RtpTransportParameters RtpTransport::GetRtpTransportParameters() const { | |
152 return rtp_transport_parameters_; | |
153 } | |
154 | |
138 RtpTransportAdapter* RtpTransport::GetInternal() { | 155 RtpTransportAdapter* RtpTransport::GetInternal() { |
139 return nullptr; | 156 return nullptr; |
140 } | 157 } |
141 | 158 |
142 void RtpTransport::OnReadyToSend(rtc::PacketTransportInternal* transport) { | 159 void RtpTransport::OnReadyToSend(rtc::PacketTransportInternal* transport) { |
143 SetReadyToSend(transport == rtcp_packet_transport_, true); | 160 SetReadyToSend(transport == rtcp_packet_transport_, true); |
144 } | 161 } |
145 | 162 |
146 void RtpTransport::SetReadyToSend(bool rtcp, bool ready) { | 163 void RtpTransport::SetReadyToSend(bool rtcp, bool ready) { |
147 if (rtcp) { | 164 if (rtcp) { |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
203 } | 220 } |
204 if (rtcp) { | 221 if (rtcp) { |
205 // Permit all (seemingly valid) RTCP packets. | 222 // Permit all (seemingly valid) RTCP packets. |
206 return true; | 223 return true; |
207 } | 224 } |
208 // Check whether we handle this payload. | 225 // Check whether we handle this payload. |
209 return HandlesPacket(packet->data(), packet->size()); | 226 return HandlesPacket(packet->data(), packet->size()); |
210 } | 227 } |
211 | 228 |
212 } // namespace webrtc | 229 } // namespace webrtc |
OLD | NEW |