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

Unified Diff: media/cast/cast_defines.h

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: Fix in chrome_common.gypi to avoid building cast_messages.* on Android. 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/cast_defines.h
diff --git a/media/cast/cast_defines.h b/media/cast/cast_defines.h
index 2da7ddc5e715240c5d994f7a4d0cd578f5e7f76b..cef95b2fd55720a195058ca97a87ed7e468f568c 100644
--- a/media/cast/cast_defines.h
+++ b/media/cast/cast_defines.h
@@ -20,11 +20,6 @@ inline bool IsNewerFrameId(uint32_t frame_id, uint32_t prev_frame_id) {
static_cast<uint32_t>(frame_id - prev_frame_id) < 0x80000000;
}
-inline bool IsNewerRtpTimestamp(uint32_t timestamp, uint32_t prev_timestamp) {
- return (timestamp != prev_timestamp) &&
- static_cast<uint32_t>(timestamp - prev_timestamp) < 0x80000000;
-}
-
inline bool IsOlderFrameId(uint32_t frame_id, uint32_t prev_frame_id) {
return (frame_id == prev_frame_id) || IsNewerFrameId(prev_frame_id, frame_id);
}
@@ -40,17 +35,6 @@ inline bool IsNewerSequenceNumber(uint16_t sequence_number,
return IsNewerPacketId(sequence_number, prev_sequence_number);
}
-inline base::TimeDelta RtpDeltaToTimeDelta(int64_t rtp_delta,
- int rtp_timebase) {
- DCHECK_GT(rtp_timebase, 0);
- return rtp_delta * base::TimeDelta::FromSeconds(1) / rtp_timebase;
-}
-
-inline int64_t TimeDeltaToRtpDelta(base::TimeDelta delta, int rtp_timebase) {
- DCHECK_GT(rtp_timebase, 0);
- return delta * rtp_timebase / base::TimeDelta::FromSeconds(1);
-}
-
} // namespace cast
} // namespace media

Powered by Google App Engine
This is Rietveld 408576698