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

Unified Diff: media/cast/video_receiver/video_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
Index: media/cast/video_receiver/video_receiver.cc
diff --git a/media/cast/video_receiver/video_receiver.cc b/media/cast/video_receiver/video_receiver.cc
index 1c9aa824f1f5cf751b879a31b765cebdfb8853d1..28f19e4135d6cb069bcc5ebdfc69b16ac008d870 100644
--- a/media/cast/video_receiver/video_receiver.cc
+++ b/media/cast/video_receiver/video_receiver.cc
@@ -57,7 +57,7 @@ class LocalRtpVideoData : public RtpData {
}
private:
- base::TickClock* clock_; // Not owned by this class.
+ base::TickClock* const clock_; // Not owned by this class.
VideoReceiver* video_receiver_;
bool time_updated_;
base::TimeTicks time_incoming_packet_;
@@ -135,7 +135,7 @@ VideoReceiver::VideoReceiver(scoped_refptr<CastEnvironment> cast_environment,
}
rtcp_.reset(
- new Rtcp(cast_environment_->Clock(),
+ new Rtcp(cast_environment_,
NULL,
packet_sender,
NULL,
@@ -224,6 +224,10 @@ bool VideoReceiver::PullEncodedVideoFrame(uint32 rtp_timestamp,
base::TimeTicks* render_time) {
base::TimeTicks now = cast_environment_->Clock()->NowTicks();
*render_time = GetRenderTime(now, rtp_timestamp);
+ base::TimeDelta diff = now - *render_time;
+
+ cast_environment_->Logging()->InsertFrameEvent(kVideoRenderDelay,
+ rtp_timestamp, diff.InMilliseconds());
// Minimum time before a frame is due to be rendered before we pull it for
// decode.
@@ -351,6 +355,10 @@ void VideoReceiver::IncomingPacket(const uint8* packet, size_t length,
void VideoReceiver::IncomingRtpPacket(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);
+
bool complete = framer_->InsertPacket(payload_data, payload_size, rtp_header);
if (!complete) return; // Video frame not complete; wait for more packets.

Powered by Google App Engine
This is Rietveld 408576698