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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
108 } | 108 } |
109 | 109 |
110 PacketTransportInterface* RtpTransport::GetRtpPacketTransport() const { | 110 PacketTransportInterface* RtpTransport::GetRtpPacketTransport() const { |
111 return rtp_packet_transport_; | 111 return rtp_packet_transport_; |
112 } | 112 } |
113 | 113 |
114 PacketTransportInterface* RtpTransport::GetRtcpPacketTransport() const { | 114 PacketTransportInterface* RtpTransport::GetRtcpPacketTransport() const { |
115 return rtcp_packet_transport_; | 115 return rtcp_packet_transport_; |
116 } | 116 } |
117 | 117 |
118 RTCError RtpTransport::SetRtcpParameters(const RtcpParameters& parameters) { | 118 RTCError RtpTransport::SetParameters(const RtpTransportParameters& parameters) { |
119 if (rtcp_parameters_.mux && !parameters.mux) { | 119 if (parameters_.rtcp.mux && !parameters.rtcp.mux) { |
120 LOG_AND_RETURN_ERROR(RTCErrorType::INVALID_STATE, | 120 LOG_AND_RETURN_ERROR(RTCErrorType::INVALID_STATE, |
121 "Disabling RTCP muxing is not allowed."); | 121 "Disabling RTCP muxing is not allowed."); |
122 } | 122 } |
123 | 123 if (parameters.keepalive != parameters_.keepalive) { |
124 RtcpParameters new_parameters = parameters; | 124 LOG_AND_RETURN_ERROR( |
125 | 125 RTCErrorType::INVALID_MODIFICATION, |
126 if (new_parameters.cname.empty()) { | 126 "RTP keep-alive parameters not supported by this channel."); |
Taylor Brandstetter
2017/08/03 01:18:04
Why is this message changing?
sprang_webrtc
2017/08/03 13:08:14
This is a new message. I just verify that you don'
Taylor Brandstetter
2017/08/03 16:50:36
Sorry, I thought this was RtpTransportAdapter when
| |
127 new_parameters.cname = rtcp_parameters_.cname; | |
128 } | 127 } |
129 | 128 |
130 rtcp_parameters_ = new_parameters; | 129 RtpTransportParameters new_parameters = parameters; |
130 | |
131 if (new_parameters.rtcp.cname.empty()) { | |
132 new_parameters.rtcp.cname = parameters_.rtcp.cname; | |
133 } | |
134 | |
135 parameters_ = new_parameters; | |
131 return RTCError::OK(); | 136 return RTCError::OK(); |
132 } | 137 } |
133 | 138 |
134 RtcpParameters RtpTransport::GetRtcpParameters() const { | 139 RtpTransportParameters RtpTransport::GetParameters() const { |
135 return rtcp_parameters_; | 140 return parameters_; |
136 } | 141 } |
137 | 142 |
138 RtpTransportAdapter* RtpTransport::GetInternal() { | 143 RtpTransportAdapter* RtpTransport::GetInternal() { |
139 return nullptr; | 144 return nullptr; |
140 } | 145 } |
141 | 146 |
142 void RtpTransport::OnReadyToSend(rtc::PacketTransportInternal* transport) { | 147 void RtpTransport::OnReadyToSend(rtc::PacketTransportInternal* transport) { |
143 SetReadyToSend(transport == rtcp_packet_transport_, true); | 148 SetReadyToSend(transport == rtcp_packet_transport_, true); |
144 } | 149 } |
145 | 150 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
203 } | 208 } |
204 if (rtcp) { | 209 if (rtcp) { |
205 // Permit all (seemingly valid) RTCP packets. | 210 // Permit all (seemingly valid) RTCP packets. |
206 return true; | 211 return true; |
207 } | 212 } |
208 // Check whether we handle this payload. | 213 // Check whether we handle this payload. |
209 return HandlesPacket(packet->data(), packet->size()); | 214 return HandlesPacket(packet->data(), packet->size()); |
210 } | 215 } |
211 | 216 |
212 } // namespace webrtc | 217 } // namespace webrtc |
OLD | NEW |