| 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 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 844 if (last_xr_rr_.size() >= RTCP_NUMBER_OF_SR) | 844 if (last_xr_rr_.size() >= RTCP_NUMBER_OF_SR) |
| 845 last_xr_rr_.erase(last_xr_rr_.begin()); | 845 last_xr_rr_.erase(last_xr_rr_.begin()); |
| 846 last_xr_rr_.insert(std::pair<uint32_t, int64_t>( | 846 last_xr_rr_.insert(std::pair<uint32_t, int64_t>( |
| 847 RTCPUtility::MidNtp(ctx->ntp_sec, ctx->ntp_frac), | 847 RTCPUtility::MidNtp(ctx->ntp_sec, ctx->ntp_frac), |
| 848 Clock::NtpToMs(ctx->ntp_sec, ctx->ntp_frac))); | 848 Clock::NtpToMs(ctx->ntp_sec, ctx->ntp_frac))); |
| 849 | 849 |
| 850 rtcp::Xr xr; | 850 rtcp::Xr xr; |
| 851 xr.From(ssrc_); | 851 xr.From(ssrc_); |
| 852 | 852 |
| 853 rtcp::Rrtr rrtr; | 853 rtcp::Rrtr rrtr; |
| 854 rrtr.WithNtpSec(ctx->ntp_sec); | 854 rrtr.WithNtp(NtpTime(ctx->ntp_sec, ctx->ntp_frac)); |
| 855 rrtr.WithNtpFrac(ctx->ntp_frac); | |
| 856 | 855 |
| 857 xr.WithRrtr(&rrtr); | 856 xr.WithRrtr(&rrtr); |
| 858 | 857 |
| 859 // TODO(sprang): Merge XR report sending to contain all of RRTR, DLRR, VOIP? | 858 // TODO(sprang): Merge XR report sending to contain all of RRTR, DLRR, VOIP? |
| 860 | 859 |
| 861 PacketBuiltCallback callback(ctx); | 860 PacketBuiltCallback callback(ctx); |
| 862 if (!callback.BuildPacket(xr)) | 861 if (!callback.BuildPacket(xr)) |
| 863 return BuildResult::kTruncated; | 862 return BuildResult::kTruncated; |
| 864 | 863 |
| 865 return BuildResult::kSuccess; | 864 return BuildResult::kSuccess; |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1222 Transport* const transport_; | 1221 Transport* const transport_; |
| 1223 bool send_failure_; | 1222 bool send_failure_; |
| 1224 } sender(transport_); | 1223 } sender(transport_); |
| 1225 | 1224 |
| 1226 uint8_t buffer[IP_PACKET_SIZE]; | 1225 uint8_t buffer[IP_PACKET_SIZE]; |
| 1227 return packet.BuildExternalBuffer(buffer, IP_PACKET_SIZE, &sender) && | 1226 return packet.BuildExternalBuffer(buffer, IP_PACKET_SIZE, &sender) && |
| 1228 !sender.send_failure_; | 1227 !sender.send_failure_; |
| 1229 } | 1228 } |
| 1230 | 1229 |
| 1231 } // namespace webrtc | 1230 } // namespace webrtc |
| OLD | NEW |