Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Side by Side Diff: media/cast/video_sender/video_sender.cc

Issue 130423007: Cast:Updating logging stats (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/cast/video_receiver/video_receiver.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 cast_environment_->PostDelayedTask(CastEnvironment::MAIN, FROM_HERE, 182 cast_environment_->PostDelayedTask(CastEnvironment::MAIN, FROM_HERE,
183 base::Bind(&VideoSender::SendRtcpReport, weak_factory_.GetWeakPtr()), 183 base::Bind(&VideoSender::SendRtcpReport, weak_factory_.GetWeakPtr()),
184 time_to_next); 184 time_to_next);
185 } 185 }
186 186
187 void VideoSender::SendRtcpReport() { 187 void VideoSender::SendRtcpReport() {
188 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); 188 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
189 189
190 transport::RtcpSenderLogMessage sender_log_message; 190 transport::RtcpSenderLogMessage sender_log_message;
191 VideoRtcpRawMap video_logs = 191 VideoRtcpRawMap video_logs =
192 cast_environment_->Logging()->GetVideoRtcpRawData(); 192 cast_environment_->Logging()->GetAndResetVideoRtcpRawData();
193 193
194 while (!video_logs.empty()) { 194 while (!video_logs.empty()) {
195 // TODO(hclam): Avoid calling begin() within a loop. 195 // TODO(hclam): Avoid calling begin() within a loop.
196 VideoRtcpRawMap::iterator it = video_logs.begin(); 196 VideoRtcpRawMap::iterator it = video_logs.begin();
197 uint32 rtp_timestamp = it->first; 197 uint32 rtp_timestamp = it->first;
198 198
199 transport::RtcpSenderFrameLogMessage frame_message; 199 transport::RtcpSenderFrameLogMessage frame_message;
200 frame_message.rtp_timestamp = rtp_timestamp; 200 frame_message.rtp_timestamp = rtp_timestamp;
201 frame_message.frame_status = transport::kRtcpSenderFrameStatusUnknown; 201 frame_message.frame_status = transport::kRtcpSenderFrameStatusUnknown;
202 bool ignore_event = false; 202 bool ignore_event = false;
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 411
412 void VideoSender::ResendPacketsOnTransportThread( 412 void VideoSender::ResendPacketsOnTransportThread(
413 const transport::MissingFramesAndPacketsMap& missing_packets) { 413 const transport::MissingFramesAndPacketsMap& missing_packets) {
414 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::TRANSPORT)); 414 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::TRANSPORT));
415 last_send_time_ = cast_environment_->Clock()->NowTicks(); 415 last_send_time_ = cast_environment_->Clock()->NowTicks();
416 transport_sender_->ResendPackets(false, missing_packets); 416 transport_sender_->ResendPackets(false, missing_packets);
417 } 417 }
418 418
419 } // namespace cast 419 } // namespace cast
420 } // namespace media 420 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/video_receiver/video_receiver.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698