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

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

Issue 162333002: Cast: Rtcp and RtcpSender don't take event logs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cast 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/rtcp/rtcp.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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); 368 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
369 bool rtcp_packet = Rtcp::IsRtcpPacket(&packet->front(), packet->size()); 369 bool rtcp_packet = Rtcp::IsRtcpPacket(&packet->front(), packet->size());
370 if (!rtcp_packet) { 370 if (!rtcp_packet) {
371 rtp_receiver_->ReceivedPacket(&packet->front(), packet->size()); 371 rtp_receiver_->ReceivedPacket(&packet->front(), packet->size());
372 } else { 372 } else {
373 rtcp_->IncomingRtcpPacket(&packet->front(), packet->size()); 373 rtcp_->IncomingRtcpPacket(&packet->front(), packet->size());
374 } 374 }
375 } 375 }
376 376
377 void AudioReceiver::CastFeedback(const RtcpCastMessage& cast_message) { 377 void AudioReceiver::CastFeedback(const RtcpCastMessage& cast_message) {
378 RtcpReceiverLogMessage receiver_log;
379 event_subscriber_.GetReceiverLogMessageAndReset(&receiver_log);
380
381 base::TimeTicks now = cast_environment_->Clock()->NowTicks(); 378 base::TimeTicks now = cast_environment_->Clock()->NowTicks();
382 cast_environment_->Logging()->InsertGenericEvent(now, kAudioAckSent, 379 cast_environment_->Logging()->InsertGenericEvent(now, kAudioAckSent,
383 cast_message.ack_frame_id_); 380 cast_message.ack_frame_id_);
384 381
385 rtcp_->SendRtcpFromRtpReceiver(&cast_message, &receiver_log); 382 rtcp_->SendRtcpFromRtpReceiver(&cast_message, &event_subscriber_);
386 } 383 }
387 384
388 base::TimeTicks AudioReceiver::GetPlayoutTime(base::TimeTicks now, 385 base::TimeTicks AudioReceiver::GetPlayoutTime(base::TimeTicks now,
389 uint32 rtp_timestamp) { 386 uint32 rtp_timestamp) {
390 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); 387 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
391 // Senders time in ms when this frame was recorded. 388 // Senders time in ms when this frame was recorded.
392 // Note: the senders clock and our local clock might not be synced. 389 // Note: the senders clock and our local clock might not be synced.
393 base::TimeTicks rtp_timestamp_in_ticks; 390 base::TimeTicks rtp_timestamp_in_ticks;
394 base::TimeTicks playout_time; 391 base::TimeTicks playout_time;
395 if (time_offset_ == base::TimeDelta()) { 392 if (time_offset_ == base::TimeDelta()) {
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 } 495 }
499 if (audio_decoder_) { 496 if (audio_decoder_) {
500 // Will only send a message if it is time. 497 // Will only send a message if it is time.
501 audio_decoder_->SendCastMessage(); 498 audio_decoder_->SendCastMessage();
502 } 499 }
503 ScheduleNextCastMessage(); 500 ScheduleNextCastMessage();
504 } 501 }
505 502
506 } // namespace cast 503 } // namespace cast
507 } // namespace media 504 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/cast/rtcp/rtcp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698