Hi,

This patch fixes VA-API version to 0.32.0 and makes sure all __vaDriverInit_*() functions use the 0_31 suffix.

Regards,
Gwenole.
From c2ac71a7e74069d6c428ddbf7e08c9c2055ced96 Mon Sep 17 00:00:00 2001
From: Gwenole Beauchesne <[email protected]>
Date: Thu, 27 Jan 2011 10:04:03 +0100
Subject: [PATCH] Bump VA-API version to 0.32.0. Fix __vaDriverInit*() function name.

---
 configure.ac                      |    9 ++++++++-
 dummy_drv_video/dummy_drv_video.c |    3 ++-
 i965_drv_video/i965_drv_video.c   |    3 ++-
 va/va.c                           |    6 ++----
 4 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/configure.ac b/configure.ac
index 8130ef4..96a0239 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # libva package version number, (as distinct from shared library version)
 m4_define([libva_major_version], [0])
 m4_define([libva_minor_version], [32])
-m4_define([libva_micro_version], [1])
+m4_define([libva_micro_version], [0])
 
 m4_define([libva_version],
           [libva_major_version.libva_minor_version.libva_micro_version])
@@ -135,6 +135,13 @@ AC_SUBST(GL_DEPS_CFLAGS)
 AC_SUBST(GL_DEPS_LIBS)
 AM_CONDITIONAL(USE_GLX, test "$USE_GLX" = "yes")
 
+# Make sure drivers use the correctly versioned __vaDriverInit*() function name
+VA_DRIVER_INIT_FUNC="__vaDriverInit_${LIBVA_MAJOR_VERSION}_${LIBVA_MINOR_VERSION}"
+AC_DEFINE_UNQUOTED([VA_DRIVER_INIT_FUNC], [$VA_DRIVER_INIT_FUNC],
+    [Defined to the versioned __vaDriverInit function name])
+AC_DEFINE_UNQUOTED([VA_DRIVER_INIT_FUNC_S], ["$VA_DRIVER_INIT_FUNC"],
+    [Defined to the versioned __vaDriverInit function name (in string form)])
+
 # We only need the headers, we don't link against the DRM libraries
 LIBVA_CFLAGS="$DRM_CFLAGS"
 AC_SUBST(LIBVA_CFLAGS)
diff --git a/dummy_drv_video/dummy_drv_video.c b/dummy_drv_video/dummy_drv_video.c
index 1a78b3f..4637147 100644
--- a/dummy_drv_video/dummy_drv_video.c
+++ b/dummy_drv_video/dummy_drv_video.c
@@ -22,6 +22,7 @@
  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
+#include "config.h"
 #include <va/va_backend.h>
 
 #include "dummy_drv_video.h"
@@ -1193,7 +1194,7 @@ VAStatus dummy_Terminate( VADriverContextP ctx )
     return VA_STATUS_SUCCESS;
 }
 
-VAStatus __vaDriverInit_0_31(  VADriverContextP ctx )
+VAStatus VA_DRIVER_INIT_FUNC(  VADriverContextP ctx )
 {
     object_base_p obj;
     int result;
diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
index ce2d4bd..ea5be1f 100644
--- a/i965_drv_video/i965_drv_video.c
+++ b/i965_drv_video/i965_drv_video.c
@@ -27,6 +27,7 @@
  *
  */
 
+#include "config.h"
 #include <stdlib.h>
 #include <string.h>
 #include <assert.h>
@@ -1833,7 +1834,7 @@ i965_Terminate(VADriverContextP ctx)
 }
 
 VAStatus 
-__vaDriverInit_0_31(  VADriverContextP ctx )
+VA_DRIVER_INIT_FUNC(  VADriverContextP ctx )
 {
     struct i965_driver_data *i965;
     int result;
diff --git a/va/va.c b/va/va.c
index 10befe8..3f09c99 100644
--- a/va/va.c
+++ b/va/va.c
@@ -37,8 +37,6 @@
 #include <dlfcn.h>
 #include <unistd.h>
 
-#define DRIVER_INIT_FUNC	"__vaDriverInit_0_31"
-
 #define DRIVER_EXTENSION	"_drv_video.so"
 
 #define CTX(dpy) (((VADisplayContextP)dpy)->pDriverContext)
@@ -222,10 +220,10 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name)
         else
         {
             VADriverInit init_func;
-            init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC);
+            init_func = (VADriverInit) dlsym(handle, VA_DRIVER_INIT_FUNC_S);
             if (!init_func)
             {
-                va_errorMessage("%s has no function %s\n", driver_path, DRIVER_INIT_FUNC);
+                va_errorMessage("%s has no function %s\n", driver_path, VA_DRIVER_INIT_FUNC_S);
                 dlclose(handle);
             }
             else
-- 
1.5.4.3

_______________________________________________
Libva mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libva

Reply via email to