?? decore.h
字號(hào):
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _DECORE_H_
#define _DECORE_H_
#ifdef WIN32
#define STDCALL _stdcall
#else
#define STDCALL
#endif
#if ( (! defined (WIN32)) && (! defined (LINUX)) )
#define BIG_ENDIAN
#endif
/**
*
**/
// 解碼器選項(xiàng)
#define DEC_OPT_MEMORY_REQS 0x00004000
#define DEC_OPT_INIT 0x00008000
#define DEC_OPT_RELEASE 0x00010000
#define DEC_OPT_SETPP 0x00020000 // 設(shè)置后處理模式
#define DEC_OPT_SETOUT 0x00040000 // 設(shè)置輸出模式
// 解碼器返回值
#define DEC_OK 0
#define DEC_MEMORY 1
#define DEC_BAD_FORMAT 2
#define DEC_EXIT 3
// 解碼器YUV色彩格式
#define DEC_YUV2 1
#define DEC_UYVY 2
#define DEC_420 3
// 解碼器RGB色彩格式
#define DEC_RGB32 4
#define DEC_RGB24 5
#define DEC_RGB555 6
#define DEC_RGB565 7
#define DEC_RGB32_INV 8
#define DEC_RGB24_INV 9
#define DEC_RGB555_INV 10
#define DEC_RGB565_INV 11
#define DEC_MBC 45
#define DEC_MBR 36
/**
*
**/
//解碼器需要的內(nèi)存格式
typedef struct _DEC_MEM_REQS_
{
unsigned long mp4_edged_ref_buffers_size;
unsigned long mp4_edged_for_buffers_size;
unsigned long mp4_display_buffers_size;
unsigned long mp4_state_size;
unsigned long mp4_tables_size;
unsigned long mp4_stream_size;
} DEC_MEM_REQS;
// 解碼器的存儲(chǔ)器格式
typedef struct _DEC_BUFFERS_
{
void * mp4_edged_ref_buffers;
void * mp4_edged_for_buffers;
void * mp4_display_buffers;
void * mp4_state;
void * mp4_tables;
void * mp4_stream;
} DEC_BUFFERS;
//解碼器的參數(shù)
typedef struct _DEC_PARAM_
{
int x_dim; // 被解碼的幀的x軸的尺度
int y_dim; // 被解碼的幀的y軸的尺度
int output_format; // 輸出色彩的格式
int time_incr;
DEC_BUFFERS buffers;
} DEC_PARAM;
//解碼器幀
typedef struct _DEC_FRAME_
{
void *bmp; // 被解碼的位圖
void *bitstream; // 解碼器的緩沖
long length; // 解碼器流的長(zhǎng)度
int render_flag; // 1: 幀正在被渲染
unsigned int stride; // 被解碼的位圖的跨度
} DEC_FRAME;
// 解碼器設(shè)置
typedef struct _DEC_SET_
{
int postproc_level; // 有效間隔在[0..100]內(nèi)
} DEC_SET;
/**
*
**/
// decore()函數(shù)的原型,是主要的解碼器引擎的入口
int STDCALL decore(
unsigned long handle, // 調(diào)用實(shí)體的句柄,必需是唯一的
unsigned long dec_opt, // 解碼器的項(xiàng),參見(jiàn)下列參數(shù)
void *param1, // 依賴(lài)于dec_opt
void *param2); // 依賴(lài)于dec_opt
#endif // _DECORE_H_
#ifdef __cplusplus
}
#endif
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -