[ANDROID] Built as Shared Library with tensorflow-lite
authorjijoong.moon <jijoong.moon@samsung.com>
Fri, 14 Jun 2019 04:23:35 +0000 (13:23 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Wed, 24 Jul 2019 05:29:27 +0000 (14:29 +0900)
commit1934aaeaeb1a2c9f5cee1b632e3214fa082b6fe9
tree67864cc9b01d40885d4cf4a8f1350cb4ee83597e
parent86596652222fadcb5382ba77c7545be7fc6a4503
[ANDROID] Built as Shared Library with tensorflow-lite

In order to build nnstreamer shared libraries including
sub-plugins (decoder, filters), the android.mk file is
restructured. Becuse gstreamer building blocks list for nnstreamer might be
required for static build and android application build, it is moved
to nnstreamer.mk.

If you bulid libnnstreamer.so using this android.mk, gstreamer shared
libries should be prepared. Please refere "Build Gstreamer full source
based Android rootFS with Cerbero" in
https://github.com/nnsuite/nnstreamer-example/tree/master/android.

Once the build is finished successfully, you can find libnnstreamer.so
and gstreamer shared libraries in libs/$TARGET_ARCH/ which is listed
in nnstreamer.mk under the name of "NNSTREAMER_BUILDING_BLOCK_LIST".
you can use these to build your own android application.

New script for tensorflow-lite tensor filter library is added. If
there is not tflite source, "prepare_tflite.sh" will download and
prepare the external packages of tflite. Using these source code,
android.mk make tflite static library and use it to build
libnnstreamer_filter_tensorflow-lite.so (which includes static
tensorflowlite.a for android of course)

If you want to build android application statically, you could just use the
macro defined in nnstreamer.mk.

Build NNStreamer as Shared Library.
- Gstreamer Shared Libraries : Cerbero
  : Download and build by yourself
- Tensorflow-lite : If TENSORFLOW_LITE Macro is not defined,
  NNStreamer is going to download and configure
  --> static lib
- NNStreamer : libnnstreamer.so
- NNStreamer tflite : libnnstreamer_filter_tensorflow-lite.so
- NNStreamer decoder: libnnstreamer_decoder_direct_video.so
                      libnnstreamer_decoder_bounding_boxes.so
                      libnnstreamer_decoder_image_labeling.so

**Self evaluation:**
1. Build test:  [X]Passed [ ]Failed [ ]Skipped
2. Run test:  [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
jni/Android.mk [new file with mode: 0644]
jni/nnstreamer.mk
jni/prepare_tflite.sh [new file with mode: 0755]