📄 encoder264.h
字号:
// The following ifdef block is the standard way of creating macros which make exporting
// from a DLL simpler. All files within this DLL are compiled with the ENCODER264_EXPORTS
// symbol defined on the command line. this symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see
// ENCODER264_API functions as being imported from a DLL, wheras this DLL sees symbols
// defined with this macro as being exported.
#ifdef ENCODER264_EXPORTS
#define ENCODER264_API __declspec(dllexport)
#else
#define ENCODER264_API __declspec(dllimport)
#endif
// This class is exported from the Encoder264.dll
class ENCODER264_API CEncoder264 {
public:
CEncoder264(void);
// TODO: add your methods here.
};
extern ENCODER264_API int nEncoder264;
ENCODER264_API int fnEncoder264(void);
//压缩完成事件
typedef int (* En_CompressEndHandler_t)(unsigned char* outBuf,int size);
//错误事件
typedef int (* En_CompressErrHandler_t)(int errNo);
extern "C" ENCODER264_API int En_Init(); //初始化
extern "C" ENCODER264_API int En_Exit(); //退出
extern "C" ENCODER264_API int En_SetDeFilter(bool bFilter); //是否去块效应过滤器
extern "C" ENCODER264_API int En_SetDeSave(bool bDeSave); //是否解码存储
extern "C" ENCODER264_API int En_SetHadama(bool bHadama); //是否哈德码变换
extern "C" ENCODER264_API int En_SetFormat(int format); //图形格式,0 QCIF,1 CIF
extern "C" ENCODER264_API int En_SetDrop(int dropNum); //跳帧设置
extern "C" ENCODER264_API int En_SetSearchRange(int range); //设置搜索范围
extern "C" ENCODER264_API int En_SetQP(int qp); //设置量化参数,默认28
extern "C" ENCODER264_API int En_SetForce(int force); //设置强制更新帧间隔
extern "C" ENCODER264_API int En_SetDisplay(bool b); //压缩时是否显示
extern "C" ENCODER264_API int En_StartSaveEncoder(char *saveFile); //开启存储264流
extern "C" ENCODER264_API int En_StopSaveEncoder(); //停止存储264流
extern "C" ENCODER264_API int En_SetCompressIn(char *InBuf); //设置原始图像缓冲区
//extern ENCODER264_API int En_SetCompressOut(char *OutBuf); //设置压缩图像压缩后缓冲区
extern "C" ENCODER264_API int En_StartEncoder(void); //开始压缩
extern "C" ENCODER264_API int En_StopEncoder(void); //停止压缩
extern "C" ENCODER264_API int En_RegCompressHandler(En_CompressEndHandler_t compressHandler);//注册压缩完成后事件处理函数
extern "C" ENCODER264_API int En_RegErrHandler(En_CompressErrHandler_t CompressErrHandler);//注册错误事件处理函数
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -