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

Side by Side Diff: webrtc/pc/rtptransport.cc

Issue 2805783002: Make RtpTransport actually implement RtpTransportInterface (Closed)
Patch Set: removing a redundant comment 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 unified diff | Download patch
« no previous file with comments | « webrtc/pc/rtptransport.h ('k') | no next file » | 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 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
11 #include "webrtc/pc/rtptransport.h" 11 #include "webrtc/pc/rtptransport.h"
12 12
13 #include "webrtc/base/checks.h" 13 #include "webrtc/base/checks.h"
14 #include "webrtc/p2p/base/packettransportinterface.h"
14 15
15 namespace webrtc { 16 namespace webrtc {
16 17
18 void RtpTransport::set_rtp_packet_transport(rtc::PacketTransportInternal* rtp) {
19 rtp_packet_transport_ = rtp;
20 }
21
17 void RtpTransport::set_rtcp_packet_transport( 22 void RtpTransport::set_rtcp_packet_transport(
18 rtc::PacketTransportInternal* rtcp) { 23 rtc::PacketTransportInternal* rtcp) {
19 RTC_DCHECK(!rtcp_mux_required_); 24 RTC_DCHECK(!rtcp_mux_required_);
20 rtcp_packet_transport_ = rtcp; 25 rtcp_packet_transport_ = rtcp;
21 } 26 }
22 27
28 PacketTransportInterface* RtpTransport::GetRtpPacketTransport() const {
29 return rtp_packet_transport_;
30 }
31
32 PacketTransportInterface* RtpTransport::GetRtcpPacketTransport() const {
33 return rtcp_packet_transport_;
34 }
35
36 RTCError RtpTransport::SetRtcpParameters(const RtcpParameters& parameters) {
37 if (rtcp_parameters_.mux && !parameters.mux) {
38 LOG_AND_RETURN_ERROR(RTCErrorType::INVALID_PARAMETER,
Taylor Brandstetter 2017/04/10 19:19:08 I've been using "INVALID_STATE" for situations whe
Zach Stein 2017/04/10 22:37:43 Done.
39 "Disabling RTCP muxing is not allowed.");
40 }
41
42 RtcpParameters new_parameters = parameters;
43
44 if (new_parameters.cname.empty()) {
45 new_parameters.cname = rtcp_parameters_.cname;
46 }
47
48 rtcp_parameters_ = new_parameters;
49 return RTCError::OK();
50 }
51
52 RtcpParameters RtpTransport::GetRtcpParameters() const {
53 return rtcp_parameters_;
54 }
55
56 RtpTransportAdapter* RtpTransport::GetInternal() {
57 return nullptr;
58 }
59
23 } // namespace webrtc 60 } // namespace webrtc
OLDNEW
« 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