summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJerry Dong <jerry.dong@intel.com>2010-07-07 13:42:36 +0800
committerJerry Dong <jerry.dong@intel.com>2010-07-07 13:42:36 +0800
commita1ff5fe5dbf5736fa13ab64ac6ee784f993210f3 (patch)
treeb0f2634c15621510b69fd5a6cb9b0786a559eeee /test
parent4ff4b0db9706d6205e9d16f2f1b04dac9c75ed72 (diff)
downloadlibva-a1ff5fe5dbf5736fa13ab64ac6ee784f993210f3.tar.gz
Add "Android.mk" for "vainfo"; update "vainfo.c" for Android
Diffstat (limited to 'test')
-rw-r--r--test/Android.mk22
-rw-r--r--test/vainfo.c10
2 files changed, 32 insertions, 0 deletions
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 : "");