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

Unified Diff: media/cast/cast_defines.h

Issue 1534273002: Switch to standard integer types in media/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more 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 68607977ecb287c6cff2df5814ce298af1760ae7..d839b5908da7402a6180941a7f6013462081b661 100644
--- a/media/cast/cast_defines.h
+++ b/media/cast/cast_defines.h
@@ -13,37 +13,38 @@ namespace cast {
// TODO(miu): All remaining functions in this file are to be replaced with
// methods in well-defined data types. http://crbug.com/530839
-inline bool IsNewerFrameId(uint32 frame_id, uint32 prev_frame_id) {
+inline bool IsNewerFrameId(uint32_t frame_id, uint32_t prev_frame_id) {
return (frame_id != prev_frame_id) &&
- static_cast<uint32>(frame_id - prev_frame_id) < 0x80000000;
+ static_cast<uint32_t>(frame_id - prev_frame_id) < 0x80000000;
}
-inline bool IsNewerRtpTimestamp(uint32 timestamp, uint32 prev_timestamp) {
+inline bool IsNewerRtpTimestamp(uint32_t timestamp, uint32_t prev_timestamp) {
return (timestamp != prev_timestamp) &&
- static_cast<uint32>(timestamp - prev_timestamp) < 0x80000000;
+ static_cast<uint32_t>(timestamp - prev_timestamp) < 0x80000000;
}
-inline bool IsOlderFrameId(uint32 frame_id, uint32 prev_frame_id) {
+inline bool IsOlderFrameId(uint32_t frame_id, uint32_t prev_frame_id) {
return (frame_id == prev_frame_id) || IsNewerFrameId(prev_frame_id, frame_id);
}
-inline bool IsNewerPacketId(uint16 packet_id, uint16 prev_packet_id) {
+inline bool IsNewerPacketId(uint16_t packet_id, uint16_t prev_packet_id) {
return (packet_id != prev_packet_id) &&
- static_cast<uint16>(packet_id - prev_packet_id) < 0x8000;
+ static_cast<uint16_t>(packet_id - prev_packet_id) < 0x8000;
}
-inline bool IsNewerSequenceNumber(uint16 sequence_number,
- uint16 prev_sequence_number) {
+inline bool IsNewerSequenceNumber(uint16_t sequence_number,
+ uint16_t prev_sequence_number) {
// Same function as IsNewerPacketId just different data and name.
return IsNewerPacketId(sequence_number, prev_sequence_number);
}
-inline base::TimeDelta RtpDeltaToTimeDelta(int64 rtp_delta, int rtp_timebase) {
+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 TimeDeltaToRtpDelta(base::TimeDelta delta, int 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);
}

Powered by Google App Engine
This is Rietveld 408576698