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

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

Issue 2628563003: Propagate packet pacing information to SenTimeHistory (Closed)
Patch Set: Rebase Created 3 years, 10 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 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 paced_sender_->InsertPacket(RtpPacketSender::kNormalPriority, 615 paced_sender_->InsertPacket(RtpPacketSender::kNormalPriority,
616 packet->Ssrc(), packet->SequenceNumber(), 616 packet->Ssrc(), packet->SequenceNumber(),
617 corrected_capture_tims_ms, 617 corrected_capture_tims_ms,
618 packet->payload_size(), true); 618 packet->payload_size(), true);
619 619
620 return packet->size(); 620 return packet->size();
621 } 621 }
622 bool rtx = (RtxStatus() & kRtxRetransmitted) > 0; 622 bool rtx = (RtxStatus() & kRtxRetransmitted) > 0;
623 int32_t packet_size = static_cast<int32_t>(packet->size()); 623 int32_t packet_size = static_cast<int32_t>(packet->size());
624 if (!PrepareAndSendPacket(std::move(packet), rtx, true, 624 if (!PrepareAndSendPacket(std::move(packet), rtx, true,
625 PacketInfo::kNotAProbe)) 625 PacedPacketInfo::kNotAProbe))
626 return -1; 626 return -1;
627 return packet_size; 627 return packet_size;
628 } 628 }
629 629
630 bool RTPSender::SendPacketToNetwork(const RtpPacketToSend& packet, 630 bool RTPSender::SendPacketToNetwork(const RtpPacketToSend& packet,
631 const PacketOptions& options) { 631 const PacketOptions& options) {
632 int bytes_sent = -1; 632 int bytes_sent = -1;
633 if (transport_) { 633 if (transport_) {
634 UpdateRtpOverhead(packet); 634 UpdateRtpOverhead(packet);
635 bytes_sent = transport_->SendRtp(packet.data(), packet.size(), options) 635 bytes_sent = transport_->SendRtp(packet.data(), packet.size(), options)
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 TRACE_EVENT_ASYNC_BEGIN1(TRACE_DISABLED_BY_DEFAULT("webrtc_rtp"), 873 TRACE_EVENT_ASYNC_BEGIN1(TRACE_DISABLED_BY_DEFAULT("webrtc_rtp"),
874 "PacedSend", corrected_time_ms, 874 "PacedSend", corrected_time_ms,
875 "capture_time_ms", corrected_time_ms); 875 "capture_time_ms", corrected_time_ms);
876 } 876 }
877 return true; 877 return true;
878 } 878 }
879 879
880 PacketOptions options; 880 PacketOptions options;
881 if (UpdateTransportSequenceNumber(packet.get(), &options.packet_id)) { 881 if (UpdateTransportSequenceNumber(packet.get(), &options.packet_id)) {
882 AddPacketToTransportFeedback(options.packet_id, *packet.get(), 882 AddPacketToTransportFeedback(options.packet_id, *packet.get(),
883 PacketInfo::kNotAProbe); 883 PacedPacketInfo::kNotAProbe);
884 } 884 }
885 885
886 UpdateDelayStatistics(packet->capture_time_ms(), now_ms); 886 UpdateDelayStatistics(packet->capture_time_ms(), now_ms);
887 UpdateOnSendPacket(options.packet_id, packet->capture_time_ms(), 887 UpdateOnSendPacket(options.packet_id, packet->capture_time_ms(),
888 packet->Ssrc()); 888 packet->Ssrc());
889 889
890 bool sent = SendPacketToNetwork(*packet, options); 890 bool sent = SendPacketToNetwork(*packet, options);
891 891
892 if (sent) { 892 if (sent) {
893 { 893 {
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
1294 if (rtp_overhead_bytes_per_packet_ == packet.headers_size()) { 1294 if (rtp_overhead_bytes_per_packet_ == packet.headers_size()) {
1295 return; 1295 return;
1296 } 1296 }
1297 rtp_overhead_bytes_per_packet_ = packet.headers_size(); 1297 rtp_overhead_bytes_per_packet_ = packet.headers_size();
1298 overhead_bytes_per_packet = rtp_overhead_bytes_per_packet_; 1298 overhead_bytes_per_packet = rtp_overhead_bytes_per_packet_;
1299 } 1299 }
1300 overhead_observer_->OnOverheadChanged(overhead_bytes_per_packet); 1300 overhead_observer_->OnOverheadChanged(overhead_bytes_per_packet);
1301 } 1301 }
1302 1302
1303 } // namespace webrtc 1303 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc ('k') | webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698