| 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 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |