| 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/transport/pacing/paced_sender.h" | 5 #include "media/cast/net/pacing/paced_sender.h" |
| 6 | 6 |
| 7 #include "base/big_endian.h" | 7 #include "base/big_endian.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "media/cast/logging/logging_impl.h" |
| 10 | 11 |
| 11 namespace media { | 12 namespace media { |
| 12 namespace cast { | 13 namespace cast { |
| 13 namespace transport { | |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 static const int64 kPacingIntervalMs = 10; | 17 static const int64 kPacingIntervalMs = 10; |
| 18 // Each frame will be split into no more than kPacingMaxBurstsPerFrame | 18 // Each frame will be split into no more than kPacingMaxBurstsPerFrame |
| 19 // bursts of packets. | 19 // bursts of packets. |
| 20 static const size_t kPacingMaxBurstsPerFrame = 3; | 20 static const size_t kPacingMaxBurstsPerFrame = 3; |
| 21 static const size_t kTargetBurstSize = 10; | 21 static const size_t kTargetBurstSize = 10; |
| 22 static const size_t kMaxBurstSize = 20; | 22 static const size_t kMaxBurstSize = 20; |
| 23 static const size_t kMaxDedupeWindowMs = 500; | 23 static const size_t kMaxDedupeWindowMs = 500; |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 } else { | 248 } else { |
| 249 DVLOG(3) << "Got unknown ssrc " << ssrc << " when logging packet event"; | 249 DVLOG(3) << "Got unknown ssrc " << ssrc << " when logging packet event"; |
| 250 return; | 250 return; |
| 251 } | 251 } |
| 252 | 252 |
| 253 EventMediaType media_type = is_audio ? AUDIO_EVENT : VIDEO_EVENT; | 253 EventMediaType media_type = is_audio ? AUDIO_EVENT : VIDEO_EVENT; |
| 254 logging_->InsertSinglePacketEvent(clock_->NowTicks(), event, media_type, | 254 logging_->InsertSinglePacketEvent(clock_->NowTicks(), event, media_type, |
| 255 packet); | 255 packet); |
| 256 } | 256 } |
| 257 | 257 |
| 258 } // namespace transport | |
| 259 } // namespace cast | 258 } // namespace cast |
| 260 } // namespace media | 259 } // namespace media |
| OLD | NEW |