📄 encapi.h
字号:
/*------------------------------------------------------------------------------
-- --
-- This software is confidential and proprietary and may be used --
-- only as expressly authorized by a licensing agreement from --
-- --
-- Hantro Products Oy. --
-- --
-- In the event of publication, the following notice is applicable: --
-- --
-- (C) COPYRIGHT 2004 HANTRO PRODUCTS OY --
-- ALL RIGHTS RESERVED --
-- --
-- The entire notice above must be reproduced on all copies. --
-- --
--------------------------------------------------------------------------------
--
-- Description : Encoder internal
--
-------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
Table of context
1. Include headers
2. External compiler flags
3. Module defines
4. Function prototypes
------------------------------------------------------------------------------*/
#ifndef __ENC_API_H__
#define __ENC_API_H__
/*------------------------------------------------------------------------------
1. Include headers
------------------------------------------------------------------------------*/
#include "basetype.h"
#include "EncInstance.h"
/*------------------------------------------------------------------------------
2. External compiler flags
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
3. Module defines
------------------------------------------------------------------------------*/
/* Encoding schemes */
typedef enum {
MPEG4,
SVH,
MOMYSYS,
H263
} scheme_e;
/* Encoding parameter */
typedef struct {
u32 scheme;
u32 profile;
u32 width;
u32 height;
u32 outRateNum;
u32 outRateDenom;
u32 vpSize;
u32 dataPart;
u32 rvlc;
u32 hec;
u32 gob;
u32 cir;
u32 intraDcTrc;
u32 acPred;
u32 mvRange;
u32 mvOutVop;
u32 fourMv;
u32 zeroMvFavor;
u32 inter4vPenalty;
u32 intraPenalty;
u32 timeHour;
u32 timeMinute;
u32 timeSecond;
u32 bitPerSecond;
u32 vopRc;
u32 mbRc;
u32 videoBufferSize;
u32 vopSkip;
u32 qpHdr;
u32 qpHdrMin;
u32 qpHdrMax;
} parameter_s;
/* Encoder run time parameter */
typedef enum {
BITRATE,
QP,
VPSIZE,
HEC,
GOB,
TIMEHOUR,
TIMEMINUTE,
TIMESECOND,
TIMEHUNDREDTH
} parameter_e;
/* API config */
typedef enum {
VOS,
VISOBJ,
VIDOBJ,
VOL,
GOVOP,
VOSEND
} access_e;
/* API return values */
typedef enum {
VBV_ERROR = -2,
ERROR = -1,
READY = 0,
NOT_CODED = 1
} status_e;
/* User data */
typedef struct {
u8 *data; /* Pointer to data */
u32 byteCnt; /* User data byte size */
} usrData_s;
/* API stream buffer */
typedef struct {
u8 *stream; /* Stream buffer */
u32 size; /* Size of stream buffer (user set) */
u32 byteCnt; /* Used bytes (encoder set) */
} buffer_s;
/*------------------------------------------------------------------------------
4. Function prototypes
------------------------------------------------------------------------------*/
status_e EncApiInit(instance_s *inst, parameter_s *parameter);
status_e EncApiParameter(parameter_s *parameter, scheme_e scheme);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -