diff options
author | Mark Thompson <sw@jkqxz.net> | 2017-06-19 19:09:12 +0100 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2017-09-27 12:48:16 +0800 |
commit | b0e7feda096d7ae8146ba2e0c22b7bd59b768950 (patch) | |
tree | ede6e8ec07bbb4b449263c3b657a507a8b1557cd | |
parent | 0190b72c557450d4b82c8dc26a5ebaac3df904ec (diff) | |
download | libva-b0e7feda096d7ae8146ba2e0c22b7bd59b768950.tar.gz |
Move some common macro definitions to the new internal header
Signed-off-by: Mark Thompson <sw@jkqxz.net>
-rw-r--r-- | va/android/va_android.cpp | 3 | ||||
-rw-r--r-- | va/egl/va_egl.c | 3 | ||||
-rw-r--r-- | va/va.c | 3 | ||||
-rw-r--r-- | va/va_internal.h | 3 | ||||
-rw-r--r-- | va/va_tpi.c | 4 | ||||
-rw-r--r-- | va/x11/va_x11.c | 2 |
6 files changed, 5 insertions, 13 deletions
diff --git a/va/android/va_android.cpp b/va/android/va_android.cpp index 6f0324b..873609c 100644 --- a/va/android/va_android.cpp +++ b/va/android/va_android.cpp @@ -165,9 +165,6 @@ VADisplay vaGetDisplay ( return dpy; } -#define CTX(dpy) (((VADisplayContextP)dpy)->pDriverContext) -#define CHECK_DISPLAY(dpy) if( !vaDisplayIsValid(dpy) ) { return VA_STATUS_ERROR_INVALID_DISPLAY; } - extern "C" { extern int fool_postp; /* do nothing for vaPutSurface if set */ diff --git a/va/egl/va_egl.c b/va/egl/va_egl.c index 36e5504..3462183 100644 --- a/va/egl/va_egl.c +++ b/va/egl/va_egl.c @@ -57,9 +57,8 @@ #include "va.h" #include "va_backend_egl.h" #include "va_egl.h" +#include "va_internal.h" -#define CTX(dpy) (((VADisplayContextP)dpy)->pDriverContext) -#define CHECK_DISPLAY(dpy) if( !vaDisplayIsValid(dpy) ) { return VA_STATUS_ERROR_INVALID_DISPLAY; } VAStatus vaGetEGLClientBufferFromSurface ( VADisplay dpy, @@ -50,9 +50,6 @@ #define DRIVER_EXTENSION "_drv_video.so" -#define CTX(dpy) (((VADisplayContextP)dpy)->pDriverContext) -#define CHECK_DISPLAY(dpy) if( !vaDisplayIsValid(dpy) ) { return VA_STATUS_ERROR_INVALID_DISPLAY; } - #define ASSERT assert #define CHECK_VTABLE(s, ctx, func) if (!va_checkVtable(ctx->vtable->va##func, #func)) s = VA_STATUS_ERROR_UNKNOWN; #define CHECK_MAXIMUM(s, ctx, var) if (!va_checkMaximum(ctx->max_##var, #var)) s = VA_STATUS_ERROR_UNKNOWN; diff --git a/va/va_internal.h b/va/va_internal.h index 4d60368..6639803 100644 --- a/va/va_internal.h +++ b/va/va_internal.h @@ -25,6 +25,9 @@ #ifndef VA_INTERNAL_H #define VA_INTERNAL_H +#define CTX(dpy) (((VADisplayContextP)dpy)->pDriverContext) +#define CHECK_DISPLAY(dpy) if( !vaDisplayIsValid(dpy) ) { return VA_STATUS_ERROR_INVALID_DISPLAY; } + void va_errorMessage(const char *msg, ...); void va_infoMessage(const char *msg, ...); diff --git a/va/va_tpi.c b/va/va_tpi.c index 21d547d..46cf384 100644 --- a/va/va_tpi.c +++ b/va/va_tpi.c @@ -27,6 +27,7 @@ #include "va.h" #include "va_backend.h" #include "va_backend_tpi.h" +#include "va_internal.h" #include <assert.h> #include <stdarg.h> @@ -36,9 +37,6 @@ #include <dlfcn.h> #include <unistd.h> -#define CTX(dpy) (((VADisplayContextP)dpy)->pDriverContext) -#define CHECK_DISPLAY(dpy) if( !vaDisplayIsValid(dpy) ) { return VA_STATUS_ERROR_INVALID_DISPLAY; } - /* * Create surfaces with special inputs/requirements diff --git a/va/x11/va_x11.c b/va/x11/va_x11.c index a8db4c8..ab53b9b 100644 --- a/va/x11/va_x11.c +++ b/va/x11/va_x11.c @@ -195,8 +195,6 @@ VADisplay vaGetDisplay ( return dpy; } -#define CTX(dpy) (((VADisplayContextP)dpy)->pDriverContext) -#define CHECK_DISPLAY(dpy) if( !vaDisplayIsValid(dpy) ) { return VA_STATUS_ERROR_INVALID_DISPLAY; } void va_TracePutSurface ( VADisplay dpy, |