--- trunk/xvidcore/src/xvid.h 2011/11/04 15:23:46 2053 +++ trunk/xvidcore/src/xvid.h 2011/11/04 15:24:39 2054 @@ -26,12 +26,25 @@ #ifndef _XVID_H_ #define _XVID_H_ - #ifdef __cplusplus extern "C" { #endif /***************************************************************************** + * function export defines + ****************************************************************************/ + +/* Attention! Work in progress. TODO: Review */ + +#ifndef XVID_IMPEXP +#define XVID_IMPEXP extern +#endif + +#ifndef XVID_CALL +#define XVID_CALL +#endif + +/***************************************************************************** * versioning ****************************************************************************/ @@ -73,7 +86,7 @@ * doesnt hurt but not increasing it could cause difficulty for decoders in the * future */ -#define XVID_BS_VERSION 72 +#define XVID_BS_VERSION 73 /***************************************************************************** * error codes @@ -225,7 +238,7 @@ #define XVID_GBL_INFO 1 /* return some info about xvidcore, and the host computer */ #define XVID_GBL_CONVERT 2 /* colorspace conversion utility */ -extern int xvid_global(void *handle, int opt, void *param1, void *param2); +XVID_IMPEXP int XVID_CALL xvid_global(void *handle, int opt, void *param1, void *param2); /***************************************************************************** @@ -236,7 +249,7 @@ #define XVID_DEC_DESTROY 1 /* destroy decore instance: return 0 on success */ #define XVID_DEC_DECODE 2 /* decode a frame: returns number of bytes consumed >= 0 */ -extern int xvid_decore(void *handle, int opt, void *param1, void *param2); +XVID_IMPEXP int XVID_CALL xvid_decore(void *handle, int opt, void *param1, void *param2); /* XVID_DEC_CREATE param 1 image width & height as well as FourCC code may be specified @@ -475,7 +488,7 @@ ****************************************************************************/ -typedef int (xvid_plugin_func)(void * handle, int opt, void * param1, void * param2); +typedef int (XVID_CALL xvid_plugin_func)(void * handle, int opt, void * param1, void * param2); typedef struct { @@ -483,18 +496,17 @@ void * param; } xvid_enc_plugin_t; +XVID_IMPEXP xvid_plugin_func xvid_plugin_single; /* single-pass rate control */ +XVID_IMPEXP xvid_plugin_func xvid_plugin_2pass1; /* two-pass rate control: first pass */ +XVID_IMPEXP xvid_plugin_func xvid_plugin_2pass2; /* two-pass rate control: second pass */ -extern xvid_plugin_func xvid_plugin_single; /* single-pass rate control */ -extern xvid_plugin_func xvid_plugin_2pass1; /* two-pass rate control: first pass */ -extern xvid_plugin_func xvid_plugin_2pass2; /* two-pass rate control: second pass */ - -extern xvid_plugin_func xvid_plugin_lumimasking; /* lumimasking */ +XVID_IMPEXP xvid_plugin_func xvid_plugin_lumimasking; /* lumimasking */ -extern xvid_plugin_func xvid_plugin_psnr; /* write psnr values to stdout */ -extern xvid_plugin_func xvid_plugin_dump; /* dump before and after yuvpgms */ +XVID_IMPEXP xvid_plugin_func xvid_plugin_psnr; /* write psnr values to stdout */ +XVID_IMPEXP xvid_plugin_func xvid_plugin_dump; /* dump before and after yuvpgms */ -extern xvid_plugin_func xvid_plugin_ssim; /*write ssim values to stdout*/ -extern xvid_plugin_func xvid_plugin_psnrhvsm; /*write psnrhvsm values to stdout*/ +XVID_IMPEXP xvid_plugin_func xvid_plugin_ssim; /*write ssim values to stdout*/ +XVID_IMPEXP xvid_plugin_func xvid_plugin_psnrhvsm; /*write psnrhvsm values to stdout*/ /* single pass rate control @@ -591,7 +603,7 @@ * Encoder entry point *--------------------------------------------------------------------------*/ -extern int xvid_encore(void *handle, int opt, void *param1, void *param2); +XVID_IMPEXP int XVID_CALL xvid_encore(void *handle, int opt, void *param1, void *param2); /* Quick API reference *