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

Unified Diff: media/base/timestamp_constants.h

Issue 2158923004: Convert media constants to constexpr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months 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/base/timestamp_constants.h
diff --git a/media/base/timestamp_constants.h b/media/base/timestamp_constants.h
index f5a1ab5d3ac65b85f0bb3ccc80fabb29a7ae0bff..a38fc44667b3ac914113338e89ac49b18e9b91db 100644
--- a/media/base/timestamp_constants.h
+++ b/media/base/timestamp_constants.h
@@ -10,19 +10,16 @@
#include <limits>
#include "base/time/time.h"
-#include "media/base/media_export.h"
namespace media {
// Indicates an invalid or missing timestamp.
-MEDIA_EXPORT inline base::TimeDelta kNoTimestamp() {
- return base::TimeDelta::FromMicroseconds(std::numeric_limits<int64_t>::min());
-}
+constexpr base::TimeDelta kNoTimestamp =
+ base::TimeDelta::FromMicroseconds(std::numeric_limits<int64_t>::min());
// Represents an infinite stream duration.
-MEDIA_EXPORT inline base::TimeDelta kInfiniteDuration() {
- return base::TimeDelta::Max();
-}
+constexpr base::TimeDelta kInfiniteDuration =
+ base::TimeDelta::FromMicroseconds(std::numeric_limits<int64_t>::max());
} // namespace media

Powered by Google App Engine
This is Rietveld 408576698