OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MEDIA_BASE_TIMESTAMP_CONSTANTS_H_ | 5 #ifndef MEDIA_BASE_TIMESTAMP_CONSTANTS_H_ |
6 #define MEDIA_BASE_TIMESTAMP_CONSTANTS_H_ | 6 #define MEDIA_BASE_TIMESTAMP_CONSTANTS_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 10 #include <limits> |
| 11 |
8 #include "base/time/time.h" | 12 #include "base/time/time.h" |
9 #include "media/base/media_export.h" | 13 #include "media/base/media_export.h" |
10 | 14 |
11 namespace media { | 15 namespace media { |
12 | 16 |
13 // Indicates an invalid or missing timestamp. | 17 // Indicates an invalid or missing timestamp. |
14 MEDIA_EXPORT inline base::TimeDelta kNoTimestamp() { | 18 MEDIA_EXPORT inline base::TimeDelta kNoTimestamp() { |
15 return base::TimeDelta::FromMicroseconds(kint64min); | 19 return base::TimeDelta::FromMicroseconds(std::numeric_limits<int64_t>::min()); |
16 } | 20 } |
17 | 21 |
18 // Represents an infinite stream duration. | 22 // Represents an infinite stream duration. |
19 MEDIA_EXPORT inline base::TimeDelta kInfiniteDuration() { | 23 MEDIA_EXPORT inline base::TimeDelta kInfiniteDuration() { |
20 return base::TimeDelta::Max(); | 24 return base::TimeDelta::Max(); |
21 } | 25 } |
22 | 26 |
23 } // namespace media | 27 } // namespace media |
24 | 28 |
25 #endif // MEDIA_BASE_TIMESTAMP_CONSTANTS_H_ | 29 #endif // MEDIA_BASE_TIMESTAMP_CONSTANTS_H_ |
OLD | NEW |