| 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/video_sender/video_sender.h" | 5 #include "media/cast/video_sender/video_sender.h" |
| 6 | 6 |
| 7 #include <list> | 7 #include <list> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 base::TimeDelta time_since_last_send = now - time_sent_; | 52 base::TimeDelta time_since_last_send = now - time_sent_; |
| 53 sender_info_.rtp_timestamp = | 53 sender_info_.rtp_timestamp = |
| 54 rtp_timestamp_ + | 54 rtp_timestamp_ + |
| 55 time_since_last_send.InMilliseconds() * (kVideoFrequency / 1000); | 55 time_since_last_send.InMilliseconds() * (kVideoFrequency / 1000); |
| 56 } else { | 56 } else { |
| 57 sender_info_.rtp_timestamp = 0; | 57 sender_info_.rtp_timestamp = 0; |
| 58 } | 58 } |
| 59 memcpy(sender_info, &sender_info_, sizeof(transport::RtcpSenderInfo)); | 59 memcpy(sender_info, &sender_info_, sizeof(transport::RtcpSenderInfo)); |
| 60 } | 60 } |
| 61 | 61 |
| 62 void StoreStatistics(transport::RtcpSenderInfo& sender_info, | 62 void StoreStatistics(const transport::RtcpSenderInfo& sender_info, |
| 63 base::TimeTicks time_sent, | 63 base::TimeTicks time_sent, |
| 64 uint32 rtp_timestamp) { | 64 uint32 rtp_timestamp) { |
| 65 sender_info_ = sender_info; | 65 sender_info_ = sender_info; |
| 66 time_sent_ = time_sent; | 66 time_sent_ = time_sent; |
| 67 rtp_timestamp_ = rtp_timestamp; | 67 rtp_timestamp_ = rtp_timestamp; |
| 68 } | 68 } |
| 69 | 69 |
| 70 private: | 70 private: |
| 71 transport::CastTransportSender* const transport_sender_; | 71 transport::CastTransportSender* const transport_sender_; |
| 72 transport::RtcpSenderInfo sender_info_; | 72 transport::RtcpSenderInfo sender_info_; |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 | 455 |
| 456 void VideoSender::ResendPacketsOnTransportThread( | 456 void VideoSender::ResendPacketsOnTransportThread( |
| 457 const transport::MissingFramesAndPacketsMap& missing_packets) { | 457 const transport::MissingFramesAndPacketsMap& missing_packets) { |
| 458 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::TRANSPORT)); | 458 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::TRANSPORT)); |
| 459 last_send_time_ = cast_environment_->Clock()->NowTicks(); | 459 last_send_time_ = cast_environment_->Clock()->NowTicks(); |
| 460 transport_sender_->ResendPackets(false, missing_packets); | 460 transport_sender_->ResendPackets(false, missing_packets); |
| 461 } | 461 } |
| 462 | 462 |
| 463 } // namespace cast | 463 } // namespace cast |
| 464 } // namespace media | 464 } // namespace media |
| OLD | NEW |