| 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/rtp_sender/rtp_sender.h" | 5 #include "media/cast/transport/rtp_sender/rtp_sender.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/rand_util.h" | 8 #include "base/rand_util.h" |
| 9 #include "media/cast/transport/cast_transport_defines.h" | 9 #include "media/cast/transport/cast_transport_defines.h" |
| 10 #include "media/cast/transport/pacing/paced_sender.h" | 10 #include "media/cast/transport/pacing/paced_sender.h" |
| 11 #include "net/base/big_endian.h" | |
| 12 | 11 |
| 13 namespace media { | 12 namespace media { |
| 14 namespace cast { | 13 namespace cast { |
| 15 namespace transport { | 14 namespace transport { |
| 16 | 15 |
| 17 // Schedule the RTP statistics callback every 33mS. As this interval affects the | 16 // Schedule the RTP statistics callback every 33mS. As this interval affects the |
| 18 // time offset of the render and playout times, we want it in the same ball park | 17 // time offset of the render and playout times, we want it in the same ball park |
| 19 // as the frame rate. | 18 // as the frame rate. |
| 20 static const int kStatsCallbackIntervalMs = 33; | 19 static const int kStatsCallbackIntervalMs = 33; |
| 21 | 20 |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 packetizer_->LastSentTimestamp(&time_sent, &rtp_timestamp); | 144 packetizer_->LastSentTimestamp(&time_sent, &rtp_timestamp); |
| 146 sender_info.send_packet_count = packetizer_->send_packets_count(); | 145 sender_info.send_packet_count = packetizer_->send_packets_count(); |
| 147 sender_info.send_octet_count = packetizer_->send_octet_count(); | 146 sender_info.send_octet_count = packetizer_->send_octet_count(); |
| 148 stats_callback_.Run(sender_info, time_sent, rtp_timestamp); | 147 stats_callback_.Run(sender_info, time_sent, rtp_timestamp); |
| 149 ScheduleNextStatsReport(); | 148 ScheduleNextStatsReport(); |
| 150 } | 149 } |
| 151 | 150 |
| 152 } // namespace transport | 151 } // namespace transport |
| 153 } // namespace cast | 152 } // namespace cast |
| 154 } // namespace media | 153 } // namespace media |
| OLD | NEW |