diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-11-02 10:08:00 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-11-02 10:08:00 +0000 |
commit | 01518ada4b0ca1571f4b4d21c884b02e9371da62 (patch) | |
tree | 25235b628ee04807ada4ef3ada76d4b534a8bb1a /meta-emenlow/recipes/libva/libva-0.31.0/390_compat.base.patch | |
parent | c90c0ceca50fee19e683c19468110fba51da6cfe (diff) | |
download | openembedded-core-01518ada4b0ca1571f4b4d21c884b02e9371da62.tar.gz openembedded-core-01518ada4b0ca1571f4b4d21c884b02e9371da62.tar.bz2 openembedded-core-01518ada4b0ca1571f4b4d21c884b02e9371da62.tar.xz openembedded-core-01518ada4b0ca1571f4b4d21c884b02e9371da62.zip |
meta-emenlow: Rename packages to recipes in line with main repository
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta-emenlow/recipes/libva/libva-0.31.0/390_compat.base.patch')
-rw-r--r-- | meta-emenlow/recipes/libva/libva-0.31.0/390_compat.base.patch | 135 |
1 files changed, 135 insertions, 0 deletions
diff --git a/meta-emenlow/recipes/libva/libva-0.31.0/390_compat.base.patch b/meta-emenlow/recipes/libva/libva-0.31.0/390_compat.base.patch new file mode 100644 index 000000000..f2e0d61b0 --- /dev/null +++ b/meta-emenlow/recipes/libva/libva-0.31.0/390_compat.base.patch @@ -0,0 +1,135 @@ +commit 483bc9e67afa9bcd8f99f08a74a78e7dfad4651f +Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com> +Date: Thu Jul 2 09:24:04 2009 +0000 + + Fix make dist (va_compat_template.h). + +commit 0e0da9ea861f14e8129767dbf6f11be5c051d85f +Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com> +Date: Wed Jun 24 11:40:56 2009 +0000 + + Add compatibility layer with original libva 0.29. + +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -44,7 +44,7 @@ libva_x11_la_DEPENDENCIES = $(libvacorelib) + libva_x11_la_DEPENDENCIES = $(libvacorelib) + + +-libva_la_SOURCES = va.c ++libva_la_SOURCES = va.c va_compat.c + + libvaincludedir = ${includedir}/va + libvainclude_HEADERS = va.h va_backend.h va_version.h +@@ -53,4 +53,8 @@ DISTCLEANFILES = \ + va_version.h + + EXTRA_DIST = \ +- va_version.h.in ++ va_version.h.in \ ++ va_compat.h \ ++ va_compat_template.h ++ ++va_compat.c: va_compat_template.h +--- a/src/va.c ++++ b/src/va.c +@@ -25,6 +25,7 @@ + #define _GNU_SOURCE 1 + #include "va.h" + #include "va_backend.h" ++#include "va_compat.h" + + #include <assert.h> + #include <stdarg.h> +@@ -41,6 +42,8 @@ + + #define DRIVER_INIT_FUNC "__vaDriverInit_0_31" + #define DRIVER_INIT_FUNC_SDS "__vaDriverInit_0_31_sds" ++#define DRIVER_INIT_FUNC_0_29 "__vaDriverInit_0_29" ++#define DRIVER_INIT_FUNC_0_30 "__vaDriverInit_0_30" + + #define DRIVER_EXTENSION "_drv_video.so" + +@@ -168,11 +171,22 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name) + else + { + VADriverInit init_func; +- init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC); ++ int compat_version = 0; ++ /* First, try SDS extensions (VDPAU and XvBA backends) */ ++ init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC_SDS); + if (!init_func) + { +- /* Then try SDS extensions (VDPAU and XvBA backends) */ +- init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC_SDS); ++ /* Otherwise, we need the compatibility layer for some buffers */ ++ init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC); ++ compat_version = VA_MINOR_VERSION; ++ if (!init_func) { ++ init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC_0_29); ++ compat_version = 29; ++ } ++ if (!init_func) { ++ init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC_0_30); ++ compat_version = 30; ++ } + } + if (!init_func) + { +@@ -181,7 +195,36 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name) + } + else + { +- vaStatus = (*init_func)(ctx); ++ struct VADriverContext_0_29 ctx_0_29; ++ struct VADriverContext_0_30 ctx_0_30; ++ void *compat_ctx = NULL; ++ ++ switch (compat_version) { ++ case 29: ++ compat_ctx = &ctx_0_29; ++ ctx_0_29.pDriverData = NULL; ++ ctx_0_29.x11_dpy = ctx->x11_dpy; ++ ctx_0_29.x11_screen = ctx->x11_screen; ++ break; ++ case 30: ++ compat_ctx = &ctx_0_30; ++ ctx_0_30.pDriverData = NULL; ++ ctx_0_30.x11_dpy = ctx->x11_dpy; ++ ctx_0_30.x11_screen = ctx->x11_screen; ++ break; ++ case VA_MINOR_VERSION: ++ compat_ctx = ctx; ++ break; ++ default: ++ ASSERT(compat_version == 0); ++ vaStatus = VA_STATUS_ERROR_UNKNOWN; ++ break; ++ } ++ ++ vaStatus = (*init_func)(compat_ctx ? compat_ctx : ctx); ++ ++ if (VA_STATUS_SUCCESS == vaStatus) ++ vaStatus = va_compat_init(dpy, compat_version, compat_ctx); + + if (VA_STATUS_SUCCESS == vaStatus) + { +@@ -377,6 +422,8 @@ VAStatus vaTerminate ( + old_ctx->handle = NULL; + } + ++ va_compat_fini(dpy); ++ + if (VA_STATUS_SUCCESS == vaStatus) + pDisplayContext->vaDestroy(pDisplayContext); + return vaStatus; +--- a/src/va_backend.h ++++ b/src/va_backend.h +@@ -426,6 +426,7 @@ struct VADriverContext + + void *dri_state; + void *glx; /* opaque for GLX code */ ++ void *compat; /* opaque for compat code */ + }; + + struct VADisplayContext |