diff options
Diffstat (limited to 'media/cast/audio_receiver/audio_receiver.cc')
-rw-r--r-- | media/cast/audio_receiver/audio_receiver.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/media/cast/audio_receiver/audio_receiver.cc b/media/cast/audio_receiver/audio_receiver.cc index 5aad22f..d1eb11c 100644 --- a/media/cast/audio_receiver/audio_receiver.cc +++ b/media/cast/audio_receiver/audio_receiver.cc @@ -152,7 +152,9 @@ void AudioReceiver::IncomingParsedRtpPacket(const uint8* payload_data, size_t payload_size, const RtpCastHeader& rtp_header) { DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); - cast_environment_->Logging()->InsertPacketEvent(kPacketReceived, + base::TimeTicks now = cast_environment_->Clock()->NowTicks(); + + cast_environment_->Logging()->InsertPacketEvent(now, kPacketReceived, rtp_header.webrtc.header.timestamp, rtp_header.frame_id, rtp_header.packet_id, rtp_header.max_packet_id, payload_size); @@ -161,7 +163,7 @@ void AudioReceiver::IncomingParsedRtpPacket(const uint8* payload_data, if (time_first_incoming_packet_.is_null()) { InitializeTimers(); first_incoming_rtp_timestamp_ = rtp_header.webrtc.header.timestamp; - time_first_incoming_packet_ = cast_environment_->Clock()->NowTicks(); + time_first_incoming_packet_ = now; } if (audio_decoder_) { @@ -255,14 +257,14 @@ void AudioReceiver::ReturnDecodedFrameWithPlayoutDelay( scoped_ptr<PcmAudioFrame> audio_frame, uint32 rtp_timestamp, const AudioFrameDecodedCallback callback) { DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); - cast_environment_->Logging()->InsertFrameEvent(kAudioFrameDecoded, + base::TimeTicks now = cast_environment_->Clock()->NowTicks(); + cast_environment_->Logging()->InsertFrameEvent(now, kAudioFrameDecoded, rtp_timestamp, kFrameIdUnknown); - base::TimeTicks now = cast_environment_->Clock()->NowTicks(); base::TimeTicks playout_time = GetPlayoutTime(now, rtp_timestamp); - cast_environment_->Logging()->InsertFrameEventWithDelay(kAudioPlayoutDelay, - rtp_timestamp, kFrameIdUnknown, playout_time - now); + cast_environment_->Logging()->InsertFrameEventWithDelay(now, + kAudioPlayoutDelay, rtp_timestamp, kFrameIdUnknown, playout_time - now); // Frame is ready - Send back to the caller. cast_environment_->PostTask(CastEnvironment::MAIN, FROM_HERE, |