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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc

Issue 1373903003: Unify newapi::RtcpMode and RTCPMethod. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 2 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 rtp_sender_.MaxPayloadLength() - packet_over_head_diff; 469 rtp_sender_.MaxPayloadLength() - packet_over_head_diff;
470 return rtp_sender_.SetMaxPayloadLength(length, packet_overhead_); 470 return rtp_sender_.SetMaxPayloadLength(length, packet_overhead_);
471 } 471 }
472 472
473 int32_t ModuleRtpRtcpImpl::SetMaxTransferUnit(const uint16_t mtu) { 473 int32_t ModuleRtpRtcpImpl::SetMaxTransferUnit(const uint16_t mtu) {
474 RTC_DCHECK_LE(mtu, IP_PACKET_SIZE) << "Invalid mtu: " << mtu; 474 RTC_DCHECK_LE(mtu, IP_PACKET_SIZE) << "Invalid mtu: " << mtu;
475 return rtp_sender_.SetMaxPayloadLength(mtu - packet_overhead_, 475 return rtp_sender_.SetMaxPayloadLength(mtu - packet_overhead_,
476 packet_overhead_); 476 packet_overhead_);
477 } 477 }
478 478
479 RTCPMethod ModuleRtpRtcpImpl::RTCP() const { 479 RtcpMode ModuleRtpRtcpImpl::RTCP() const {
480 if (rtcp_sender_.Status() != kRtcpOff) { 480 if (rtcp_sender_.Status() != kRtcpOff) {
481 return rtcp_receiver_.Status(); 481 return rtcp_receiver_.Status();
482 } 482 }
483 return kRtcpOff; 483 return kRtcpOff;
484 } 484 }
485 485
486 // Configure RTCP status i.e on/off. 486 // Configure RTCP status i.e on/off.
487 void ModuleRtpRtcpImpl::SetRTCPStatus(const RTCPMethod method) { 487 void ModuleRtpRtcpImpl::SetRTCPStatus(const RtcpMode method) {
488 rtcp_sender_.SetRTCPStatus(method); 488 rtcp_sender_.SetRTCPStatus(method);
489 rtcp_receiver_.SetRTCPStatus(method); 489 rtcp_receiver_.SetRTCPStatus(method);
490 } 490 }
491 491
492 int32_t ModuleRtpRtcpImpl::SetCNAME(const char* c_name) { 492 int32_t ModuleRtpRtcpImpl::SetCNAME(const char* c_name) {
493 return rtcp_sender_.SetCNAME(c_name); 493 return rtcp_sender_.SetCNAME(c_name);
494 } 494 }
495 495
496 int32_t ModuleRtpRtcpImpl::AddMixedCNAME(uint32_t ssrc, const char* c_name) { 496 int32_t ModuleRtpRtcpImpl::AddMixedCNAME(uint32_t ssrc, const char* c_name) {
497 return rtcp_sender_.AddMixedCNAME(ssrc, c_name); 497 return rtcp_sender_.AddMixedCNAME(ssrc, c_name);
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 void ModuleRtpRtcpImpl::RegisterSendChannelRtpStatisticsCallback( 989 void ModuleRtpRtcpImpl::RegisterSendChannelRtpStatisticsCallback(
990 StreamDataCountersCallback* callback) { 990 StreamDataCountersCallback* callback) {
991 rtp_sender_.RegisterRtpStatisticsCallback(callback); 991 rtp_sender_.RegisterRtpStatisticsCallback(callback);
992 } 992 }
993 993
994 StreamDataCountersCallback* 994 StreamDataCountersCallback*
995 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const { 995 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const {
996 return rtp_sender_.GetRtpStatisticsCallback(); 996 return rtp_sender_.GetRtpStatisticsCallback();
997 } 997 }
998 } // namespace webrtc 998 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698