Index: webrtc/pc/rtptransport.cc |
diff --git a/webrtc/pc/rtptransport.cc b/webrtc/pc/rtptransport.cc |
index 8a524dd07a3ab177ca95fb547c9e80adb7727ac7..ac57eb887bc690c3fadd8bd793c24ba3629245f8 100644 |
--- a/webrtc/pc/rtptransport.cc |
+++ b/webrtc/pc/rtptransport.cc |
@@ -115,24 +115,30 @@ PacketTransportInterface* RtpTransport::GetRtcpPacketTransport() const { |
return rtcp_packet_transport_; |
} |
-RTCError RtpTransport::SetRtcpParameters(const RtcpParameters& parameters) { |
- if (rtcp_parameters_.mux && !parameters.mux) { |
+RTCError RtpTransport::SetParameters(const RtpTransportParameters& parameters) { |
+ if (parameters_.rtcp.mux && !parameters.rtcp.mux) { |
LOG_AND_RETURN_ERROR(RTCErrorType::INVALID_STATE, |
"Disabling RTCP muxing is not allowed."); |
} |
+ if (parameters.keepalive != parameters_.keepalive) { |
+ // TODO(sprang): Wire up support for keep-alive (only ORTC support for now). |
+ LOG_AND_RETURN_ERROR( |
+ RTCErrorType::INVALID_MODIFICATION, |
+ "RTP keep-alive parameters not supported by this channel."); |
+ } |
- RtcpParameters new_parameters = parameters; |
+ RtpTransportParameters new_parameters = parameters; |
- if (new_parameters.cname.empty()) { |
- new_parameters.cname = rtcp_parameters_.cname; |
+ if (new_parameters.rtcp.cname.empty()) { |
+ new_parameters.rtcp.cname = parameters_.rtcp.cname; |
} |
- rtcp_parameters_ = new_parameters; |
+ parameters_ = new_parameters; |
return RTCError::OK(); |
} |
-RtcpParameters RtpTransport::GetRtcpParameters() const { |
- return rtcp_parameters_; |
+RtpTransportParameters RtpTransport::GetParameters() const { |
+ return parameters_; |
} |
RtpTransportAdapter* RtpTransport::GetInternal() { |