⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 decoder264.h

📁 h264编解码.用C++实现了图像的编解码功能。
💻 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 DECODER264_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 
// DECODER264_API functions as being imported from a DLL, wheras this DLL sees symbols
// defined with this macro as being exported.
#include "stdafx.h"

#ifdef DECODER264_EXPORTS
#define DECODER264_API __declspec(dllexport)
#else
#define DECODER264_API __declspec(dllimport)
#endif



// This class is exported from the Decoder264.dll
class DECODER264_API CDecoder264 {
public:
	CDecoder264(void);
	// TODO: add your methods here.
};

extern DECODER264_API int nDecoder264;

DECODER264_API int fnDecoder264(void);
#ifndef DECODER_H
#define DECODER_H


//错误代号定义
#define ERR_UNDEFINED_ERRFUNC	 -1 //无错误函数定义
#define ERR_UNDEFINED_ENDDECODER -2 //无解压完函数注册
#define ERR_SAVEFILE_ERROR		 -3 //存储文件错误

//#include "framefunc.h"
//解压完成后事件
typedef int (* De_FrameFinish_t)(unsigned char* Y,unsigned char* U,unsigned char* V);
//错误编号
typedef int (* De_ErrHandler_t)(char *errText,int errNo);



 //错误报告
 void ErrHandFunc(char *errText,int errNum);
 void FrameEndFunc(unsigned char* Y,unsigned char* U,unsigned char* V);

extern "C" DECODER264_API  int De_Init();						//解压初始化
extern "C" DECODER264_API  int De_RegErrHandler(De_ErrHandler_t errFunc);//错误处理事件注册
extern "C" DECODER264_API  int De_SetSave(bool bSave);			//true存储,false不存储
extern "C" DECODER264_API  int De_SetQCIF(bool QCif);			//设置图形格式QCIF 176*144,CIF 352*228
extern "C" DECODER264_API  int De_SetDisplay(bool bDisplay);	//true显示,false不显示
extern "C" DECODER264_API  int De_SetSaveFile(char* saveFile);	//设置存储名
extern "C" DECODER264_API  int De_DecoderFrame(char* bstream,int size);//解压 bstream,264数据流,size,数据流大小,pos数据流依稀位置,第一次调用时,设置Pos为0
extern "C" DECODER264_API  int De_RegDecoderEnd(De_FrameFinish_t De_FrameFinishFunc);
extern "C" DECODER264_API  void ConvertYUVtoRGB(unsigned char *src0, unsigned char *src1, unsigned char *src2, unsigned char *dst_ori, int width, int height );

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -