[Libva] [PATCH 2/6] vainfo: report both VA-API and libva versions.
Gwenole Beauchesne
gwenole.beauchesne at intel.com
Tue Oct 18 08:45:49 PDT 2011
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne at intel.com>
---
test/vainfo/Makefile.am | 7 +++++--
test/vainfo/vainfo.c | 3 ++-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/test/vainfo/Makefile.am b/test/vainfo/Makefile.am
index 8d9d017..190aa8b 100644
--- a/test/vainfo/Makefile.am
+++ b/test/vainfo/Makefile.am
@@ -23,12 +23,15 @@
bin_PROGRAMS = vainfo
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/test/basic
+INCLUDES = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/test/basic \
+ -DLIBVA_VERSION_S="\"${LIBVA_VERSION}\"" \
+ $(NULL)
vainfo_LDADD = $(top_builddir)/va/$(libvacorelib) $(top_builddir)/va/$(libvabackendlib) -lX11
vainfo_DEPENDENCIES = $(top_builddir)/va/$(libvacorelib) $(top_builddir)/va/$(libvabackendlib)
-vainfo_SOURCES = vainfo.c
valgrind: vainfo
valgrind --leak-check=full --show-reachable=yes .libs/vainfo;
diff --git a/test/vainfo/vainfo.c b/test/vainfo/vainfo.c
index 24b6d70..0502f6c 100644
--- a/test/vainfo/vainfo.c
+++ b/test/vainfo/vainfo.c
@@ -114,7 +114,8 @@ int main(int argc, const char* argv[])
va_status = vaInitialize(va_dpy, &major_version, &minor_version);
CHECK_VASTATUS(va_status, "vaInitialize", 3);
- printf("%s: VA API version: %d.%d\n", name, major_version, minor_version);
+ printf("%s: VA-API version: %d.%d (libva %s)\n",
+ name, major_version, minor_version, LIBVA_VERSION_S);
driver = vaQueryVendorString(va_dpy);
printf("%s: Driver version: %s\n", name, driver ? driver : "<unknown>");
--
1.7.4.1
More information about the Libva
mailing list