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> | 8 #include <stdint.h> |
9 | 9 |
10 #include <limits> | 10 #include <limits> |
11 | 11 |
12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
13 #include "media/base/media_export.h" | |
14 | 13 |
15 namespace media { | 14 namespace media { |
16 | 15 |
17 // Indicates an invalid or missing timestamp. | 16 // Indicates an invalid or missing timestamp. |
18 MEDIA_EXPORT inline base::TimeDelta kNoTimestamp() { | 17 constexpr base::TimeDelta kNoTimestamp = |
19 return base::TimeDelta::FromMicroseconds(std::numeric_limits<int64_t>::min()); | 18 base::TimeDelta::FromMicroseconds(std::numeric_limits<int64_t>::min()); |
20 } | |
21 | 19 |
22 // Represents an infinite stream duration. | 20 // Represents an infinite stream duration. |
23 MEDIA_EXPORT inline base::TimeDelta kInfiniteDuration() { | 21 constexpr base::TimeDelta kInfiniteDuration = |
24 return base::TimeDelta::Max(); | 22 base::TimeDelta::FromMicroseconds(std::numeric_limits<int64_t>::max()); |
25 } | |
26 | 23 |
27 } // namespace media | 24 } // namespace media |
28 | 25 |
29 #endif // MEDIA_BASE_TIMESTAMP_CONSTANTS_H_ | 26 #endif // MEDIA_BASE_TIMESTAMP_CONSTANTS_H_ |
OLD | NEW |