OLD | NEW |
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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 rtp_sender_.MaxPayloadLength() - packet_over_head_diff; | 467 rtp_sender_.MaxPayloadLength() - packet_over_head_diff; |
468 return rtp_sender_.SetMaxPayloadLength(length, packet_overhead_); | 468 return rtp_sender_.SetMaxPayloadLength(length, packet_overhead_); |
469 } | 469 } |
470 | 470 |
471 int32_t ModuleRtpRtcpImpl::SetMaxTransferUnit(const uint16_t mtu) { | 471 int32_t ModuleRtpRtcpImpl::SetMaxTransferUnit(const uint16_t mtu) { |
472 RTC_DCHECK_LE(mtu, IP_PACKET_SIZE) << "Invalid mtu: " << mtu; | 472 RTC_DCHECK_LE(mtu, IP_PACKET_SIZE) << "Invalid mtu: " << mtu; |
473 return rtp_sender_.SetMaxPayloadLength(mtu - packet_overhead_, | 473 return rtp_sender_.SetMaxPayloadLength(mtu - packet_overhead_, |
474 packet_overhead_); | 474 packet_overhead_); |
475 } | 475 } |
476 | 476 |
477 RTCPMethod ModuleRtpRtcpImpl::RTCP() const { | 477 RtcpMode ModuleRtpRtcpImpl::RTCP() const { |
478 if (rtcp_sender_.Status() != kRtcpOff) { | 478 if (rtcp_sender_.Status() != RtcpMode::kOff) { |
479 return rtcp_receiver_.Status(); | 479 return rtcp_receiver_.Status(); |
480 } | 480 } |
481 return kRtcpOff; | 481 return RtcpMode::kOff; |
482 } | 482 } |
483 | 483 |
484 // Configure RTCP status i.e on/off. | 484 // Configure RTCP status i.e on/off. |
485 void ModuleRtpRtcpImpl::SetRTCPStatus(const RTCPMethod method) { | 485 void ModuleRtpRtcpImpl::SetRTCPStatus(const RtcpMode method) { |
486 rtcp_sender_.SetRTCPStatus(method); | 486 rtcp_sender_.SetRTCPStatus(method); |
487 rtcp_receiver_.SetRTCPStatus(method); | 487 rtcp_receiver_.SetRTCPStatus(method); |
488 } | 488 } |
489 | 489 |
490 int32_t ModuleRtpRtcpImpl::SetCNAME(const char* c_name) { | 490 int32_t ModuleRtpRtcpImpl::SetCNAME(const char* c_name) { |
491 return rtcp_sender_.SetCNAME(c_name); | 491 return rtcp_sender_.SetCNAME(c_name); |
492 } | 492 } |
493 | 493 |
494 int32_t ModuleRtpRtcpImpl::AddMixedCNAME(uint32_t ssrc, const char* c_name) { | 494 int32_t ModuleRtpRtcpImpl::AddMixedCNAME(uint32_t ssrc, const char* c_name) { |
495 return rtcp_sender_.AddMixedCNAME(ssrc, c_name); | 495 return rtcp_sender_.AddMixedCNAME(ssrc, c_name); |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
854 | 854 |
855 // Check for a SSRC collision. | 855 // Check for a SSRC collision. |
856 if (rtp_sender_.SSRC() == ssrc && !collision_detected_) { | 856 if (rtp_sender_.SSRC() == ssrc && !collision_detected_) { |
857 // If we detect a collision change the SSRC but only once. | 857 // If we detect a collision change the SSRC but only once. |
858 collision_detected_ = true; | 858 collision_detected_ = true; |
859 uint32_t new_ssrc = rtp_sender_.GenerateNewSSRC(); | 859 uint32_t new_ssrc = rtp_sender_.GenerateNewSSRC(); |
860 if (new_ssrc == 0) { | 860 if (new_ssrc == 0) { |
861 // Configured via API ignore. | 861 // Configured via API ignore. |
862 return; | 862 return; |
863 } | 863 } |
864 if (kRtcpOff != rtcp_sender_.Status()) { | 864 if (RtcpMode::kOff != rtcp_sender_.Status()) { |
865 // Send RTCP bye on the current SSRC. | 865 // Send RTCP bye on the current SSRC. |
866 SendRTCP(kRtcpBye); | 866 SendRTCP(kRtcpBye); |
867 } | 867 } |
868 // Change local SSRC and inform all objects about the new SSRC. | 868 // Change local SSRC and inform all objects about the new SSRC. |
869 rtcp_sender_.SetSSRC(new_ssrc); | 869 rtcp_sender_.SetSSRC(new_ssrc); |
870 SetRtcpReceiverSsrcs(new_ssrc); | 870 SetRtcpReceiverSsrcs(new_ssrc); |
871 } | 871 } |
872 } | 872 } |
873 | 873 |
874 void ModuleRtpRtcpImpl::BitrateSent(uint32_t* total_rate, | 874 void ModuleRtpRtcpImpl::BitrateSent(uint32_t* total_rate, |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
987 void ModuleRtpRtcpImpl::RegisterSendChannelRtpStatisticsCallback( | 987 void ModuleRtpRtcpImpl::RegisterSendChannelRtpStatisticsCallback( |
988 StreamDataCountersCallback* callback) { | 988 StreamDataCountersCallback* callback) { |
989 rtp_sender_.RegisterRtpStatisticsCallback(callback); | 989 rtp_sender_.RegisterRtpStatisticsCallback(callback); |
990 } | 990 } |
991 | 991 |
992 StreamDataCountersCallback* | 992 StreamDataCountersCallback* |
993 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const { | 993 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const { |
994 return rtp_sender_.GetRtpStatisticsCallback(); | 994 return rtp_sender_.GetRtpStatisticsCallback(); |
995 } | 995 } |
996 } // namespace webrtc | 996 } // namespace webrtc |
OLD | NEW |