summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvmr@chromium.org <vmr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-31 18:37:28 +0000
committervmr@chromium.org <vmr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-31 18:37:28 +0000
commitd88c5b9b82f505fc45426287386ad10d0aa0dc46 (patch)
tree9fe74fb5cc0263a9dcaad200b1df6ce9105b6c3f
parente9ebe0528580a7fbcc92f9fceb717745a2d2d17d (diff)
downloadchromium_src-d88c5b9b82f505fc45426287386ad10d0aa0dc46.zip
chromium_src-d88c5b9b82f505fc45426287386ad10d0aa0dc46.tar.gz
chromium_src-d88c5b9b82f505fc45426287386ad10d0aa0dc46.tar.bz2
Small fix on Pepper Video Decoder API data types.
Dictionary had a value for colorformat. Added dictionary key for values which are now defined in separate enumeration. BUG= TEST=make -j16 chrome (affected functionality not used currently) Review URL: http://codereview.chromium.org/6965013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87333 0039d316-1c4b-4281-b951-d872f2087c98
-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,