You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
954 B
C
41 lines
954 B
C
9 months ago
|
#pragma once
|
||
|
#include <windows.h>
|
||
|
|
||
|
#ifdef _DECODER_INTERFACE_EXPORT_
|
||
|
#define _DECODER_INTERFACE_ _declspec(dllexport)
|
||
|
#else
|
||
|
#define _DECODER_INTERFACE_ _declspec(dllimport)
|
||
|
#endif
|
||
|
|
||
|
typedef enum DecoderType
|
||
|
{
|
||
|
DEC_SOFTWARE = 0,
|
||
|
DEC_HARDWARE = 1,
|
||
|
}EnumDecoderType;
|
||
|
|
||
|
typedef void (*DecodeCallbackFun)(unsigned char* data,int width,int height);
|
||
|
|
||
|
class _DECODER_INTERFACE_ DecoderInterface
|
||
|
{
|
||
|
public:
|
||
|
DecoderInterface(void){};
|
||
|
~DecoderInterface(void){};
|
||
|
|
||
|
virtual bool init(int srcWth,int srcHth,int dstWth = 0,int dstHth = 0,int oPixFmt = 0,HWND hwnd = 0) = 0;
|
||
|
virtual void decoding(unsigned char* in_buf,int in_len) = 0;
|
||
|
virtual void release() = 0;
|
||
|
|
||
|
virtual void setDecodingCallback(DecodeCallbackFun fun) = 0;
|
||
|
};
|
||
|
|
||
|
class _DECODER_INTERFACE_ DecoderFactory
|
||
|
{
|
||
|
public:
|
||
|
DecoderFactory(void);
|
||
|
~DecoderFactory(void);
|
||
|
|
||
|
static DecoderInterface* CreateDecoder(EnumDecoderType type = DEC_SOFTWARE);
|
||
|
static void DestroyDecoder(DecoderInterface* deoder);
|
||
|
};
|
||
|
|