vpx_codec.h: namespace local defines
add VPX_ to UNUSED/*DEPRECATED to avoid conflicts with other headers. Change-Id: Ie16bdac3575bc1af57a05d37e65b994370585377
This commit is contained in:
parent
e095bcce44
commit
e8ed030da3
@ -46,34 +46,35 @@ extern "C" {
|
||||
#include "./vpx_integer.h"
|
||||
|
||||
/*!\brief Decorator indicating a function is deprecated */
|
||||
#ifndef DEPRECATED
|
||||
#ifndef VPX_DEPRECATED
|
||||
#if defined(__GNUC__) && __GNUC__
|
||||
#define DEPRECATED __attribute__((deprecated))
|
||||
#define VPX_DEPRECATED __attribute__((deprecated))
|
||||
#elif defined(_MSC_VER)
|
||||
#define DEPRECATED
|
||||
#define VPX_DEPRECATED
|
||||
#else
|
||||
#define DEPRECATED
|
||||
#define VPX_DEPRECATED
|
||||
#endif
|
||||
#endif /* DEPRECATED */
|
||||
#endif /* VPX_DEPRECATED */
|
||||
|
||||
#ifndef DECLSPEC_DEPRECATED
|
||||
#ifndef VPX_DECLSPEC_DEPRECATED
|
||||
#if defined(__GNUC__) && __GNUC__
|
||||
#define DECLSPEC_DEPRECATED /**< \copydoc #DEPRECATED */
|
||||
#define VPX_DECLSPEC_DEPRECATED /**< \copydoc #VPX_DEPRECATED */
|
||||
#elif defined(_MSC_VER)
|
||||
/*!\brief \copydoc #DEPRECATED */
|
||||
#define DECLSPEC_DEPRECATED __declspec(deprecated)
|
||||
/*!\brief \copydoc #VPX_DEPRECATED */
|
||||
#define VPX_DECLSPEC_DEPRECATED __declspec(deprecated)
|
||||
#else
|
||||
#define DECLSPEC_DEPRECATED /**< \copydoc #DEPRECATED */
|
||||
#define VPX_DECLSPEC_DEPRECATED /**< \copydoc #VPX_DEPRECATED */
|
||||
#endif
|
||||
#endif /* DECLSPEC_DEPRECATED */
|
||||
#endif /* VPX_DECLSPEC_DEPRECATED */
|
||||
|
||||
/*!\brief Decorator indicating a function is potentially unused */
|
||||
#ifdef UNUSED
|
||||
#elif defined(__GNUC__) || defined(__clang__)
|
||||
#define UNUSED __attribute__((unused))
|
||||
#ifndef VPX_UNUSED
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
#define VPX_UNUSED __attribute__((unused))
|
||||
#else
|
||||
#define UNUSED
|
||||
#define VPX_UNUSED
|
||||
#endif
|
||||
#endif /* VPX_UNUSED */
|
||||
|
||||
/*!\brief Current ABI version number
|
||||
*
|
||||
@ -413,7 +414,7 @@ vpx_codec_err_t vpx_codec_control_(vpx_codec_ctx_t *ctx, int ctrl_id, ...);
|
||||
*/
|
||||
#define VPX_CTRL_USE_TYPE(id, typ) \
|
||||
static vpx_codec_err_t vpx_codec_control_##id(vpx_codec_ctx_t *, int, typ) \
|
||||
UNUSED; \
|
||||
VPX_UNUSED; \
|
||||
\
|
||||
static vpx_codec_err_t vpx_codec_control_##id(vpx_codec_ctx_t *ctx, \
|
||||
int ctrl_id, typ data) { \
|
||||
@ -430,13 +431,13 @@ vpx_codec_err_t vpx_codec_control_(vpx_codec_ctx_t *ctx, int ctrl_id, ...);
|
||||
* It defines a static function with the correctly typed arguments as a
|
||||
* wrapper to the type-unsafe internal function.
|
||||
*/
|
||||
#define VPX_CTRL_USE_TYPE_DEPRECATED(id, typ) \
|
||||
DECLSPEC_DEPRECATED static vpx_codec_err_t vpx_codec_control_##id( \
|
||||
vpx_codec_ctx_t *, int, typ) DEPRECATED UNUSED; \
|
||||
\
|
||||
DECLSPEC_DEPRECATED static vpx_codec_err_t vpx_codec_control_##id( \
|
||||
vpx_codec_ctx_t *ctx, int ctrl_id, typ data) { \
|
||||
return vpx_codec_control_(ctx, ctrl_id, data); \
|
||||
#define VPX_CTRL_USE_TYPE_DEPRECATED(id, typ) \
|
||||
VPX_DECLSPEC_DEPRECATED static vpx_codec_err_t vpx_codec_control_##id( \
|
||||
vpx_codec_ctx_t *, int, typ) VPX_DEPRECATED VPX_UNUSED; \
|
||||
\
|
||||
VPX_DECLSPEC_DEPRECATED static vpx_codec_err_t vpx_codec_control_##id( \
|
||||
vpx_codec_ctx_t *ctx, int ctrl_id, typ data) { \
|
||||
return vpx_codec_control_(ctx, ctrl_id, data); \
|
||||
} /**<\hideinitializer*/
|
||||
|
||||
/*!\brief vpx_codec_control void type definition macro
|
||||
@ -451,7 +452,7 @@ vpx_codec_err_t vpx_codec_control_(vpx_codec_ctx_t *ctx, int ctrl_id, ...);
|
||||
*/
|
||||
#define VPX_CTRL_VOID(id) \
|
||||
static vpx_codec_err_t vpx_codec_control_##id(vpx_codec_ctx_t *, int) \
|
||||
UNUSED; \
|
||||
VPX_UNUSED; \
|
||||
\
|
||||
static vpx_codec_err_t vpx_codec_control_##id(vpx_codec_ctx_t *ctx, \
|
||||
int ctrl_id) { \
|
||||
|
Loading…
x
Reference in New Issue
Block a user