Index: media/base/video_frame.h |
diff --git a/media/base/video_frame.h b/media/base/video_frame.h |
index 366a356735ab9ab1e8c57039321d779202005022..8470d1bb140015602934208ea1c09b1b08330d7b 100644 |
--- a/media/base/video_frame.h |
+++ b/media/base/video_frame.h |
@@ -11,6 +11,7 @@ |
#include "base/md5.h" |
#include "base/memory/shared_memory.h" |
#include "base/synchronization/lock.h" |
+#include "base/values.h" |
#include "media/base/buffers.h" |
#include "ui/gfx/geometry/rect.h" |
#include "ui/gfx/geometry/size.h" |
@@ -68,6 +69,11 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> { |
FORMAT_MAX = YV12HD, // Must always be equal to largest entry logged. |
}; |
+ // Key for getting/setting the frame rate value (of type DoubleValue) in the |
+ // metadata dictionary. The value represents either the fixed frame rate, or |
+ // the maximum frame rate to expect from a variable-rate source. |
+ static const char kFrameRateMetadataKey[]; |
+ |
// Returns the name of a Format as a string. |
static std::string FormatToString(Format format); |
@@ -288,6 +294,15 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> { |
// Returns the offset into the shared memory where the frame data begins. |
size_t shared_memory_offset() const; |
+ // Returns a dictionary of optional metadata. This contains information |
+ // associated with the frame that downstream clients might use for frame-level |
+ // logging, quality/performance optimizations, signaling, etc. |
+ // |
+ // TODO(miu): Move some of the "extra" members of VideoFrame (below) into |
+ // here as a later clean-up step. |
+ const base::DictionaryValue& metadata() const { return metadata_; } |
+ base::DictionaryValue& metadata() { return metadata_; } |
+ |
bool allow_overlay() const { return allow_overlay_; } |
#if defined(OS_POSIX) |
@@ -403,6 +418,8 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> { |
const bool end_of_stream_; |
+ base::DictionaryValue metadata_; |
+ |
bool allow_overlay_; |
DISALLOW_IMPLICIT_CONSTRUCTORS(VideoFrame); |