Bump VA-API version to 0.32.0. Fix __vaDriverInit*() function name.
authorGwenole Beauchesne <gbeauchesne@splitted-desktop.com>
Thu, 27 Jan 2011 09:04:03 +0000 (10:04 +0100)
committerAustin Yuan <shengquan.yuan@gmail.com>
Wed, 9 Feb 2011 03:28:29 +0000 (11:28 +0800)
configure.ac
dummy_drv_video/dummy_drv_video.c
i965_drv_video/i965_drv_video.c
va/va.c

index 8130ef4..96a0239 100644 (file)
@@ -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)
index 1a78b3f..4637147 100644 (file)
@@ -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;
index e047057..303e090 100644 (file)
@@ -27,6 +27,7 @@
  *
  */
 
+#include "config.h"
 #include <stdlib.h>
 #include <string.h>
 #include <assert.h>
@@ -1836,7 +1837,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 (file)
--- 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