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

Unified Diff: media/cast/net/pacing/paced_sender.cc

Issue 1515433002: Replace uses of raw uint32's with a type-checked RtpTimeTicks data type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/net/pacing/paced_sender.cc
diff --git a/media/cast/net/pacing/paced_sender.cc b/media/cast/net/pacing/paced_sender.cc
index 61166daf1049b47f7c7f38107ad71795108ba25b..a7690df7fb74afa5d54a55f11932b0023cf0a597 100644
--- a/media/cast/net/pacing/paced_sender.cc
+++ b/media/cast/net/pacing/paced_sender.cc
@@ -335,12 +335,17 @@ void PacedSender::LogPacketEvent(const Packet& packet, CastLoggingEvent type) {
base::BigEndianReader reader(reinterpret_cast<const char*>(&packet[0]),
packet.size());
bool success = reader.Skip(4);
- success &= reader.ReadU32(&event.rtp_timestamp);
+ uint32_t truncated_rtp_timestamp;
+ success &= reader.ReadU32(&truncated_rtp_timestamp);
uint32 ssrc;
success &= reader.ReadU32(&ssrc);
if (ssrc == audio_ssrc_) {
+ event.rtp_timestamp = last_logged_audio_rtp_timestamp_ =
+ last_logged_audio_rtp_timestamp_.Expand(truncated_rtp_timestamp);
event.media_type = AUDIO_EVENT;
} else if (ssrc == video_ssrc_) {
+ event.rtp_timestamp = last_logged_video_rtp_timestamp_ =
+ last_logged_video_rtp_timestamp_.Expand(truncated_rtp_timestamp);
event.media_type = VIDEO_EVENT;
} else {
DVLOG(3) << "Got unknown ssrc " << ssrc << " when logging packet event";

Powered by Google App Engine
This is Rietveld 408576698