summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Android.mk4
-rw-r--r--test/Android.mk22
-rw-r--r--test/vainfo.c10
3 files changed, 33 insertions, 3 deletions
diff --git a/Android.mk b/Android.mk
index 5e7744e..89e2004 100644
--- a/Android.mk
+++ b/Android.mk
@@ -1,5 +1,3 @@
# Recursive call sub-folder Android.mk
#
-LOCAL_PATH := $(my-dir)
-
-include $(LOCAL_PATH)/va/Android.mk
+include $(call all-subdir-makefiles)
diff --git a/test/Android.mk b/test/Android.mk
new file mode 100644
index 0000000..7ae4a1a
--- /dev/null
+++ b/test/Android.mk
@@ -0,0 +1,22 @@
+# For vainfo
+# =====================================================
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := \
+ vainfo.c
+
+LOCAL_CFLAGS += \
+ -DANDROID
+
+LOCAL_C_INCLUDES += \
+ $(TARGET_OUT_HEADERS)/libva
+
+LOCAL_MODULE := vainfo
+
+LOCAL_SHARED_LIBRARIES := libva-android libva libdl libdrm libcutils
+
+include $(BUILD_EXECUTABLE)
+
diff --git a/test/vainfo.c b/test/vainfo.c
index 33d6ea4..bf8dbb9 100644
--- a/test/vainfo.c
+++ b/test/vainfo.c
@@ -22,7 +22,12 @@
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+#ifndef ANDROID
#include <va/va_x11.h>
+#else
+#include "va/va_android.h"
+#define Display unsigned int
+#endif
#include <stdarg.h>
#include <stdio.h>
@@ -87,7 +92,12 @@ int main(int argc, const char* argv[])
else
name = argv[0];
+#ifndef ANDROID
dpy = XOpenDisplay(":0.0");
+#else
+ dpy = (Display*)malloc(sizeof(Display));
+ *(dpy) = 0x18c34078;
+#endif
if (NULL == dpy)
{
fprintf(stderr, "%s: Error, can't open display: '%s'\n", name, display ? display : "");