/usr/include/nnstreamer/*.h
/usr/lib/*/pkgconfig/*.pc
/usr/lib/*/libnnstreamer.a
-/usr/lib/*/libtensor_filter*.a
+/usr/lib/*/libnnstreamer_filter*.a
/usr/lib/*/libnnstreamer_plugin_api.a
-/usr/lib/*/libtensor_filter_*.so
+/usr/lib/nnstreamer/filters/libnnstreamer_filter_*.so
/usr/lib/*/gstreamer-1.0/*.so
/usr/lib/*/libnnstreamer_plugin_api.so
/etc/nnstreamer.ini
--- /dev/null
+
+if have_tensorflow
+ tensor_filter_tfcore_lib_shared = shared_library('nnstreamer_filter_tensorflow',
+ [
+ 'tensor_filter_tensorflow_core.cc',
+ 'tensor_filter_tensorflow.c'
+ ],
+ cpp_args: ['-Wno-sign-compare'],
+ dependencies: [tf_dep, protobuf_dep, nnstreamer_dep],
+ include_directories: nnstreamer_inc,
+ install: true,
+ install_dir: join_paths(subplugin_install_prefix, 'filters')
+ )
+
+ tensor_filter_tfcore_lib_static = static_library('nnstreamer_filter_tensorflow',
+ [
+ 'tensor_filter_tensorflow_core.cc',
+ 'tensor_filter_tensorflow.c'
+ ],
+ cpp_args: ['-Wno-sign-compare'],
+ dependencies: [tf_dep, protobuf_dep, nnstreamer_dep],
+ include_directories: nnstreamer_inc,
+ install: true,
+ install_dir: nnstreamer_libdir
+ )
+endif
+
+if have_tensorflow_lite
+ tensor_filter_tflitecore_lib_shared = shared_library('nnstreamer_filter_tensorflow-lite',
+ [
+ 'tensor_filter_tensorflow_lite_core.cc',
+ 'tensor_filter_tensorflow_lite.c'
+ ],
+ cpp_args: ['-Wno-sign-compare'],
+ dependencies: [tflite_dep, nnstreamer_dep],
+ include_directories: nnstreamer_inc,
+ install: true,
+ install_dir: join_paths(subplugin_install_prefix, 'filters')
+ )
+
+ tensor_filter_tflitecore_lib_static = static_library('nnstreamer_filter_tensorflow-lite',
+ [
+ 'tensor_filter_tensorflow_lite_core.cc',
+ 'tensor_filter_tensorflow_lite.c'
+ ],
+ cpp_args: ['-Wno-sign-compare'],
+ dependencies: [tflite_dep, nnstreamer_dep],
+ include_directories: nnstreamer_inc,
+ install: true,
+ install_dir: nnstreamer_libdir
+ )
+endif
* @brief API to notify subplugin-manager that this subplugin is handled already.
*/
void
-hold_register_subplugin (subpluginType type, const char *name, void *data)
+hold_register_subplugin (subpluginType type, const char *name, const void *data)
{
+ holdplugins *ptr;
+
if (held_subplugins[type] == NULL)
held_subplugins[type] =
g_hash_table_new_full (g_str_hash, g_str_equal, g_free,
_heldsp_destroy);
- g_hash_table_insert (held_subplugins[type], g_strdup (name), data);
+
+ ptr = g_new (holdplugins, 1);
+ ptr->name = g_strdup (name);
+ ptr->data = data;
+ g_hash_table_insert (held_subplugins[type], g_strdup (name), ptr);
}
/**
static const void *
check_held_subplugin (subpluginType type, const char *name)
{
+ holdplugins *ptr;
+
if (held_subplugins[type] == NULL)
return NULL;
- return g_hash_table_lookup (held_subplugins[type], name);
+ ptr = g_hash_table_lookup (held_subplugins[type], name);
+
+ if (ptr)
+ return ptr->data;
+ return NULL;
}
/** @brief Private function for g_hash_table data destructor, GDestroyNotify */
/**
* @brief Call this at subplugin probe to avoid duplicated registration
*/
-extern void hold_register_subplugin (subpluginType type, const char *name, void *data);
+extern void
+hold_register_subplugin (subpluginType type, const char *name, const void *data);
#endif /* __GST_NNSTREAMER_SUBPLUGIN_H__ */
'tensor_filter_custom.c'
]
-if have_tensorflow
- tensor_filter_sources += ['tensor_filter_tensorflow.c']
-
- tensor_filter_tfcore_lib_shared = shared_library('tensor_filter_tensorflow',
- ['tensor_filter_tensorflow_core.cc'],
- cpp_args: ['-Wno-sign-compare'],
- dependencies: [tf_dep, protobuf_dep, glib_dep, gst_dep],
- include_directories: nnstreamer_inc,
- install: true,
- install_dir: subplugins_install_dir
- )
-
- tensor_filter_tfcore_lib_static = static_library('tensor_filter_tensorflow',
- ['tensor_filter_tensorflow_core.cc'],
- cpp_args: ['-Wno-sign-compare'],
- dependencies: [tf_dep, protobuf_dep, glib_dep, gst_dep],
- include_directories: nnstreamer_inc,
- install: true,
- install_dir: subplugins_install_dir
- )
-
- tensor_filter_tfcore_lib = tensor_filter_tfcore_lib_shared
- if get_option('default_library') == 'static'
- tensor_filter_tfcore_lib = tensor_filter_tfcore_lib_static
- endif
-
- tensor_filter_tfcore_dep = declare_dependency(link_with: tensor_filter_tfcore_lib)
- nnstreamer_extra_deps += tensor_filter_tfcore_dep
-endif
-
-if have_tensorflow_lite
- tensor_filter_sources += ['tensor_filter_tensorflow_lite.c']
-
- tensor_filter_tflitecore_lib_shared = shared_library('tensor_filter_tensorflow-lite',
- ['tensor_filter_tensorflow_lite_core.cc'],
- cpp_args: ['-Wno-sign-compare'],
- dependencies: [tflite_dep, thread_dep, libdl_dep, glib_dep, gst_dep],
- include_directories: nnstreamer_inc,
- install: true,
- install_dir: subplugins_install_dir
- )
-
- tensor_filter_tflitecore_lib_static = static_library('tensor_filter_tensorflow-lite',
- ['tensor_filter_tensorflow_lite_core.cc'],
- cpp_args: ['-Wno-sign-compare'],
- dependencies: [tflite_dep, thread_dep, libdl_dep, glib_dep, gst_dep],
- include_directories: nnstreamer_inc,
- install: true,
- install_dir: subplugins_install_dir
- )
-
- tensor_filter_tflitecore_lib = tensor_filter_tflitecore_lib_shared
- if get_option('default_library') == 'static'
- tensor_filter_tflitecore_lib = tensor_filter_tflitecore_lib_static
- endif
-
- tensor_filter_tflitecore_dep = declare_dependency(link_with: tensor_filter_tflitecore_lib)
- nnstreamer_extra_deps += tensor_filter_tflitecore_dep
-endif
-
foreach s : tensor_filter_sources
nnstreamer_sources += join_paths(meson.current_source_dir(), s)
endforeach
# Build nnstreamer (common, plugins)
subdir('gst')
+# Build ext subplugins (filter-subplugins)
+subdir('ext/nnstreamer/tensor_filter')
+
# Build nnstreamer examples
if get_option('enable-test') or get_option('install-example')
subdir('nnstreamer_example')
./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
%manifest nnstreamer.manifest
%defattr(-,root,root,-)
%license LICENSE
-%{_libdir}/libtensor_filter_*.so
+%{_prefix}/lib/nnstreamer/filters/libnnstreamer_filter_*.so
%{gstlibdir}/*.so
%{_libdir}/libnnstreamer_plugin_api.so
%{_sysconfdir}/nnstreamer.ini