00001 00018 #ifndef _LIBQDEC_H_ 00019 #define _LIBQDEC_H_ 00020 00021 #include "../common/FourCC.h" 00022 #include "../common/FormatInfo.h" 00023 00024 #ifdef __cplusplus 00025 extern "C" { 00026 #endif 00027 00028 // Decoder method specifiers (parameter \ref DecOpt) 00029 00030 #define DEC_OPT_INIT 0 00031 #define DEC_OPT_RELEASE 1 00032 #define DEC_OPT_INFO 2 00033 #define DEC_OPT_FRAME 3 00034 #define DEC_OPT_SET 4 00035 #define DEC_OPT_FLUSH 5 00036 00037 // Decoder parameter specifier 00038 00039 #define DEC_PAR_OUTPUT 0 00040 #define DEC_PAR_POSTPROCESSING 1 00041 #define DEC_PAR_POSTPROCDEBLOC 2 00042 #define DEC_PAR_POSTPROCDERING 3 00043 #define DEC_PAR_WARMTHLEVEL 4 00044 #define DEC_PAR_CONTRAST 5 00045 #define DEC_PAR_BRIGHTNESS 6 00046 #define DEC_PAR_SATURATION 7 00047 #define DEC_PAR_LOGO 8 00048 #define DEC_PAR_SMOOTH 9 00049 #define DEC_PAR_SHOWPP 10 00050 00051 // Decoder return values. 00052 00053 #define DEC_OK 0 00054 #define DEC_INVALID_SYNTAX -1 00055 #define DEC_FAIL 1 00056 #define DEC_INVALID_ARGUMENT 3 00057 #define DEC_NOT_IMPLEMENTED 4 00058 00061 typedef struct DecInit 00062 { 00063 FormatInfo formatOut; 00064 FormatInfo formatIn; 00065 int isQ; 00066 } 00067 DecInit; 00068 00070 typedef struct DecBitstream 00071 { 00072 void* pBuff; 00073 int iLength; 00074 } 00075 DecBitstream; 00076 00078 typedef struct DecInfo 00079 { 00080 DecBitstream bitstream; 00081 FormatInfo formatOut; 00082 } 00083 DecInfo; 00084 00087 typedef struct DecFrame 00088 { 00089 DecBitstream bitstream; 00090 void* pBmp; 00091 int bmpStride; 00092 int bConstBitstream; 00093 int bBitstreamUpdated; 00094 int bBitstreamIsEOS; 00095 int frameWasDecoded; 00096 int timestampDisplay; 00097 int shallowDecode; 00098 int bSingleFrame; 00099 } 00100 DecFrame; 00101 00222 typedef int (LibQDecoreFunction)(void* pHandle, int decOpt, void* pParam1, void* pParam2); 00223 00224 00228 LibQDecoreFunction* getDecore(unsigned long fccFormat); 00229 00230 00231 #ifdef __cplusplus 00232 } 00233 #endif 00234 00235 #endif // _LIBQDEC_H_