| 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 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 635 bool RTPSender::SendPacketToNetwork(const RtpPacketToSend& packet, | 635 bool RTPSender::SendPacketToNetwork(const RtpPacketToSend& packet, |
| 636 const PacketOptions& options, | 636 const PacketOptions& options, |
| 637 const PacedPacketInfo& pacing_info) { | 637 const PacedPacketInfo& pacing_info) { |
| 638 int bytes_sent = -1; | 638 int bytes_sent = -1; |
| 639 if (transport_) { | 639 if (transport_) { |
| 640 UpdateRtpOverhead(packet); | 640 UpdateRtpOverhead(packet); |
| 641 bytes_sent = transport_->SendRtp(packet.data(), packet.size(), options) | 641 bytes_sent = transport_->SendRtp(packet.data(), packet.size(), options) |
| 642 ? static_cast<int>(packet.size()) | 642 ? static_cast<int>(packet.size()) |
| 643 : -1; | 643 : -1; |
| 644 if (event_log_ && bytes_sent > 0) { | 644 if (event_log_ && bytes_sent > 0) { |
| 645 event_log_->LogRtpHeader(kOutgoingPacket, packet.data(), packet.size(), | 645 event_log_->LogOutgoingRtpHeader(packet, pacing_info.probe_cluster_id); |
| 646 pacing_info.probe_cluster_id); | |
| 647 } | 646 } |
| 648 } | 647 } |
| 649 TRACE_EVENT_INSTANT2(TRACE_DISABLED_BY_DEFAULT("webrtc_rtp"), | 648 TRACE_EVENT_INSTANT2(TRACE_DISABLED_BY_DEFAULT("webrtc_rtp"), |
| 650 "RTPSender::SendPacketToNetwork", "size", packet.size(), | 649 "RTPSender::SendPacketToNetwork", "size", packet.size(), |
| 651 "sent", bytes_sent); | 650 "sent", bytes_sent); |
| 652 // TODO(pwestin): Add a separate bitrate for sent bitrate after pacer. | 651 // TODO(pwestin): Add a separate bitrate for sent bitrate after pacer. |
| 653 if (bytes_sent <= 0) { | 652 if (bytes_sent <= 0) { |
| 654 LOG(LS_WARNING) << "Transport failed to send packet."; | 653 LOG(LS_WARNING) << "Transport failed to send packet."; |
| 655 return false; | 654 return false; |
| 656 } | 655 } |
| (...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1306 rtc::CritScope lock(&send_critsect_); | 1305 rtc::CritScope lock(&send_critsect_); |
| 1307 packet->SetTimestamp(last_rtp_timestamp_); | 1306 packet->SetTimestamp(last_rtp_timestamp_); |
| 1308 packet->set_capture_time_ms(capture_time_ms_); | 1307 packet->set_capture_time_ms(capture_time_ms_); |
| 1309 } | 1308 } |
| 1310 AssignSequenceNumber(packet.get()); | 1309 AssignSequenceNumber(packet.get()); |
| 1311 SendToNetwork(std::move(packet), StorageType::kDontRetransmit, | 1310 SendToNetwork(std::move(packet), StorageType::kDontRetransmit, |
| 1312 RtpPacketSender::Priority::kLowPriority); | 1311 RtpPacketSender::Priority::kLowPriority); |
| 1313 } | 1312 } |
| 1314 | 1313 |
| 1315 } // namespace webrtc | 1314 } // namespace webrtc |
| OLD | NEW |