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

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

Issue 1496883002: rtcp::Rrtr block moved into own file and got Parse function (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years 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/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc ('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 (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 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 if (last_xr_rr_.size() >= RTCP_NUMBER_OF_SR) 757 if (last_xr_rr_.size() >= RTCP_NUMBER_OF_SR)
758 last_xr_rr_.erase(last_xr_rr_.begin()); 758 last_xr_rr_.erase(last_xr_rr_.begin());
759 last_xr_rr_.insert(std::pair<uint32_t, int64_t>( 759 last_xr_rr_.insert(std::pair<uint32_t, int64_t>(
760 RTCPUtility::MidNtp(ctx.ntp_sec_, ctx.ntp_frac_), 760 RTCPUtility::MidNtp(ctx.ntp_sec_, ctx.ntp_frac_),
761 Clock::NtpToMs(ctx.ntp_sec_, ctx.ntp_frac_))); 761 Clock::NtpToMs(ctx.ntp_sec_, ctx.ntp_frac_)));
762 762
763 rtcp::Xr* xr = new rtcp::Xr(); 763 rtcp::Xr* xr = new rtcp::Xr();
764 xr->From(ssrc_); 764 xr->From(ssrc_);
765 765
766 rtcp::Rrtr rrtr; 766 rtcp::Rrtr rrtr;
767 rrtr.WithNtpSec(ctx.ntp_sec_); 767 rrtr.WithNtp(NtpTime(ctx.ntp_sec_, ctx.ntp_frac_));
768 rrtr.WithNtpFrac(ctx.ntp_frac_);
769 768
770 xr->WithRrtr(&rrtr); 769 xr->WithRrtr(&rrtr);
771 770
772 // TODO(sprang): Merge XR report sending to contain all of RRTR, DLRR, VOIP? 771 // TODO(sprang): Merge XR report sending to contain all of RRTR, DLRR, VOIP?
773 772
774 return rtc::scoped_ptr<rtcp::Xr>(xr); 773 return rtc::scoped_ptr<rtcp::Xr>(xr);
775 } 774 }
776 775
777 rtc::scoped_ptr<rtcp::RtcpPacket> RTCPSender::BuildDlrr( 776 rtc::scoped_ptr<rtcp::RtcpPacket> RTCPSender::BuildDlrr(
778 const RtcpContext& ctx) { 777 const RtcpContext& ctx) {
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
1096 Transport* const transport_; 1095 Transport* const transport_;
1097 bool send_failure_; 1096 bool send_failure_;
1098 } sender(transport_); 1097 } sender(transport_);
1099 1098
1100 uint8_t buffer[IP_PACKET_SIZE]; 1099 uint8_t buffer[IP_PACKET_SIZE];
1101 return packet.BuildExternalBuffer(buffer, IP_PACKET_SIZE, &sender) && 1100 return packet.BuildExternalBuffer(buffer, IP_PACKET_SIZE, &sender) &&
1102 !sender.send_failure_; 1101 !sender.send_failure_;
1103 } 1102 }
1104 1103
1105 } // namespace webrtc 1104 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698