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 #ifndef MEDIA_CAST_NET_PACING_PACED_SENDER_H_ | 5 #ifndef MEDIA_CAST_NET_PACING_PACED_SENDER_H_ |
6 #define MEDIA_CAST_NET_PACING_PACED_SENDER_H_ | 6 #define MEDIA_CAST_NET_PACING_PACED_SENDER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 // Returns the total number of bytes sent to the socket when the specified | 104 // Returns the total number of bytes sent to the socket when the specified |
105 // packet was just sent. | 105 // packet was just sent. |
106 // Returns 0 if the packet cannot be found or not yet sent. | 106 // Returns 0 if the packet cannot be found or not yet sent. |
107 int64 GetLastByteSentForPacket(const PacketKey& packet_key); | 107 int64 GetLastByteSentForPacket(const PacketKey& packet_key); |
108 | 108 |
109 // Returns the total number of bytes sent to the socket when the last payload | 109 // Returns the total number of bytes sent to the socket when the last payload |
110 // identified by SSRC is just sent. | 110 // identified by SSRC is just sent. |
111 int64 GetLastByteSentForSsrc(uint32 ssrc); | 111 int64 GetLastByteSentForSsrc(uint32 ssrc); |
112 | 112 |
113 // PacedPacketSender implementation. | 113 // PacedPacketSender implementation. |
114 virtual bool SendPackets(const SendPacketVector& packets) OVERRIDE; | 114 virtual bool SendPackets(const SendPacketVector& packets) override; |
115 virtual bool ResendPackets(const SendPacketVector& packets, | 115 virtual bool ResendPackets(const SendPacketVector& packets, |
116 const DedupInfo& dedup_info) OVERRIDE; | 116 const DedupInfo& dedup_info) override; |
117 virtual bool SendRtcpPacket(uint32 ssrc, PacketRef packet) OVERRIDE; | 117 virtual bool SendRtcpPacket(uint32 ssrc, PacketRef packet) override; |
118 virtual void CancelSendingPacket(const PacketKey& packet_key) OVERRIDE; | 118 virtual void CancelSendingPacket(const PacketKey& packet_key) override; |
119 | 119 |
120 private: | 120 private: |
121 // Actually sends the packets to the transport. | 121 // Actually sends the packets to the transport. |
122 void SendStoredPackets(); | 122 void SendStoredPackets(); |
123 void LogPacketEvent(const Packet& packet, CastLoggingEvent event); | 123 void LogPacketEvent(const Packet& packet, CastLoggingEvent event); |
124 | 124 |
125 // Returns true if retransmission for packet indexed by |packet_key| is | 125 // Returns true if retransmission for packet indexed by |packet_key| is |
126 // accepted. |dedup_info| contains information to help deduplicate | 126 // accepted. |dedup_info| contains information to help deduplicate |
127 // retransmission. |now| is the current time to save on fetching it from the | 127 // retransmission. |now| is the current time to save on fetching it from the |
128 // clock multiple times. | 128 // clock multiple times. |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 // NOTE: Weak pointers must be invalidated before all other member variables. | 210 // NOTE: Weak pointers must be invalidated before all other member variables. |
211 base::WeakPtrFactory<PacedSender> weak_factory_; | 211 base::WeakPtrFactory<PacedSender> weak_factory_; |
212 | 212 |
213 DISALLOW_COPY_AND_ASSIGN(PacedSender); | 213 DISALLOW_COPY_AND_ASSIGN(PacedSender); |
214 }; | 214 }; |
215 | 215 |
216 } // namespace cast | 216 } // namespace cast |
217 } // namespace media | 217 } // namespace media |
218 | 218 |
219 #endif // MEDIA_CAST_NET_PACING_PACED_SENDER_H_ | 219 #endif // MEDIA_CAST_NET_PACING_PACED_SENDER_H_ |
OLD | NEW |