diff options
author | Austin Yuan <shengquan.yuan@gmail.com> | 2010-07-09 17:15:54 +0800 |
---|---|---|
committer | Austin Yuan <shengquan.yuan@gmail.com> | 2010-07-09 17:15:54 +0800 |
commit | 016c719c13f19a310e1a9114d602b6cd0f3db5ab (patch) | |
tree | 27ff7c4b9779bd978bcb0d9cf8575de4827e11ee | |
parent | 3c3088a5d713e7a92bc7cf2a0635f4fcda0e52c3 (diff) | |
parent | a1ff5fe5dbf5736fa13ab64ac6ee784f993210f3 (diff) |
Merge branch 'master' of ssh://git@moblin.intel.com/umg-moorestown-libva20100721_5.3.0.001520100713_5.3.0.0014
-rw-r--r-- | Android.mk | 4 | ||||
-rw-r--r-- | test/Android.mk | 22 | ||||
-rw-r--r-- | test/vainfo.c | 10 |
3 files changed, 33 insertions, 3 deletions
@@ -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 : ""); |