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

Unified Diff: media/cast/audio_receiver/audio_receiver.cc

Issue 69603002: Incorporating logging into Cast (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding scoped_ptr include Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/audio_bus.h ('k') | media/cast/audio_receiver/audio_receiver_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/audio_receiver/audio_receiver.cc
diff --git a/media/cast/audio_receiver/audio_receiver.cc b/media/cast/audio_receiver/audio_receiver.cc
index 3b6361dba9a34f98fe8667f50050dd176a180067..b5b9acfaf668825ec0df5c67e4e4e16656fd1f3a 100644
--- a/media/cast/audio_receiver/audio_receiver.cc
+++ b/media/cast/audio_receiver/audio_receiver.cc
@@ -119,7 +119,7 @@ AudioReceiver::AudioReceiver(scoped_refptr<CastEnvironment> cast_environment,
new LocalRtpReceiverStatistics(rtp_receiver_.get()));
base::TimeDelta rtcp_interval_delta =
base::TimeDelta::FromMilliseconds(audio_config.rtcp_interval);
- rtcp_.reset(new Rtcp(cast_environment->Clock(),
+ rtcp_.reset(new Rtcp(cast_environment,
NULL,
packet_sender,
NULL,
@@ -142,6 +142,10 @@ void AudioReceiver::InitializeTimers() {
void AudioReceiver::IncomingParsedRtpPacket(const uint8* payload_data,
size_t payload_size,
const RtpCastHeader& rtp_header) {
+ cast_environment_->Logging()->InsertPacketEvent(kPacketReceived,
+ rtp_header.webrtc.header.timestamp, rtp_header.frame_id,
+ rtp_header.packet_id, rtp_header.max_packet_id, payload_size);
+
// TODO(pwestin): update this as video to refresh over time.
DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
if (time_first_incoming_packet_.is_null()) {
@@ -216,6 +220,10 @@ void AudioReceiver::DecodeAudioFrameThread(
base::TimeTicks now = cast_environment_->Clock()->NowTicks();
base::TimeTicks playout_time;
playout_time = GetPlayoutTime(now, rtp_timestamp);
+ base::TimeDelta diff = playout_time - now;
+
+ cast_environment_->Logging()->InsertFrameEvent(kAudioPlayoutDelay,
+ rtp_timestamp, diff.InMilliseconds());
// Frame is ready - Send back to the main thread.
cast_environment_->PostTask(CastEnvironment::MAIN, FROM_HERE,
« no previous file with comments | « media/base/audio_bus.h ('k') | media/cast/audio_receiver/audio_receiver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698