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

Unified Diff: webrtc/pc/rtptransport.cc

Issue 2805783002: Make RtpTransport actually implement RtpTransportInterface (Closed)
Patch Set: Use INVALID_STATE instead of INVALID_PARAMETER. Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/pc/rtptransport.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/pc/rtptransport.cc
diff --git a/webrtc/pc/rtptransport.cc b/webrtc/pc/rtptransport.cc
index eb463db0bfb53afd7a045ca38613aac7479b10ae..76bc639cbcfb3685e40ef46bb605d1198225f4d3 100644
--- a/webrtc/pc/rtptransport.cc
+++ b/webrtc/pc/rtptransport.cc
@@ -11,13 +11,50 @@
#include "webrtc/pc/rtptransport.h"
#include "webrtc/base/checks.h"
+#include "webrtc/p2p/base/packettransportinterface.h"
namespace webrtc {
+void RtpTransport::set_rtp_packet_transport(rtc::PacketTransportInternal* rtp) {
+ rtp_packet_transport_ = rtp;
+}
+
void RtpTransport::set_rtcp_packet_transport(
rtc::PacketTransportInternal* rtcp) {
RTC_DCHECK(!rtcp_mux_required_);
rtcp_packet_transport_ = rtcp;
}
+PacketTransportInterface* RtpTransport::GetRtpPacketTransport() const {
+ return rtp_packet_transport_;
+}
+
+PacketTransportInterface* RtpTransport::GetRtcpPacketTransport() const {
+ return rtcp_packet_transport_;
+}
+
+RTCError RtpTransport::SetRtcpParameters(const RtcpParameters& parameters) {
+ if (rtcp_parameters_.mux && !parameters.mux) {
+ LOG_AND_RETURN_ERROR(RTCErrorType::INVALID_STATE,
+ "Disabling RTCP muxing is not allowed.");
+ }
+
+ RtcpParameters new_parameters = parameters;
+
+ if (new_parameters.cname.empty()) {
+ new_parameters.cname = rtcp_parameters_.cname;
+ }
+
+ rtcp_parameters_ = new_parameters;
+ return RTCError::OK();
+}
+
+RtcpParameters RtpTransport::GetRtcpParameters() const {
+ return rtcp_parameters_;
+}
+
+RtpTransportAdapter* RtpTransport::GetInternal() {
+ return nullptr;
+}
+
} // namespace webrtc
« no previous file with comments | « webrtc/pc/rtptransport.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698