SfxDecoderInterface.h
1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef __SFX__SfxDecoderInterface__MODULE__
#define __SFX__SfxDecoderInterface__MODULE__
#include <SfxStd/SfxMediaStd.h>
#ifdef __cplusplus
extern "C"
{
#endif
#ifdef SFX_WIN
#ifdef SFX_EXPORT_SHARE_LIB
#define SFX_EXPORT_LIB __declspec(dllexport)
#else
#define SFX_EXPORT_LIB __declspec(dllimport)
#endif
#endif
#ifdef SFX_LINUX
#define SFX_EXPORT_LIB
#endif
class SFX_EXPORT_LIB SfxDecoderInterface
{
public:
static SfxDecoderInterface * SfxGetDecoderInstance( const SfxCodecConfig * cfg );
static sfx_void SfxReleaseDecoderInstance( SfxDecoderInterface * sfx );
virtual ~SfxDecoderInterface() {};
virtual sfx_32 SfxOpenDecoder() = 0;
virtual sfx_32 SfxCloseDecoder() = 0;
virtual sfx_32 SfxSetupAccelerator( SfxAcceleratorType type, sfx_void * accel ){ return SFX_RLT_OK; };
virtual sfx_32 SfxDecode( const sfx_u8 * buf, sfx_u32 len ) = 0;
virtual sfx_32 SfxGetLastError() const = 0;
};
sfx_32 SFX_EXPORT_LIB SfxDecodeJpegFile( const sfx_8 * img, SfxVideoFormat fmt, sfx_u8 ** out, sfx_u16 * width, sfx_u16 * height );
#ifdef __cplusplus
}
#endif
#endif