| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "media/cast/net/rtp/rtp_sender.h" | 5 #include "media/cast/net/rtp/rtp_sender.h" |
| 6 | 6 |
| 7 #include "base/big_endian.h" | 7 #include "base/big_endian.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/rand_util.h" | 9 #include "base/rand_util.h" |
| 10 #include "media/cast/net/cast_transport_defines.h" | |
| 11 #include "media/cast/net/pacing/paced_sender.h" | |
| 12 | 10 |
| 13 namespace media { | 11 namespace media { |
| 14 namespace cast { | 12 namespace cast { |
| 15 | 13 |
| 16 namespace { | 14 namespace { |
| 17 | 15 |
| 18 // If there is only one referecne to the packet then copy the | 16 // If there is only one referecne to the packet then copy the |
| 19 // reference and return. | 17 // reference and return. |
| 20 // Otherwise return a deep copy of the packet. | 18 // Otherwise return a deep copy of the packet. |
| 21 PacketRef FastCopyPacket(const PacketRef& packet) { | 19 PacketRef FastCopyPacket(const PacketRef& packet) { |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 int64 RtpSender::GetLastByteSentForFrame(uint32 frame_id) { | 153 int64 RtpSender::GetLastByteSentForFrame(uint32 frame_id) { |
| 156 const SendPacketVector* stored_packets = storage_.GetFrame8(frame_id & 0xFF); | 154 const SendPacketVector* stored_packets = storage_.GetFrame8(frame_id & 0xFF); |
| 157 if (!stored_packets) | 155 if (!stored_packets) |
| 158 return 0; | 156 return 0; |
| 159 PacketKey last_packet_key = stored_packets->rbegin()->first; | 157 PacketKey last_packet_key = stored_packets->rbegin()->first; |
| 160 return transport_->GetLastByteSentForPacket(last_packet_key); | 158 return transport_->GetLastByteSentForPacket(last_packet_key); |
| 161 } | 159 } |
| 162 | 160 |
| 163 } // namespace cast | 161 } // namespace cast |
| 164 } // namespace media | 162 } // namespace media |
| OLD | NEW |