diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-12-22 18:21:41 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-12-22 18:21:41 +0000 |
commit | 1822c266c552a76cdbe75288515b5abfa9a41d5d (patch) | |
tree | 7c522487d3c1bdb54ec1d3fcb1220f6cc1abddd9 /mediaplugin/src/mediaplugins/include/core | |
parent | 71e7b0bb663197c4bbc4aad55082dd6424e0fb33 (diff) | |
download | usdx-1822c266c552a76cdbe75288515b5abfa9a41d5d.tar.gz usdx-1822c266c552a76cdbe75288515b5abfa9a41d5d.tar.xz usdx-1822c266c552a76cdbe75288515b5abfa9a41d5d.zip |
support for video pixel format selection
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@2767 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'mediaplugin/src/mediaplugins/include/core')
-rw-r--r-- | mediaplugin/src/mediaplugins/include/core/plugin_core.h | 15 | ||||
-rw-r--r-- | mediaplugin/src/mediaplugins/include/core/plugin_video_decode.h | 3 |
2 files changed, 16 insertions, 2 deletions
diff --git a/mediaplugin/src/mediaplugins/include/core/plugin_core.h b/mediaplugin/src/mediaplugins/include/core/plugin_core.h index acbe0f4a..c7d078b0 100644 --- a/mediaplugin/src/mediaplugins/include/core/plugin_core.h +++ b/mediaplugin/src/mediaplugins/include/core/plugin_core.h @@ -203,17 +203,30 @@ typedef struct audioConverterInfo_t { double PLUGIN_CALL (*getRatio)(audioConvertStream_t *stream); } audioConverterInfo_t; +typedef enum videoFrameFormat_t { + FRAME_FORMAT_UNKNOWN, + FRAME_FORMAT_RGB, // packed RGB 24bpp (R:8,G:8,B:8) + FRAME_FORMAT_RGBA, // packed RGBA 32bpp (R:8,G:8,B:8,A:8) + FRAME_FORMAT_BGR, // packed RGB 24bpp (B:8,G:8,R:8) + FRAME_FORMAT_BGRA, // packed BGRA 32bpp (B:8,G:8,R:8,A:8) +} videoFrameFormat_t; + +const int videoFrameFormatSize[5] = { + -1, 3, 4, 3, 4 +}; + typedef struct videoFrameInfo_t { int width; int height; double aspect; + videoFrameFormat_t format; } videoFrameInfo_t; typedef struct videoDecoderInfo_t { int priority; BOOL PLUGIN_CALL (*init)(); BOOL PLUGIN_CALL (*finalize)(); - videoDecodeStream_t* PLUGIN_CALL (*open)(const char *filename); + videoDecodeStream_t* PLUGIN_CALL (*open)(const char *filename, videoFrameFormat_t format); void PLUGIN_CALL (*close)(videoDecodeStream_t *stream); void PLUGIN_CALL (*setLoop)(videoDecodeStream_t *stream, BOOL enable); BOOL PLUGIN_CALL (*getLoop)(videoDecodeStream_t *stream); diff --git a/mediaplugin/src/mediaplugins/include/core/plugin_video_decode.h b/mediaplugin/src/mediaplugins/include/core/plugin_video_decode.h index 6403852f..a96daf6a 100644 --- a/mediaplugin/src/mediaplugins/include/core/plugin_video_decode.h +++ b/mediaplugin/src/mediaplugins/include/core/plugin_video_decode.h @@ -43,8 +43,9 @@ public: virtual int getFrameWidth() = 0; virtual int getFrameHeight() = 0; - virtual double getFrameAspect() = 0; + virtual videoFrameFormat_t getFrameFormat() = 0; + virtual uint8_t* getFrame(long double time) = 0; }; |