OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_TRANSPORT_PACING_PACED_SENDER_H_ | 5 #ifndef MEDIA_CAST_TRANSPORT_PACING_PACED_SENDER_H_ |
6 #define MEDIA_CAST_TRANSPORT_PACING_PACED_SENDER_H_ | 6 #define MEDIA_CAST_TRANSPORT_PACING_PACED_SENDER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 PacketList* packets_not_sent); | 69 PacketList* packets_not_sent); |
70 | 70 |
71 // Actually sends the packets to the transport. | 71 // Actually sends the packets to the transport. |
72 bool TransmitPackets(const PacketList& packets); | 72 bool TransmitPackets(const PacketList& packets); |
73 void SendStoredPackets(); | 73 void SendStoredPackets(); |
74 void UpdateBurstSize(size_t num_of_packets); | 74 void UpdateBurstSize(size_t num_of_packets); |
75 | 75 |
76 // Not owned by this class. | 76 // Not owned by this class. |
77 base::TickClock* const clock_; | 77 base::TickClock* const clock_; |
78 PacketSender* transport_; // Not owned by this class. | 78 PacketSender* transport_; // Not owned by this class. |
79 scoped_refptr<base::TaskRunner> transport_task_runner_; | 79 scoped_refptr<base::SingleThreadTaskRunner> transport_task_runner_; |
80 size_t burst_size_; | 80 size_t burst_size_; |
81 size_t packets_sent_in_burst_; | 81 size_t packets_sent_in_burst_; |
82 base::TimeTicks time_last_process_; | 82 base::TimeTicks time_last_process_; |
83 // Note: We can't combine the |packet_list_| and the |resend_packet_list_| | 83 // Note: We can't combine the |packet_list_| and the |resend_packet_list_| |
84 // since then we might get reordering of the retransmitted packets. | 84 // since then we might get reordering of the retransmitted packets. |
85 PacketList packet_list_; | 85 PacketList packet_list_; |
86 PacketList resend_packet_list_; | 86 PacketList resend_packet_list_; |
87 | 87 |
88 base::WeakPtrFactory<PacedSender> weak_factory_; | 88 base::WeakPtrFactory<PacedSender> weak_factory_; |
89 | 89 |
90 DISALLOW_COPY_AND_ASSIGN(PacedSender); | 90 DISALLOW_COPY_AND_ASSIGN(PacedSender); |
91 }; | 91 }; |
92 | 92 |
93 } // namespace transport | 93 } // namespace transport |
94 } // namespace cast | 94 } // namespace cast |
95 } // namespace media | 95 } // namespace media |
96 | 96 |
97 #endif // MEDIA_CAST_TRANSPORT_PACING_PACED_SENDER_H_ | 97 #endif // MEDIA_CAST_TRANSPORT_PACING_PACED_SENDER_H_ |
OLD | NEW |