SfxDecoderInterface.h 1.09 KB
#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