[Libva] [PATCH 03/16] API: backend: add VA display types.
Zhao Halley
halley.zhao at intel.com
Tue Jun 5 02:06:51 PDT 2012
From: Gwenole Beauchesne <gwenole.beauchesne at intel.com>
---
va/android/va_android.cpp | 1 +
va/glx/va_glx.c | 1 +
va/va_backend.h | 11 ++++++++++-
va/x11/va_x11.c | 1 +
4 files changed, 13 insertions(+), 1 deletions(-)
mode change 100644 => 100755 va/glx/va_glx.c
diff --git a/va/android/va_android.cpp b/va/android/va_android.cpp
index 24329fe..12d5f1c 100755
--- a/va/android/va_android.cpp
+++ b/va/android/va_android.cpp
@@ -223,6 +223,7 @@ VADisplay vaGetDisplay (
pDisplayContext->vadpy_magic = VA_DISPLAY_MAGIC;
pDriverContext->native_dpy = (void *)native_dpy;
+ pDriverContext->display_type = VA_DISPLAY_ANDROID;
pDisplayContext->pDriverContext = pDriverContext;
pDisplayContext->vaIsValid = va_DisplayContextIsValid;
pDisplayContext->vaDestroy = va_DisplayContextDestroy;
diff --git a/va/glx/va_glx.c b/va/glx/va_glx.c
old mode 100644
new mode 100755
index 1812ef5..e03847e
--- a/va/glx/va_glx.c
+++ b/va/glx/va_glx.c
@@ -98,6 +98,7 @@ VADisplay vaGetDisplayGLX(Display *native_dpy)
if (!pDriverContextGLX)
goto error;
+ pDriverContext->display_type = VA_DISPLAY_GLX;
pDisplayContextGLX->vaDestroy = pDisplayContext->vaDestroy;
pDisplayContext->vaDestroy = va_DisplayContextDestroy;
pDisplayContext->opaque = pDisplayContextGLX;
diff --git a/va/va_backend.h b/va/va_backend.h
index 522f606..4f69e24 100755
--- a/va/va_backend.h
+++ b/va/va_backend.h
@@ -38,6 +38,13 @@
typedef struct VADriverContext *VADriverContextP;
typedef struct VADisplayContext *VADisplayContextP;
+/** \brief VA display types. */
+enum {
+ VA_DISPLAY_X11 = 0x10,
+ VA_DISPLAY_GLX = (VA_DISPLAY_X11 | (1 << 0)),
+ VA_DISPLAY_ANDROID = 0x20,
+};
+
struct VADriverVTable
{
VAStatus (*vaTerminate) ( VADriverContextP ctx );
@@ -460,8 +467,10 @@ struct VADriverContext
* This structure is allocated from libva with calloc().
*/
struct VADriverVTableVPP *vtable_vpp;
+ /** \brief VA display type. */
+ unsigned int display_type;
- unsigned long reserved[44]; /* reserve for future add-ins, decrease the subscript accordingly */
+ unsigned long reserved[43]; /* reserve for future add-ins, decrease the subscript accordingly */
};
#define VA_DISPLAY_MAGIC 0x56414430 /* VAD0 */
diff --git a/va/x11/va_x11.c b/va/x11/va_x11.c
index f81e30a..2aa579b 100755
--- a/va/x11/va_x11.c
+++ b/va/x11/va_x11.c
@@ -185,6 +185,7 @@ VADisplay vaGetDisplay (
pDisplayContext->vadpy_magic = VA_DISPLAY_MAGIC;
pDriverContext->native_dpy = (void *)native_dpy;
+ pDriverContext->display_type = VA_DISPLAY_X11;
pDisplayContext->pDriverContext = pDriverContext;
pDisplayContext->vaIsValid = va_DisplayContextIsValid;
pDisplayContext->vaDestroy = va_DisplayContextDestroy;
--
1.7.5.4
More information about the Libva
mailing list