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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 cast_environment_->PostDelayedTask(CastEnvironment::MAIN, FROM_HERE, | 175 cast_environment_->PostDelayedTask(CastEnvironment::MAIN, FROM_HERE, |
176 base::Bind(&VideoSender::SendRtcpReport, weak_factory_.GetWeakPtr()), | 176 base::Bind(&VideoSender::SendRtcpReport, weak_factory_.GetWeakPtr()), |
177 time_to_next); | 177 time_to_next); |
178 } | 178 } |
179 | 179 |
180 void VideoSender::SendRtcpReport() { | 180 void VideoSender::SendRtcpReport() { |
181 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); | 181 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); |
182 | 182 |
183 transport::RtcpSenderLogMessage sender_log_message; | 183 transport::RtcpSenderLogMessage sender_log_message; |
184 VideoRtcpRawMap video_logs = | 184 VideoRtcpRawMap video_logs = |
185 cast_environment_->Logging()->GetVideoRtcpRawData(); | 185 cast_environment_->Logging()->GetAndResetVideoRtcpRawData(); |
186 | 186 |
187 while (!video_logs.empty()) { | 187 while (!video_logs.empty()) { |
188 VideoRtcpRawMap::iterator it = video_logs.begin(); | 188 VideoRtcpRawMap::iterator it = video_logs.begin(); |
189 uint32 rtp_timestamp = it->first; | 189 uint32 rtp_timestamp = it->first; |
190 | 190 |
191 transport::RtcpSenderFrameLogMessage frame_message; | 191 transport::RtcpSenderFrameLogMessage frame_message; |
192 frame_message.rtp_timestamp = rtp_timestamp; | 192 frame_message.rtp_timestamp = rtp_timestamp; |
193 frame_message.frame_status = transport::kRtcpSenderFrameStatusUnknown; | 193 frame_message.frame_status = transport::kRtcpSenderFrameStatusUnknown; |
194 | 194 |
195 switch (it->second.type) { | 195 switch (it->second.type) { |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 | 402 |
403 void VideoSender::ResendPacketsOnTransportThread( | 403 void VideoSender::ResendPacketsOnTransportThread( |
404 const transport::MissingFramesAndPacketsMap& missing_packets) { | 404 const transport::MissingFramesAndPacketsMap& missing_packets) { |
405 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::TRANSPORT)); | 405 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::TRANSPORT)); |
406 last_send_time_ = cast_environment_->Clock()->NowTicks(); | 406 last_send_time_ = cast_environment_->Clock()->NowTicks(); |
407 transport_sender_->ResendPackets(false, missing_packets); | 407 transport_sender_->ResendPackets(false, missing_packets); |
408 } | 408 } |
409 | 409 |
410 } // namespace cast | 410 } // namespace cast |
411 } // namespace media | 411 } // namespace media |
OLD | NEW |