/usr/include/nnstreamer/*.h
/usr/lib/*/pkgconfig/*.pc
-/usr/lib/*/libnnstreamer.a
-/usr/lib/*/libnnstreamer_filter*.a
+/usr/lib/*/*.a
/usr/lib/nnstreamer/filters/libnnstreamer_filter_*.so
+/usr/lib/nnstreamer/decoders/libnnstreamer_decoder_*.so
/usr/lib/*/gstreamer-1.0/*.so
/etc/nnstreamer.ini
ROOT_DIR:=$(shell pwd)
export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
+export LD_LIBRARY_PATH=${ROOT_DIR}/build/gst/nnstreamer
+export GST_PLUGIN_PATH=${ROOT_DIR}/build/gst/nnstreamer
+export NNSTREAMER_FILTERS=${ROOT_DIR}/build/ext/nnstreamer/tensor_filter
+export NNSTREAMER_DECODERS=${ROOT_DIR}/build/ext/nnstreamer/tensor_decoder
ifneq ($(filter $(DEB_HOST_ARCH),amd64 arm64),)
enable_tf=true
ninja -C build
override_dh_auto_test:
- export LD_LIBRARY_PATH=${ROOT_DIR}/build/gst/nnstreamer:${ROOT_DIR}/build/gst/nnstreamer/tensor_filter
- export GST_PLUGIN_PATH=${ROOT_DIR}/build
- export NNSTREAMER_FILTERS=${ROOT_DIR}/build/ext/nnstreamer/tensor_filter
- export NNSTREAMER_DECODERS=${ROOT_DIR}/build/gst/nnstreamer/tensor_decoder
- ls -l
cd build && ./tests/unittest_common && cd ..
cd build && ./tests/unittest_sink --gst-plugin-path=. && cd ..
cd build && ./tests/unittest_plugins --gst-plugin-path=. && cd ..
--- /dev/null
+tensor_decoder_directvideo_shared = shared_library('nnstreamer_decoder_direct_video',
+ [ 'tensordec-directvideo.c' ],
+ dependencies: [nnstreamer_dep, glib_dep, gst_dep],
+ include_directories: nnstreamer_inc,
+ install: true,
+ install_dir: decoder_subplugin_install_dir
+)
+tensor_decoder_directvideo_static = static_library('nnstreamer_decoder_direct_video',
+ [ 'tensordec-directvideo.c' ],
+ dependencies: [nnstreamer_dep, glib_dep, gst_dep],
+ include_directories: nnstreamer_inc,
+ install: true,
+ install_dir: nnstreamer_libdir
+)
+
+tensor_decoder_imagelabel_shared = shared_library('nnstreamer_decoder_image_labeling',
+ [ 'tensordec-imagelabel.c' ],
+ dependencies: [nnstreamer_dep, glib_dep, gst_dep],
+ include_directories: nnstreamer_inc,
+ install: true,
+ install_dir: decoder_subplugin_install_dir
+)
+tensor_decoder_imagelabel_static = static_library('nnstreamer_decoder_image_labeling',
+ [ 'tensordec-imagelabel.c' ],
+ dependencies: [nnstreamer_dep, glib_dep, gst_dep],
+ include_directories: nnstreamer_inc,
+ install: true,
+ install_dir: nnstreamer_libdir
+)
+
+tensor_decoder_boundingbox_shared = shared_library('nnstreamer_decoder_bounding_boxes',
+ [ 'tensordec-boundingbox.c' ],
+ dependencies: [nnstreamer_dep, glib_dep, gst_dep],
+ include_directories: nnstreamer_inc,
+ install: true,
+ install_dir: decoder_subplugin_install_dir
+)
+tensor_decoder_boundingbox_static = static_library('nnstreamer_decoder_bounding_boxes',
+ [ 'tensordec-boundingbox.c' ],
+ dependencies: [nnstreamer_dep, glib_dep, gst_dep],
+ include_directories: nnstreamer_inc,
+ install: true,
+ install_dir: nnstreamer_libdir
+)
#include <glib.h>
#include <gst/gst.h>
#include <math.h> /* expf */
-#include <tensor_common.h>
-#include "tensordec.h"
#include "font.h"
+#include <nnstreamer_plugin_api_decoder.h>
+#include <nnstreamer_plugin_api.h>
#define BOX_SIZE 4
#define TFLITE_SSD_DETECTION_MAX 1917
#include <string.h>
#include <glib.h>
-#include "tensordec.h"
-#include <tensor_common.h>
+#include <gst/video/video-format.h>
+#include <nnstreamer_plugin_api_decoder.h>
/** @brief tensordec-plugin's TensorDecDef callback */
static int
#include <string.h>
#include <glib.h>
#include <gst/gstinfo.h>
-#include <tensor_common.h>
-#include "tensordec.h"
+#include <nnstreamer_plugin_api_decoder.h>
+#include <nnstreamer_plugin_api.h>
/** @brief Internal data structure for image labeling */
typedef struct
extern tensor_type
get_tensor_type (const gchar * typestr);
+/**
+ * @brief Find the index value of the given key string array
+ * @return Corresponding index
+ * @param strv Null terminated array of gchar *
+ * @param key The key string value
+ */
+extern int find_key_strv (const gchar ** strv, const gchar * key);
+
G_END_DECLS
#endif /* __NNS_PLUGIN_API_H__ */
G_BEGIN_DECLS
-#define GST_TENSOR_VIDEO_CAPS_STR \
- GST_VIDEO_CAPS_MAKE ("{ RGB, BGR, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, GRAY8 }") \
- ", views = (int) 1, interlace-mode = (string) progressive"
-
-#define GST_TENSOR_AUDIO_CAPS_STR \
- GST_AUDIO_CAPS_MAKE ("{ S8, U8, S16LE, S16BE, U16LE, U16BE, S32LE, S32BE, U32LE, U32BE, F32LE, F32BE, F64LE, F64BE }") \
- ", layout = (string) interleaved"
-
-#define GST_TENSOR_TEXT_CAPS_STR \
- "text/x-raw, format = (string) utf8"
-
-#define GST_TENSOR_OCTET_CAPS_STR \
- "application/octet-stream"
-
-/**
- * @brief Caps string for supported types
- * @todo Support other types
- */
-#define GST_TENSOR_MEDIA_CAPS_STR \
- GST_TENSOR_VIDEO_CAPS_STR "; " \
- GST_TENSOR_AUDIO_CAPS_STR "; " \
- GST_TENSOR_TEXT_CAPS_STR "; " \
- GST_TENSOR_OCTET_CAPS_STR
-
-#define GST_TENSOR_TYPE_ALL "{ float32, float64, int64, uint64, int32, uint32, int16, uint16, int8, uint8 }"
-
/**
* @brief time synchronization options
*/
gst_tensors_caps_from_config (const GstTensorsConfig * config);
/**
- * @brief Find the index value of the given key string array
- * @return Corresponding index
- * @param strv Null terminated array of gchar *
- * @param key The key string value
- */
-extern int find_key_strv (const gchar ** strv, const gchar * key);
-
-/**
* @brief A callback for typefind, trying to find whether a file is other/tensors or not.
* For the concrete definition of headers, please look at the wiki page of nnstreamer:
* https://github.com/nnsuite/nnstreamer/wiki/Design-External-Save-Format-for-other-tensor-and-other-tensors-Stream-for-TypeFind
tensor_decoder_sources = [
'tensordec.c',
- 'tensordec-directvideo.c',
- 'tensordec-imagelabel.c',
- 'tensordec-boundingbox.c'
]
foreach s : tensor_decoder_sources
* "dimensions = (string) dim1:dim2:dim3:dim4, dim1:dim2:dim3:dim4"
*/
+#define GST_TENSOR_VIDEO_CAPS_STR \
+ GST_VIDEO_CAPS_MAKE ("{ RGB, BGR, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, GRAY8 }") \
+ ", views = (int) 1, interlace-mode = (string) progressive"
+
+#define GST_TENSOR_AUDIO_CAPS_STR \
+ GST_AUDIO_CAPS_MAKE ("{ S8, U8, S16LE, S16BE, U16LE, U16BE, S32LE, S32BE, U32LE, U32BE, F32LE, F32BE, F64LE, F64BE }") \
+ ", layout = (string) interleaved"
+
+#define GST_TENSOR_TEXT_CAPS_STR \
+ "text/x-raw, format = (string) utf8"
+
+#define GST_TENSOR_OCTET_CAPS_STR \
+ "application/octet-stream"
+
+/**
+ * @brief Caps string for supported types
+ * @todo Support other types
+ */
+#define GST_TENSOR_MEDIA_CAPS_STR \
+ GST_TENSOR_VIDEO_CAPS_STR "; " \
+ GST_TENSOR_AUDIO_CAPS_STR "; " \
+ GST_TENSOR_TEXT_CAPS_STR "; " \
+ GST_TENSOR_OCTET_CAPS_STR
+
+#define GST_TENSOR_TYPE_ALL "{ float32, float64, int64, uint64, int32, uint32, int16, uint16, int8, uint8 }"
+
/**
* @brief Possible data element types of other/tensor.
*/
# Build ext subplugins (filter-subplugins)
subdir('ext/nnstreamer/tensor_filter')
+subdir('ext/nnstreamer/tensor_decoder')
# Build nnstreamer examples
if get_option('enable-test') or get_option('install-example')
%if 0%{?unit_test}
pushd build
- export LD_LIBRARY_PATH=$(pwd)/gst/nnstreamer:$(pwd)/gst/nnstreamer/tensor_filter
+ export LD_LIBRARY_PATH=$(pwd)/gst/nnstreamer
+ export GST_PLUGIN_PATH=$(pwd)/gst/nnstreamer
+ export NNSTREAMER_FILTERS=$(pwd)/ext/nnstreamer/tensor_filter
+ export NNSTREAMER_DECODERS=$(pwd)/ext/nnstreamer/tensor_decoder
%ifarch x86_64 aarch64
export TEST_TENSORFLOW=1
%endif
./tests/unittest_sink --gst-plugin-path=.
./tests/unittest_plugins --gst-plugin-path=.
popd
- export NNSTREAMER_FILTERS=$(pwd)/build/ext/nnstreamer/tensor_filter
pushd tests
ssat -n
popd
%defattr(-,root,root,-)
%license LICENSE
%{_prefix}/lib/nnstreamer/filters/libnnstreamer_filter_*.so
+%{_prefix}/lib/nnstreamer/decoders/libnnstreamer_decoder_*.so
%{gstlibdir}/*.so
%{_sysconfdir}/nnstreamer.ini