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 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 bool RTPSender::SendPacketToNetwork(const RtpPacketToSend& packet, | 624 bool RTPSender::SendPacketToNetwork(const RtpPacketToSend& packet, |
625 const PacketOptions& options, | 625 const PacketOptions& options, |
626 const PacedPacketInfo& pacing_info) { | 626 const PacedPacketInfo& pacing_info) { |
627 int bytes_sent = -1; | 627 int bytes_sent = -1; |
628 if (transport_) { | 628 if (transport_) { |
629 UpdateRtpOverhead(packet); | 629 UpdateRtpOverhead(packet); |
630 bytes_sent = transport_->SendRtp(packet.data(), packet.size(), options) | 630 bytes_sent = transport_->SendRtp(packet.data(), packet.size(), options) |
631 ? static_cast<int>(packet.size()) | 631 ? static_cast<int>(packet.size()) |
632 : -1; | 632 : -1; |
633 if (event_log_ && bytes_sent > 0) { | 633 if (event_log_ && bytes_sent > 0) { |
634 event_log_->LogRtpHeader(kOutgoingPacket, packet.data(), packet.size(), | 634 event_log_->LogOutgoingRtpHeader(packet, pacing_info.probe_cluster_id); |
635 pacing_info.probe_cluster_id); | |
636 } | 635 } |
637 } | 636 } |
638 TRACE_EVENT_INSTANT2(TRACE_DISABLED_BY_DEFAULT("webrtc_rtp"), | 637 TRACE_EVENT_INSTANT2(TRACE_DISABLED_BY_DEFAULT("webrtc_rtp"), |
639 "RTPSender::SendPacketToNetwork", "size", packet.size(), | 638 "RTPSender::SendPacketToNetwork", "size", packet.size(), |
640 "sent", bytes_sent); | 639 "sent", bytes_sent); |
641 // TODO(pwestin): Add a separate bitrate for sent bitrate after pacer. | 640 // TODO(pwestin): Add a separate bitrate for sent bitrate after pacer. |
642 if (bytes_sent <= 0) { | 641 if (bytes_sent <= 0) { |
643 LOG(LS_WARNING) << "Transport failed to send packet."; | 642 LOG(LS_WARNING) << "Transport failed to send packet."; |
644 return false; | 643 return false; |
645 } | 644 } |
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1295 rtc::CritScope lock(&send_critsect_); | 1294 rtc::CritScope lock(&send_critsect_); |
1296 packet->SetTimestamp(last_rtp_timestamp_); | 1295 packet->SetTimestamp(last_rtp_timestamp_); |
1297 packet->set_capture_time_ms(capture_time_ms_); | 1296 packet->set_capture_time_ms(capture_time_ms_); |
1298 } | 1297 } |
1299 AssignSequenceNumber(packet.get()); | 1298 AssignSequenceNumber(packet.get()); |
1300 SendToNetwork(std::move(packet), StorageType::kDontRetransmit, | 1299 SendToNetwork(std::move(packet), StorageType::kDontRetransmit, |
1301 RtpPacketSender::Priority::kLowPriority); | 1300 RtpPacketSender::Priority::kLowPriority); |
1302 } | 1301 } |
1303 | 1302 |
1304 } // namespace webrtc | 1303 } // namespace webrtc |
OLD | NEW |