69 lines
2.7 KiB
C
Executable File
69 lines
2.7 KiB
C
Executable File
#ifndef _PHOTOFAST_H_
|
|
#define _PHOTOFAST_H_
|
|
#include <kwrap/type.h>
|
|
#include "hd_common.h"
|
|
#include "UIAppPhoto.h"
|
|
#include <vf_gfx.h>
|
|
#include "DCF.h"
|
|
|
|
#define FLGPHOTOFAST_CHGMODE 0x00000001
|
|
#define FLGPHOTOFAST_SHUTDOWN 0x00000002
|
|
|
|
#define FLGPHOTOFAST_MASK FLGPTN_BIT_ALL
|
|
#define PHOTOFAST_AE_PRESET_FRAME_CNT 11 /* lock AE */
|
|
#define PHOTOFAST_START_CAP_FRAME_CNT (PHOTOFAST_AE_PRESET_FRAME_CNT + 3*2) /* capture frame, it should be larger than PHOTOFAST_AE_PRESET_FRAME_CNT by 3 */
|
|
#define PHOTOFAST_HD_PUSH_PULL_TIMEOUT_MS 6000
|
|
|
|
// Naming rule & FileDB
|
|
typedef struct {
|
|
BOOL bIsSortBySn;
|
|
CHAR* SortSN_Delim; ///< The delimiter string, e.g. underline "_", "AA"
|
|
INT32 SortSN_DelimCount; ///< The delimiter count to find the serial number
|
|
INT32 SortSN_CharNumOfSN; ///< The character number of the serial number
|
|
} _FDB_SN_FASTBOOT;
|
|
|
|
typedef struct _PBVIEW_HD_COM_BUF{
|
|
UINT32 pa;
|
|
UINT32 va;
|
|
UINT32 blk_size;
|
|
HD_COMMON_MEM_VB_BLK blk; //block ID
|
|
}PHOTOFAST_HD_COM_BUF, *PPHOTOFAST_HD_COM_BUF;
|
|
|
|
/**
|
|
bit rate control method
|
|
*/
|
|
typedef enum _PHOTOFAST_REENCTYPE {
|
|
PHOTOFAST_REENCTYPE_FIXQ = 0, ///< depend on #CAP_SEL_QUALITY, encode jpeg file
|
|
PHOTOFAST_REENCTYPE_RHO, ///< depend on CAP_SEL_RHO_xxxxx parameters, encode jpeg file
|
|
PHOTOFAST_REENCTYPE_MAX_CNT,
|
|
ENUM_DUMMY4WORD(PHOTOFAST_SEL_REENCTYPE)
|
|
} PHOTOFAST_SEL_REENCTYPE;
|
|
|
|
typedef struct _PHOTOFAST_ENC_SET{
|
|
UINT32 reenctype;
|
|
UINT32 rho_targetbitrate;
|
|
UINT32 rho_initqf;
|
|
UINT32 rho_initqf_step;
|
|
UINT32 rho_lboundsize;
|
|
UINT32 rho_hboundsize;
|
|
UINT32 rho_retrycnt;
|
|
PHOTO_ENC_JPG_TYPE EncJpgType;
|
|
}PHOTOFAST_ENC_INFO, *PPHOTOFAST_ENC_INFO;
|
|
|
|
extern void PhotoFast_Cal_Jpg_Size(USIZE *psrc, USIZE *pdest , URECT *pdestwin);
|
|
extern ER PhotoFast_Scale_YUV(VF_GFX_SCALE *pscale, HD_VIDEO_FRAME *psrc, PHOTOFAST_HD_COM_BUF *pComBufInfo, USIZE *pdest_sz, URECT *pdestwin, HD_VIDEO_PXLFMT pxl_fmt);
|
|
extern THREAD_RETTYPE PhotoFast_InitFileNamingThread(void *arg);
|
|
extern THREAD_RETTYPE PhotoFast_EncodeBsPullThread(void *arg);
|
|
extern THREAD_RETTYPE PhotoFast_FlowPreviewThread(void *arg);
|
|
extern void PhotoFast_PhotoClose(void);
|
|
|
|
extern BOOL PhotoFast_SetTick(UINT32 cnt, VOS_TICK tick); /* start from 1 */
|
|
extern BOOL PhotoFast_GetTick(UINT32 cnt, VOS_TICK* tick); /* start from 1 */
|
|
extern BOOL PhotoFast_SetTriggerFrmCnt(UINT32 cnt); /* trigger vcap frame count , get from HD_VIDEO_FRAME */
|
|
UINT32 PhotoFast_GetTriggerFrmCnt(VOID);
|
|
extern UINT32 PhotoFast_GetTickBufSize(void);
|
|
ER PhotoFast_Movie_Init(void);
|
|
DCF_HANDLE PhotoFast_Get_DCF_Handle(void);
|
|
|
|
#endif //_UIAPP_PHOTO_H_
|