Skip to content

Commit

Permalink
[android] Let it build and use orc from nnstreamer
Browse files Browse the repository at this point in the history
- Let android build use nnstreamer's orc code (tensor_transform).

Signed-off-by: Yongjoo Ahn <[email protected]>
  • Loading branch information
anyj0527 committed Nov 27, 2024
1 parent 5c9eb47 commit 0095ec7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions java/android/nnstreamer/src/main/jni/Android-nnstreamer.mk
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,21 @@ NNSTREAMER_SRC_FILES += \
$(NNSTREAMER_DECODER_IS_SRCS) \
$(NNSTREAMER_JOIN_SRCS)

ifeq ($(shell which orcc),)
$(info No 'orcc' in your PATH, install it to enable orc.)
else
$(info Compile ORC code)
$(shell mkdir -p $(LOCAL_PATH)/orc)
$(shell orcc --header -o $(LOCAL_PATH)/orc/nnstreamer-orc.h $(NNSTREAMER_ORC_SRC))
$(shell orcc --implementation -o $(LOCAL_PATH)/orc/nnstreamer-orc.c $(NNSTREAMER_ORC_SRC))

NNSTREAMER_SRC_FILES += $(LOCAL_PATH)/orc/nnstreamer-orc.c
NNSTREAMER_CAPI_INCLUDES += $(LOCAL_PATH)/orc
NNSTREAMER_CAPI_INCLUDES += $(GSTREAMER_ROOT)/include/orc-0.4

NNS_API_FLAGS += -DHAVE_ORC=1
endif

ifeq ($(ENABLE_TENSOR_QUERY), true)
ifndef NNSTREAMER_EDGE_ROOT
$(error NNSTREAMER_EDGE_ROOT is not defined!)
Expand Down
2 changes: 1 addition & 1 deletion java/android/nnstreamer/src/main/jni/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ GST_BLOCKED_PLUGINS := \
rsaudiofx rsvideofx

GSTREAMER_PLUGINS := $(filter-out $(GST_BLOCKED_PLUGINS), $(GST_REQUIRED_PLUGINS))
GSTREAMER_EXTRA_DEPS := $(GST_REQUIRED_DEPS) glib-2.0 gio-2.0 gmodule-2.0
GSTREAMER_EXTRA_DEPS := $(GST_REQUIRED_DEPS) glib-2.0 gio-2.0 gmodule-2.0 orc-0.4
GSTREAMER_EXTRA_LIBS := $(GST_REQUIRED_LIBS) -liconv

ifeq ($(NNSTREAMER_API_OPTION),all)
Expand Down

0 comments on commit 0095ec7

Please sign in to comment.