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 #include "media/cast/pacing/paced_sender.h" | 5 #include "media/cast/net/pacing/paced_sender.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 | 9 |
10 namespace media { | 10 namespace media { |
11 namespace cast { | 11 namespace cast { |
12 | 12 |
13 static const int64 kPacingIntervalMs = 10; | 13 static const int64 kPacingIntervalMs = 10; |
14 // Each frame will be split into no more than kPacingMaxBurstsPerFrame | 14 // Each frame will be split into no more than kPacingMaxBurstsPerFrame |
15 // bursts of packets. | 15 // bursts of packets. |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 packets_to_send = std::max(packets_to_send, | 139 packets_to_send = std::max(packets_to_send, |
140 resend_packet_list_.size() + packet_list_.size()); | 140 resend_packet_list_.size() + packet_list_.size()); |
141 | 141 |
142 packets_to_send += (kPacingMaxBurstsPerFrame - 1); // Round up. | 142 packets_to_send += (kPacingMaxBurstsPerFrame - 1); // Round up. |
143 burst_size_ = std::max(packets_to_send / kPacingMaxBurstsPerFrame, | 143 burst_size_ = std::max(packets_to_send / kPacingMaxBurstsPerFrame, |
144 burst_size_); | 144 burst_size_); |
145 } | 145 } |
146 | 146 |
147 } // namespace cast | 147 } // namespace cast |
148 } // namespace media | 148 } // namespace media |
OLD | NEW |