• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

hardware/intel/libva


Commit MetaInfo

Revisionb817eb2feb0f691dfcf543f2f3d1f7bba415b878 (tree)
Time2009-05-12 20:12:30
AuthorAustin Yuan <shengquan.yuan@inte...>
CommiterAustin Yuan

Log Message

Added build information (build date/time, git commit point) into the library

Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>

Change Summary

Incremental Difference

--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -30,6 +30,16 @@ libva_la_LDFLAGS = -version-number 0:30:0 -no-undefined
3030 libva_la_LIBADD = $(LIBVA_LIBS) -ldl -ldrm -lX11 -lXext -lXv X11/libva_X11.la
3131 CFLAGS = -ansi -O2
3232
33+nodist_libva_la_SOURCES = va_version.h
34+BUILT_SOURCES = va_version.h
35+
36+CLEANFILES = va_version.h
37+
38+va_version.h: Makefile
39+ echo "#define VA_BUILD_DATE \"$(shell date +'%Y%m%d') $(shell date +'1%H%M%S') \"" > va_version.h
40+ echo "#define VA_BUILD_GIT \"($(shell git log | head -n1 | cut -f2 -d' ')) \" " >> va_version.h
41+
42+
3343 SUBDIRS = X11
3444
3545 libva_la_SOURCES = va.c
--- a/src/va.c
+++ b/src/va.c
@@ -25,6 +25,8 @@
2525 #include "va.h"
2626 #include "va_backend.h"
2727
28+#include "va_version.h"
29+
2830 #include <assert.h>
2931 #include <stdarg.h>
3032 #include <stdio.h>
@@ -32,6 +34,8 @@
3234 #include <dlfcn.h>
3335 #include <unistd.h>
3436
37+#define VA_STR_VERSION VA_BUILD_DATE VA_BUILD_GIT
38+
3539 #define VA_MAJOR_VERSION 0
3640 #define VA_MINOR_VERSION 30
3741 #define DRIVER_INIT_FUNC "__vaDriverInit_0_30"
@@ -325,6 +329,8 @@ VAStatus vaInitialize (
325329
326330 va_debug_trace = (getenv("LIBVA_DEBUG_TRACE") != NULL);
327331
332+ va_infoMessage("libva build on %s\n", VA_STR_VERSION);
333+
328334 vaStatus = va_getDriverName(dpy, &driver_name);
329335 va_infoMessage("va_getDriverName() returns %d\n", vaStatus);
330336