summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--media/video/video_decode_accelerator.h18
-rw-r--r--ppapi/c/dev/pp_video_dev.h20
2 files changed, 30 insertions, 8 deletions
diff --git a/media/video/video_decode_accelerator.h b/media/video/video_decode_accelerator.h
index 8f01d2a..032ee24 100644
--- a/media/video/video_decode_accelerator.h
+++ b/media/video/video_decode_accelerator.h
@@ -17,6 +17,9 @@ namespace media {
// Enumeration defining global dictionary ranges for various purposes that are
// used to handle the configurations of the video decoder.
+//
+// IMPORTANT! Dictionary keys and corresponding values MUST match the ones found
+// in Pepper API dictionary for video (ppapi/c/dev/pp_video_dev.h)!
enum VideoAttributeKey {
VIDEOATTRIBUTEKEY_TERMINATOR = 0,
@@ -72,10 +75,9 @@ enum VideoAttributeKey {
VIDEOATTRIBUTEKEY_BITSTREAMFORMAT_H264_FEATURE_WEIGHTEDPREDICTION,
VIDEOATTRIBUTEKEY_COLOR_FORMAT_BASE = 0x1000,
- // This specifies the output color format for a decoded frame.
- // When used in GetConfigs, this represents the color types the
- // Decode is capable of decoding.
- VIDEOATTRIBUTEKEY_COLORFORMAT_RGBA,
+ // This specifies the output color format for a decoded frame. Value is one
+ // of the values in VideoColorFormat enumeration.
+ VIDEOATTRIBUTEKEY_VIDEOCOLORFORMAT,
};
enum VideoCodecFourcc {
@@ -148,6 +150,14 @@ enum H264PayloadFormat {
H264PAYLOADFORMAT_FOUR_BYTE_INTERLEAVED_LENGTH = 1 << 4,
};
+// Enumeration for various color formats.
+enum VideoColorFormat {
+ // Value represents 32-bit RGBA format where each component is 8-bit in order
+ // R-G-B-A. Regardless of endianness of the architecture color components are
+ // stored in this order in the memory.
+ VIDEOCOLORFORMAT_RGBA = 0,
+};
+
// Video decoder interface.
// This interface is extended by the various components that ultimately
// implement the backend of PPB_VideoDecode_Dev.
diff --git a/ppapi/c/dev/pp_video_dev.h b/ppapi/c/dev/pp_video_dev.h
index 49eec11..4bf1cf3 100644
--- a/ppapi/c/dev/pp_video_dev.h
+++ b/ppapi/c/dev/pp_video_dev.h
@@ -15,6 +15,10 @@
// Enumeration defining global dictionary ranges for various purposes that are
// used to handle the configurations of the video decoder.
+//
+// IMPORTANT! Dictionary keys and corresponding values MUST match the ones found
+// in VideoDecodeAccelerator interface in Chromium media stack
+// (media/video/video_decode_accelerator.h)!
enum PP_VideoAttributeDictionary {
PP_VIDEOATTR_DICTIONARY_TERMINATOR = 0,
@@ -70,10 +74,9 @@ enum PP_VideoAttributeDictionary {
PP_VIDEOATTR_BITSTREAMFORMATKEY_H264_FEATURE_WEIGHTEDPREDICTION,
PP_VIDEOATTR_DICTIONARY_COLOR_FORMAT_BASE = 0x1000,
- // This specifies the output color format for a decoded frame.
- //
- // Value represents 32-bit RGBA format where each component is 8-bit.
- PP_VIDEOATTR_COLORFORMAT_RGBA
+ // This specifies the output color format for a decoded frame. Value is one
+ // of the values in PP_ColorFormat_Dev enumeration.
+ PP_VIDEOATTR_PICTUREFORMATKEY_COLORFORMAT
};
PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES(PP_VideoAttributeDictionary, 4);
typedef int32_t PP_VideoConfigElement;
@@ -153,6 +156,15 @@ enum PP_H264PayloadFormat_Dev {
};
PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES(PP_H264PayloadFormat_Dev, 4);
+// Enumeration for various color formats.
+enum PP_ColorFormat_Dev {
+ // Value represents 32-bit RGBA format where each component is 8-bit in order
+ // R-G-B-A. Regardless of endianness of the architecture color components are
+ // stored in this order in the memory.
+ PP_VIDEOATTR_COLORFORMAT_RGBA = 0
+};
+PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES(PP_ColorFormat_Dev, 4);
+
// Enumeration to determine which type of memory for buffer is used.
enum PP_PictureBufferType_Dev {
PP_PICTUREBUFFERTYPE_NONE = 0,