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

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: clean up 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 | « no previous file | media/cast/audio_receiver/audio_receiver_unittest.cc » ('j') | media/cast/cast_environment.h » ('J')
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 c3dc3937b9acf176364fcc8aa5dbe3a16461da3a..c38947be684e9f417eb256f11e39fdfd48ba66ba 100644
--- a/media/cast/audio_receiver/audio_receiver.cc
+++ b/media/cast/audio_receiver/audio_receiver.cc
@@ -107,7 +107,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,
@@ -127,6 +127,10 @@ AudioReceiver::~AudioReceiver() {}
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.
if (time_first_incoming_packet_.is_null()) {
first_incoming_rtp_timestamp_ = rtp_header.webrtc.header.timestamp;
@@ -183,6 +187,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 | « no previous file | media/cast/audio_receiver/audio_receiver_unittest.cc » ('j') | media/cast/cast_environment.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698