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

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

Issue 2368983002: Replace RtcpReceiveTimeInfo with rtcp::ReceiveTimeInfo (Closed)
Patch Set: Rebase Created 4 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 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 707
708 return std::unique_ptr<rtcp::RtcpPacket>(xr); 708 return std::unique_ptr<rtcp::RtcpPacket>(xr);
709 } 709 }
710 710
711 std::unique_ptr<rtcp::RtcpPacket> RTCPSender::BuildDlrr( 711 std::unique_ptr<rtcp::RtcpPacket> RTCPSender::BuildDlrr(
712 const RtcpContext& ctx) { 712 const RtcpContext& ctx) {
713 rtcp::ExtendedReports* xr = new rtcp::ExtendedReports(); 713 rtcp::ExtendedReports* xr = new rtcp::ExtendedReports();
714 xr->SetSenderSsrc(ssrc_); 714 xr->SetSenderSsrc(ssrc_);
715 715
716 rtcp::Dlrr dlrr; 716 rtcp::Dlrr dlrr;
717 const RtcpReceiveTimeInfo& info = ctx.feedback_state_.last_xr_rr; 717 RTC_DCHECK(ctx.feedback_state_.has_last_xr_rr);
718 dlrr.AddDlrrItem(info.sourceSSRC, info.lastRR, info.delaySinceLastRR); 718 dlrr.AddDlrrItem(ctx.feedback_state_.last_xr_rr);
719 719
720 xr->AddDlrr(dlrr); 720 xr->AddDlrr(dlrr);
721 721
722 return std::unique_ptr<rtcp::RtcpPacket>(xr); 722 return std::unique_ptr<rtcp::RtcpPacket>(xr);
723 } 723 }
724 724
725 // TODO(sprang): Add a unit test for this, or remove if the code isn't used. 725 // TODO(sprang): Add a unit test for this, or remove if the code isn't used.
726 std::unique_ptr<rtcp::RtcpPacket> RTCPSender::BuildVoIPMetric( 726 std::unique_ptr<rtcp::RtcpPacket> RTCPSender::BuildVoIPMetric(
727 const RtcpContext& context) { 727 const RtcpContext& context) {
728 rtcp::ExtendedReports* xr = new rtcp::ExtendedReports(); 728 rtcp::ExtendedReports* xr = new rtcp::ExtendedReports();
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 // but we can't because of an incorrect warning (C4822) in MVS 2013. 1042 // but we can't because of an incorrect warning (C4822) in MVS 2013.
1043 } sender(transport_, event_log_); 1043 } sender(transport_, event_log_);
1044 1044
1045 RTC_DCHECK_LE(max_payload_length_, static_cast<size_t>(IP_PACKET_SIZE)); 1045 RTC_DCHECK_LE(max_payload_length_, static_cast<size_t>(IP_PACKET_SIZE));
1046 uint8_t buffer[IP_PACKET_SIZE]; 1046 uint8_t buffer[IP_PACKET_SIZE];
1047 return packet.BuildExternalBuffer(buffer, max_payload_length_, &sender) && 1047 return packet.BuildExternalBuffer(buffer, max_payload_length_, &sender) &&
1048 !sender.send_failure_; 1048 !sender.send_failure_;
1049 } 1049 }
1050 1050
1051 } // namespace webrtc 1051 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_sender.h ('k') | webrtc/modules/rtp_rtcp/source/rtcp_sender_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698