Chromium Code Reviews| Index: media/cast/cast_defines.h |
| diff --git a/media/cast/cast_defines.h b/media/cast/cast_defines.h |
| index 0778638551eec7f9559bb5e6190549c396a90baf..ac0f2166556f3dbc1509546a2b96ddbaede05f99 100644 |
| --- a/media/cast/cast_defines.h |
| +++ b/media/cast/cast_defines.h |
| @@ -58,12 +58,6 @@ typedef std::map<uint8, PacketIdSet> MissingFramesAndPacketsMap; |
| // fractional NTP seconds. |
| static const double kMagicFractionalUnit = 4.294967296E3; |
| -// Network Time Protocol (NTP), which is in seconds relative to 0h UTC on |
| -// 1 January 1900. |
| -static const int64 kNtpEpochDeltaSeconds = GG_INT64_C(9435484800); |
| -static const int64 kNtpEpochDeltaMicroseconds = |
| - kNtpEpochDeltaSeconds * base::Time::kMicrosecondsPerSecond; |
| - |
| inline bool IsNewerFrameId(uint8 frame_id, uint8 prev_frame_id) { |
| return (frame_id != prev_frame_id) && |
| static_cast<uint8>(frame_id - prev_frame_id) < 0x80; |
| @@ -110,7 +104,7 @@ inline void ConvertTimeToFractions(int64 time_us, |
| inline void ConvertTimeToNtp(const base::TimeTicks& time, |
| uint32* ntp_seconds, |
| uint32* ntp_fractions) { |
| - int64 time_us = time.ToInternalValue() - kNtpEpochDeltaMicroseconds; |
| + int64 time_us = time.ToInternalValue(); |
|
miu
2013/10/23 18:24:02
IMHO, it's much cleaner to work with only one time
pwestin
2013/10/23 21:07:49
Removed this function since it did not provide any
|
| ConvertTimeToFractions(time_us, ntp_seconds, ntp_fractions); |
| } |
| @@ -119,8 +113,7 @@ inline base::TimeTicks ConvertNtpToTime(uint32 ntp_seconds, |
| int64 ntp_time_us = static_cast<int64>(ntp_seconds) * |
| base::Time::kMicrosecondsPerSecond; |
| ntp_time_us += static_cast<int64>(ntp_fractions) / kMagicFractionalUnit; |
| - return base::TimeTicks::FromInternalValue(ntp_time_us + |
| - kNtpEpochDeltaMicroseconds); |
| + return base::TimeTicks::FromInternalValue(ntp_time_us); |
| } |
| } // namespace cast |