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

Side by Side Diff: media/cast/audio_receiver/audio_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 | « no previous file | media/cast/logging/logging_defines.h » ('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/audio_receiver/audio_receiver.h" 5 #include "media/cast/audio_receiver/audio_receiver.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/string_piece.h" 10 #include "base/strings/string_piece.h"
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 if (!rtcp_packet) { 396 if (!rtcp_packet) {
397 rtp_receiver_->ReceivedPacket(&packet->front(), packet->size()); 397 rtp_receiver_->ReceivedPacket(&packet->front(), packet->size());
398 } else { 398 } else {
399 rtcp_->IncomingRtcpPacket(&packet->front(), packet->size()); 399 rtcp_->IncomingRtcpPacket(&packet->front(), packet->size());
400 } 400 }
401 } 401 }
402 402
403 void AudioReceiver::CastFeedback(const RtcpCastMessage& cast_message) { 403 void AudioReceiver::CastFeedback(const RtcpCastMessage& cast_message) {
404 RtcpReceiverLogMessage receiver_log; 404 RtcpReceiverLogMessage receiver_log;
405 AudioRtcpRawMap audio_logs = 405 AudioRtcpRawMap audio_logs =
406 cast_environment_->Logging()->GetAudioRtcpRawData(); 406 cast_environment_->Logging()->GetAndResetAudioRtcpRawData();
407 407
408 while (!audio_logs.empty()) { 408 while (!audio_logs.empty()) {
409 AudioRtcpRawMap::iterator it = audio_logs.begin(); 409 AudioRtcpRawMap::iterator it = audio_logs.begin();
410 uint32 rtp_timestamp = it->first; 410 uint32 rtp_timestamp = it->first;
411 std::pair<AudioRtcpRawMap::iterator, AudioRtcpRawMap::iterator> 411 std::pair<AudioRtcpRawMap::iterator, AudioRtcpRawMap::iterator>
412 frame_range = audio_logs.equal_range(rtp_timestamp); 412 frame_range = audio_logs.equal_range(rtp_timestamp);
413 413
414 RtcpReceiverFrameLogMessage frame_log(rtp_timestamp); 414 RtcpReceiverFrameLogMessage frame_log(rtp_timestamp);
415 415
416 AudioRtcpRawMap::const_iterator event_it = frame_range.first; 416 AudioRtcpRawMap::const_iterator event_it = frame_range.first;
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 } 549 }
550 if (audio_decoder_) { 550 if (audio_decoder_) {
551 // Will only send a message if it is time. 551 // Will only send a message if it is time.
552 audio_decoder_->SendCastMessage(); 552 audio_decoder_->SendCastMessage();
553 } 553 }
554 ScheduleNextCastMessage(); 554 ScheduleNextCastMessage();
555 } 555 }
556 556
557 } // namespace cast 557 } // namespace cast
558 } // namespace media 558 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/cast/logging/logging_defines.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698