summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build/gen_version.sh22
-rw-r--r--configure.ac65
-rw-r--r--pkgconfig/libva-egl.pc.in2
-rw-r--r--pkgconfig/libva-glx.pc.in2
-rw-r--r--pkgconfig/libva-tpi.pc.in2
-rw-r--r--pkgconfig/libva-x11.pc.in2
-rw-r--r--pkgconfig/libva.pc.in2
-rw-r--r--va/va_version.h.in28
8 files changed, 84 insertions, 41 deletions
diff --git a/build/gen_version.sh b/build/gen_version.sh
index dd01d95..f594ddd 100644
--- a/build/gen_version.sh
+++ b/build/gen_version.sh
@@ -12,21 +12,21 @@ parse_configure() {
}
if test -f "${libva_topdir}/configure.ac"; then
- libva_major_version=`parse_configure_ac libva_major_version`
- libva_minor_version=`parse_configure_ac libva_minor_version`
- libva_micro_version=`parse_configure_ac libva_micro_version`
+ va_api_major_version=`parse_configure_ac va_api_major_version`
+ va_api_minor_version=`parse_configure_ac va_api_minor_version`
+ va_api_micro_version=`parse_configure_ac va_api_micro_version`
elif test -f "${libva_topdir}/configure"; then
- libva_major_version=`parse_configure LIBVA_MAJOR_VERSION`
- libva_minor_version=`parse_configure LIBVA_MINOR_VERSION`
- libva_micro_version=`parse_configure LIBVA_MICRO_VERSION`
+ va_api_major_version=`parse_configure VA_API_MAJOR_VERSION`
+ va_api_minor_version=`parse_configure VA_API_MINOR_VERSION`
+ va_api_micro_version=`parse_configure VA_API_MICRO_VERSION`
else
echo "ERROR: configure or configure.ac file not found in $libva_topdir/"
exit 1
fi
-libva_version="$libva_major_version.$libva_minor_version.$libva_micro_version"
+va_api_version="$va_api_major_version.$va_api_minor_version.$va_api_micro_version"
-sed -e "s/@LIBVA_MAJOR_VERSION@/${libva_major_version}/" \
- -e "s/@LIBVA_MINOR_VERSION@/${libva_minor_version}/" \
- -e "s/@LIBVA_MICRO_VERSION@/${libva_micro_version}/" \
- -e "s/@LIBVA_VERSION@/${libva_version}/" \
+sed -e "s/@VA_API_MAJOR_VERSION@/${va_api_major_version}/" \
+ -e "s/@VA_API_MINOR_VERSION@/${va_api_minor_version}/" \
+ -e "s/@VA_API_MICRO_VERSION@/${va_api_micro_version}/" \
+ -e "s/@VA_API_VERSION@/${va_api_version}/" \
$version_h_in
diff --git a/configure.ac b/configure.ac
index 00b047b..19aa604 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,21 +20,55 @@
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+# VA-API version
+# - increment major for any ABI change (which shall not occur!)
+# - increment minor for any interface change (e.g. new/modified function)
+# - increment micro for any other change (new flag, new codec definition, etc.)
+# - reset micro version to zero when minor version is incremented
+# - reset minor version to zero when major version is incremented
+m4_define([va_api_major_version], [0])
+m4_define([va_api_minor_version], [32])
+m4_define([va_api_micro_version], [0])
+
+m4_define([va_api_version],
+ [va_api_major_version.va_api_minor_version.va_api_micro_version])
+
# 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], [0])
+# XXX: we want the package version to remain at 1.0.x for VA-API 0.32.y
+#
+# - major version is automatically generated from VA-API major version
+# - minor version is automatically generated from VA-API minor version
+# - increment micro for any library release
+# - reset micro version to zero when VA-API major or minor version is changed
+m4_define([libva_major_version], [m4_eval(va_api_major_version + 1)])
+m4_define([libva_minor_version], [m4_eval(va_api_minor_version - 32)])
+m4_define([libva_micro_version], [14])
m4_define([libva_version],
[libva_major_version.libva_minor_version.libva_micro_version])
-# if the library source code has changed, increment revision
-m4_define([libva_lt_revision], [14])
-# if any interface was added/removed/changed, then inc current, reset revision
-m4_define([libva_lt_current], [1])
-# if any interface was added since last public release, then increment age
-# if any interface was removed since last public release, then set age to 0
-m4_define([libva_lt_age], [0])
+# libva library version number (generated, do not change)
+# XXX: we want the SONAME to remain at libva.so.1 for VA-API major == 0
+#
+# The library name is generated libva.<x>.<y>.0 where
+# <x> = VA-API major version + 1
+# <y> = 100 * VA-API minor version + VA-API micro version
+#
+# For example:
+# VA-API 0.32.0 generates libva.so.1.3200.0
+# VA-API 0.34.1 generates libva.so.1.3401.0
+# VA-API 1.2.13 generates libva.so.2.213.0
+m4_define([libva_interface_bias], [m4_eval(va_api_major_version + 1)])
+m4_define([libva_interface_age], [0])
+m4_define([libva_binary_age],
+ [m4_eval(100 * va_api_minor_version + va_api_micro_version - libva_interface_age)])
+
+m4_define([libva_lt_current],
+ [m4_eval(100 * va_api_minor_version + va_api_micro_version + libva_interface_bias)])
+m4_define([libva_lt_revision],
+ [m4_eval(libva_interface_age)])
+m4_define([libva_lt_age],
+ [m4_eval(libva_binary_age - libva_interface_age)])
AC_PREREQ(2.57)
AC_INIT([libva], [libva_version], [waldo.bastian@intel.com], libva)
@@ -44,6 +78,15 @@ AM_INIT_AUTOMAKE([dist-bzip2])
AM_CONFIG_HEADER([config.h])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+VA_API_MAJOR_VERSION=va_api_major_version
+VA_API_MINOR_VERSION=va_api_minor_version
+VA_API_MICRO_VERSION=va_api_micro_version
+VA_API_VERSION=va_api_version
+AC_SUBST(VA_API_MAJOR_VERSION)
+AC_SUBST(VA_API_MINOR_VERSION)
+AC_SUBST(VA_API_MICRO_VERSION)
+AC_SUBST(VA_API_VERSION)
+
LIBVA_MAJOR_VERSION=libva_major_version
LIBVA_MINOR_VERSION=libva_minor_version
LIBVA_MICRO_VERSION=libva_micro_version
@@ -165,7 +208,7 @@ AC_OUTPUT([
# Print a small summary
echo ""
-echo "libva - ${LIBVA_VERSION}"
+echo "libva - ${LIBVA_VERSION} (VA-API ${VA_API_VERSION})"
echo ""
echo " • Global :"
diff --git a/pkgconfig/libva-egl.pc.in b/pkgconfig/libva-egl.pc.in
index 3d621b2..d80fcc8 100644
--- a/pkgconfig/libva-egl.pc.in
+++ b/pkgconfig/libva-egl.pc.in
@@ -7,7 +7,7 @@ display=egl
Name: libva-${display}
Description: Userspace Video Acceleration (VA) ${display} interface
Requires: libva
-Version: @PACKAGE_VERSION@
+Version: @VA_API_VERSION@
Libs: -L${libdir} -lva-${display}
Cflags: -I${includedir}
diff --git a/pkgconfig/libva-glx.pc.in b/pkgconfig/libva-glx.pc.in
index 2019915..8599866 100644
--- a/pkgconfig/libva-glx.pc.in
+++ b/pkgconfig/libva-glx.pc.in
@@ -7,6 +7,6 @@ display=glx
Name: libva-${display}
Description: Userspace Video Acceleration (VA) ${display} interface
Requires: libva
-Version: @PACKAGE_VERSION@
+Version: @VA_API_VERSION@
Libs: -L${libdir} -lva-${display}
Cflags: -I${includedir}
diff --git a/pkgconfig/libva-tpi.pc.in b/pkgconfig/libva-tpi.pc.in
index 43616c0..bc7fdd7 100644
--- a/pkgconfig/libva-tpi.pc.in
+++ b/pkgconfig/libva-tpi.pc.in
@@ -6,6 +6,6 @@ includedir=@includedir@
Name: libva-tpi
Description: Userspace Video Acceleration (VA) 3rd party interface
Requires: libva
-Version: @PACKAGE_VERSION@
+Version: @VA_API_VERSION@
Libs: -L${libdir} -lva-tpi
Cflags: -I${includedir}
diff --git a/pkgconfig/libva-x11.pc.in b/pkgconfig/libva-x11.pc.in
index 6dde07f..4e7330c 100644
--- a/pkgconfig/libva-x11.pc.in
+++ b/pkgconfig/libva-x11.pc.in
@@ -7,6 +7,6 @@ display=x11
Name: libva-${display}
Description: Userspace Video Acceleration (VA) ${display} interface
Requires: libva
-Version: @PACKAGE_VERSION@
+Version: @VA_API_VERSION@
Libs: -L${libdir} -lva-${display}
Cflags: -I${includedir}
diff --git a/pkgconfig/libva.pc.in b/pkgconfig/libva.pc.in
index 60f1483..8b03f98 100644
--- a/pkgconfig/libva.pc.in
+++ b/pkgconfig/libva.pc.in
@@ -6,6 +6,6 @@ driverdir=@LIBVA_DRIVERS_PATH@
Name: libva
Description: Userspace Video Acceleration (VA) core interface
-Version: @PACKAGE_VERSION@
+Version: @VA_API_VERSION@
Libs: -L${libdir} -lva
Cflags: -I${includedir}
diff --git a/va/va_version.h.in b/va/va_version.h.in
index c9ea97a..0cc5ea7 100644
--- a/va/va_version.h.in
+++ b/va/va_version.h.in
@@ -28,43 +28,43 @@
/**
* VA_MAJOR_VERSION:
*
- * The major version of the VA library (1, if %VA_VERSION is 1.2.3)
+ * The major version of VA-API (1, if %VA_VERSION is 1.2.3)
*/
-#define VA_MAJOR_VERSION (@LIBVA_MAJOR_VERSION@)
+#define VA_MAJOR_VERSION @VA_API_MAJOR_VERSION@
/**
* VA_MINOR_VERSION:
*
- * The minor version of the VA library (2, if %VA_VERSION is 1.2.3)
+ * The minor version of VA-API (2, if %VA_VERSION is 1.2.3)
*/
-#define VA_MINOR_VERSION (@LIBVA_MINOR_VERSION@)
+#define VA_MINOR_VERSION @VA_API_MINOR_VERSION@
/**
* VA_MICRO_VERSION:
*
- * The micro version of the VA library (3, if %VA_VERSION is 1.2.3)
+ * The micro version of VA-API (3, if %VA_VERSION is 1.2.3)
*/
-#define VA_MICRO_VERSION (@LIBVA_MICRO_VERSION@)
+#define VA_MICRO_VERSION @VA_API_MICRO_VERSION@
/**
* VA_VERSION:
*
- * The full version of the VA library, like 1.2.3
+ * The full version of VA-API, like 1.2.3
*/
-#define VA_VERSION @LIBVA_VERSION@
+#define VA_VERSION @VA_API_VERSION@
/**
* VA_VERSION_S:
*
- * The full version of the VA library, in string form (suited for
- * string concatenation)
+ * The full version of VA-API, in string form (suited for string
+ * concatenation)
*/
-#define VA_VERSION_S "@LIBVA_VERSION@"
+#define VA_VERSION_S "@VA_API_VERSION@"
/**
* VA_VERSION_HEX:
*
- * Numerically encoded version of the VA library, like 0x010203
+ * Numerically encoded version of VA-API, like 0x010203
*/
#define VA_VERSION_HEX ((VA_MAJOR_VERSION << 24) | \
(VA_MINOR_VERSION << 16) | \
@@ -76,8 +76,8 @@
* @minor: minor version, like 2 in 1.2.3
* @micro: micro version, like 3 in 1.2.3
*
- * Evaluates to %TRUE if the version of the VA library is greater
- * than @major, @minor and @micro
+ * Evaluates to %TRUE if the version of VA-API is greater than
+ * @major, @minor and @micro
*/
#define VA_CHECK_VERSION(major,minor,micro) \
(VA_MAJOR_VERSION > (major) || \