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

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: Responding to Review Created 6 years, 11 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
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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 weak_factory_.GetWeakPtr(), callback)); 433 weak_factory_.GetWeakPtr(), callback));
434 } 434 }
435 435
436 // Send a cast feedback message. Actual message created in the framer (cast 436 // Send a cast feedback message. Actual message created in the framer (cast
437 // message builder). 437 // message builder).
438 void VideoReceiver::CastFeedback(const RtcpCastMessage& cast_message) { 438 void VideoReceiver::CastFeedback(const RtcpCastMessage& cast_message) {
439 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); 439 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
440 440
441 RtcpReceiverLogMessage receiver_log; 441 RtcpReceiverLogMessage receiver_log;
442 VideoRtcpRawMap video_logs = 442 VideoRtcpRawMap video_logs =
443 cast_environment_->Logging()->GetVideoRtcpRawData(); 443 cast_environment_->Logging()->GetAndResetVideoRtcpRawData();
444 444
445 while (!video_logs.empty()) { 445 while (!video_logs.empty()) {
446 VideoRtcpRawMap::iterator it = video_logs.begin(); 446 VideoRtcpRawMap::iterator it = video_logs.begin();
447 uint32 rtp_timestamp = it->first; 447 uint32 rtp_timestamp = it->first;
448 std::pair<VideoRtcpRawMap::iterator, VideoRtcpRawMap::iterator> 448 std::pair<VideoRtcpRawMap::iterator, VideoRtcpRawMap::iterator>
449 frame_range = video_logs.equal_range(rtp_timestamp); 449 frame_range = video_logs.equal_range(rtp_timestamp);
450 450
451 RtcpReceiverFrameLogMessage frame_log(rtp_timestamp); 451 RtcpReceiverFrameLogMessage frame_log(rtp_timestamp);
452 452
453 VideoRtcpRawMap::const_iterator event_it = frame_range.first; 453 VideoRtcpRawMap::const_iterator event_it = frame_range.first;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 } 507 }
508 508
509 void VideoReceiver::SendNextRtcpReport() { 509 void VideoReceiver::SendNextRtcpReport() {
510 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); 510 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
511 rtcp_->SendRtcpFromRtpReceiver(NULL, NULL); 511 rtcp_->SendRtcpFromRtpReceiver(NULL, NULL);
512 ScheduleNextRtcpReport(); 512 ScheduleNextRtcpReport();
513 } 513 }
514 514
515 } // namespace cast 515 } // namespace cast
516 } // namespace media 516 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698