[Libva] [android-build 1/3] android: rename the LOG_TAG per module

Daniel Charles daniel.charles at intel.com
Fri Aug 17 09:50:18 PDT 2012


LOG_TAG is defined per module compiled so that tracing back errors
from the Android logcat can be understood easily

Signed-off-by: Daniel Charles <daniel.charles at intel.com>
---
 va/Android.mk |    9 +++++----
 va/sysdeps.h  |    1 -
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/va/Android.mk b/va/Android.mk
index 300c133..0951ab5 100755
--- a/va/Android.mk
+++ b/va/Android.mk
@@ -44,7 +44,8 @@ LOCAL_SRC_FILES := \
 
 LOCAL_CFLAGS += \
 	-DANDROID \
-	-DVA_DRIVERS_PATH="\"$(LIBVA_DRIVERS_PATH)\""
+	-DVA_DRIVERS_PATH="\"$(LIBVA_DRIVERS_PATH)\"" \
+	-DLOG_TAG=\"libva\"
 
 # Android Jelly Bean defined ALOGx, older versions use LOGx
 ifeq ($(ALOG_VERSION), $(ALOG_VERSION_REQ))
@@ -95,7 +96,7 @@ LOCAL_SRC_FILES := \
 	android/va_android.cpp
 
 LOCAL_CFLAGS += \
-	-DANDROID 
+	-DANDROID -DLOG_TAG=\"libva-android\"
 
 LOCAL_C_INCLUDES += \
 	$(TARGET_OUT_HEADERS)/libva \
@@ -123,7 +124,7 @@ LOCAL_SRC_FILES :=    \
 	egl/va_egl_impl.c
 
 LOCAL_CFLAGS += \
-	-DANDROID
+	-DANDROID -DLOG_TAG=\"libva-egl\"
 
 LOCAL_C_INCLUDES += \
 	$(TARGET_OUT_HEADERS)/libva \
@@ -148,7 +149,7 @@ include $(CLEAR_VARS)
 
 LOCAL_SRC_FILES := va_tpi.c
 
-LOCAL_CFLAGS += -DANDROID
+LOCAL_CFLAGS += -DANDROID -DLOG_TAG=\"libva-tpi\"
 
 LOCAL_C_INCLUDES += \
 	$(TARGET_OUT_HEADERS)/libva \
diff --git a/va/sysdeps.h b/va/sysdeps.h
index ff9c98b..ec2153d 100644
--- a/va/sysdeps.h
+++ b/va/sysdeps.h
@@ -44,7 +44,6 @@
 # define LIBVA_VERSION_S LIBVA_VERSION
 
 /* Android logging utilities */
-# define LOG_TAG "lib-va"
 # include <utils/Log.h>
 
 # ifdef ANDROID_ALOG
-- 
1.7.7.6



More information about the Libva mailing list