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

Side by Side Diff: media/cast/video_receiver/video_receiver.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/logging/logging_unittest.cc ('k') | media/cast/video_sender/video_sender.cc » ('j') | 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_receiver/video_receiver.h" 5 #include "media/cast/video_receiver/video_receiver.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 weak_factory_.GetWeakPtr(), callback)); 416 weak_factory_.GetWeakPtr(), callback));
417 } 417 }
418 418
419 // Send a cast feedback message. Actual message created in the framer (cast 419 // Send a cast feedback message. Actual message created in the framer (cast
420 // message builder). 420 // message builder).
421 void VideoReceiver::CastFeedback(const RtcpCastMessage& cast_message) { 421 void VideoReceiver::CastFeedback(const RtcpCastMessage& cast_message) {
422 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); 422 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
423 423
424 RtcpReceiverLogMessage receiver_log; 424 RtcpReceiverLogMessage receiver_log;
425 VideoRtcpRawMap video_logs = 425 VideoRtcpRawMap video_logs =
426 cast_environment_->Logging()->GetVideoRtcpRawData(); 426 cast_environment_->Logging()->GetAndResetVideoRtcpRawData();
427 427
428 while (!video_logs.empty()) { 428 while (!video_logs.empty()) {
429 // TODO(hclam): Avoid calling begin() within a loop. 429 // TODO(hclam): Avoid calling begin() within a loop.
430 VideoRtcpRawMap::iterator it = video_logs.begin(); 430 VideoRtcpRawMap::iterator it = video_logs.begin();
431 uint32 rtp_timestamp = it->first; 431 uint32 rtp_timestamp = it->first;
432 std::pair<VideoRtcpRawMap::iterator, VideoRtcpRawMap::iterator> 432 std::pair<VideoRtcpRawMap::iterator, VideoRtcpRawMap::iterator>
433 frame_range = video_logs.equal_range(rtp_timestamp); 433 frame_range = video_logs.equal_range(rtp_timestamp);
434 434
435 RtcpReceiverFrameLogMessage frame_log(rtp_timestamp); 435 RtcpReceiverFrameLogMessage frame_log(rtp_timestamp);
436 436
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 } 493 }
494 494
495 void VideoReceiver::SendNextRtcpReport() { 495 void VideoReceiver::SendNextRtcpReport() {
496 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); 496 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
497 rtcp_->SendRtcpFromRtpReceiver(NULL, NULL); 497 rtcp_->SendRtcpFromRtpReceiver(NULL, NULL);
498 ScheduleNextRtcpReport(); 498 ScheduleNextRtcpReport();
499 } 499 }
500 500
501 } // namespace cast 501 } // namespace cast
502 } // namespace media 502 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/logging/logging_unittest.cc ('k') | media/cast/video_sender/video_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698