Skip to content

Commit

Permalink
hyp-intercept: Create hyp-intercept as a shared lib
Browse files Browse the repository at this point in the history
Since hyp-intercept will be used by multiple projects, making it as a
shared lib is easy for maintenance.

Change-Id: I156c3ae3ca35ee6705f4bc2f7acc639ff9fe6258
Signed-off-by: Alan Wang <[email protected]>
  • Loading branch information
Alan Wang authored and Gerrit - the friendly Code Review server committed Jul 6, 2017
1 parent d213e5f commit dc82d85
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
ACLOCAL_AMFLAGS = -I m4

BUILD_COMPONENTS := mm-core
BUILD_COMPONENTS := mm-core hyp-intercept

if BUILD_MM_VIDEO
BUILD_COMPONENTS += mm-video-v4l2
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ AC_SUBST([CFLAGS])

AC_CONFIG_FILES([ \
Makefile \
hyp-intercept/Makefile \
mm-core/Makefile
mm-video-v4l2/Makefile \
mm-video-v4l2/vidc/Makefile \
Expand Down
20 changes: 20 additions & 0 deletions hyp-intercept/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_SRC_FILES := \
hypv_intercept.cpp
LOCAL_C_INCLUDES = $(TOP)/hardware/qcom/media/mm-video-v4l2/vidc/common/inc

LOCAL_SHARED_LIBRARIES := liblog libdl

LOCAL_MODULE_TAGS := optional

LOCAL_MODULE := libhypintercept

LOCAL_MODULE_PATH_32 := $(TARGET_OUT_VENDOR)/lib
LOCAL_MODULE_PATH_64 := $(TARGET_OUT_VENDOR)/lib64

LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr

include $(BUILD_SHARED_LIBRARY)
22 changes: 22 additions & 0 deletions hyp-intercept/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# -----------------------------------------------------------------------------
# Common definitons
# -----------------------------------------------------------------------------

AM_CFLAGS = -g -O3
AM_CFLAGS += -Werror

AM_CPPFLAGS = -D_LINUX_
AM_CPPFLAGS += -I$(top_srcdir)/mm-video-v4l2/vidc/common/inc

# -----------------------------------------------------------------------------
# Make the Shared library (libgioctl)
# -----------------------------------------------------------------------------
h_sources = hypv_intercept.h
c_sources = hypv_intercept.cpp

include_HEADERS = $(h_source)
lib_LTLIBRARIES = libhypintercept.la
libhypintercept_la_SOURCES = $(c_sources)
libhypintercept_la_CFLAGS = $(AM_CFLAGS) -fPIC
libhypintercept_la_CPPFLAGS = $(AM_CPPFLAGS)
libhypintercept_la_LDFLAGS = -shared -llog -ldl
File renamed without changes.
File renamed without changes.
4 changes: 3 additions & 1 deletion mm-video-v4l2/vidc/vdec/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ AM_CPPFLAGS += -I$(top_srcdir)/mm-video-v4l2/vidc/vdec/inc/
AM_CPPFLAGS += -I$(top_srcdir)/libc2dcolorconvert/
AM_CPPFLAGS += -I$(top_srcdir)/mm-core/inc/
AM_CPPFLAGS += -I$(top_srcdir)/mm-core/src/common/
AM_CPPFLAGS += -I$(top_srcdir)/hyp-intercept/

c_sources := src/frameparser.cpp
c_sources += src/h264_utils.cpp
Expand All @@ -80,4 +81,5 @@ libOmxVdec_la_SOURCES = $(c_sources)
libOmxVdec_la_CFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) -fPIC
libOmxVdec_la_CFLAGS += ../libc2d2colorconvert/libc2dcolorconvert.la
libOmxVdec_la_LDFLAGS = -llog -lutils -lbinder -lcutils -ldl -lqdMetaData -lglib-2.0 -shared -version-info 0

libOmxVdec_la_LDFLAGS += -L$(top_builddir)/hyp-intercept
libOmxVdec_la_LDFLAGS += -lhypintercept
7 changes: 3 additions & 4 deletions mm-video-v4l2/vidc/venc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ if TARGETS_THAT_SUPPORT_UBWC
AM_CPPFLAGS += -D_UBWC_
endif

#Hypervisor
sources += ../common/src/hypv_intercept.cpp

if TARGETS_THAT_SUPPORT_VQZIP
AM_CPPFLAGS += -D_VQZIP_
endif
Expand All @@ -87,6 +84,7 @@ AM_CPPFLAGS += -I$(top_srcdir)/libc2dcolorconvert/
AM_CPPFLAGS += -I$(top_srcdir)/mm-core/inc/
AM_CPPFLAGS += -I$(top_srcdir)/mm-core/src/common/
AM_CPPFLAGS += -I$(top_srcdir)/libstagefrighthw/
AM_CPPFLAGS += -I$(top_srcdir)/hyp-intercept

sources = src/omx_video_base.cpp
sources += src/omx_video_encoder.cpp
Expand All @@ -102,4 +100,5 @@ libOmxVenc_la_CFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) -fPIC
libOmxVenc_la_LDFLAGS = -lstdc++ -lpthread -llog -lutils -lbinder -lcutils -lglib-2.0 -lbase -ldl -lpthread -shared -lqdMetaData
# -lc2d2 -lgui -lOmxCore -lgpustats -ldl -lpthread
libOmxVenc_la_LDFLAGS += -version-info 0

libOmxVenc_la_LDFLAGS += -L$(top_builddir)/hyp-intercept
libOmxVenc_la_LDFLAGS += -lhypintercept

0 comments on commit dc82d85

Please sign in to comment.