platform/upstream/nnstreamer.git
2 years agofilter/pytorch,caffe2: they have redundant decls.
MyungJoo Ham [Thu, 17 Mar 2022 03:26:12 +0000 (12:26 +0900)]
filter/pytorch,caffe2: they have redundant decls.

Add -Wredundant-decl only when !(pytorch or caffe2), not !(pytorch and caffe2).
Even when only one of the two are included, they have redundant decl warnings.
It appears that we haven't tested cases where only one of pytorch and caffe2 is
enabled.

Fixes #3693

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years agodoc: update README and products
MyungJoo Ham [Mon, 7 Mar 2022 09:27:41 +0000 (18:27 +0900)]
doc: update README and products

- Update paper link
- Update support hardware
- Update product lists

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years ago[Build/PyUtil] dependency to py-util
Jaeyun [Tue, 8 Mar 2022 11:37:14 +0000 (20:37 +0900)]
[Build/PyUtil] dependency to py-util

Add link to python util library in meson.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[CodeClean/Python] possible leak in python subbplugin
Jaeyun [Mon, 7 Mar 2022 09:37:13 +0000 (18:37 +0900)]
[CodeClean/Python] possible leak in python subbplugin

Code clean,
1. possible leak and exception to load python module.
2. remove unnecessary macro.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[TEST/cpp] Wait until pipeline save the files
gichan [Thu, 3 Mar 2022 01:47:41 +0000 (10:47 +0900)]
[TEST/cpp] Wait until pipeline save the files

Wait until pipeline save the files.

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[build/tflite] Check each delegate symbol in build time
Yongjoo Ahn [Fri, 4 Mar 2022 09:02:20 +0000 (18:02 +0900)]
[build/tflite] Check each delegate symbol in build time

- Check each tflite delegate symbol by linking with tflite dep in build time

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[Log] exporting logger
Jaeyun [Thu, 3 Mar 2022 08:25:56 +0000 (17:25 +0900)]
[Log] exporting logger

Log util is available only in nnstreamer repo.
Remove exporting the header for logging.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[SSAT] Enable filter_python3 test to run on target
Aymen Sghaier [Tue, 1 Mar 2022 14:12:37 +0000 (15:12 +0100)]
[SSAT] Enable filter_python3 test to run on target

 - remove exit if build folder not exists
 - bypass pushd failure if build folder not exists

Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
2 years ago[Pkg] add filter-single header
Jaeyun [Fri, 4 Mar 2022 02:50:19 +0000 (11:50 +0900)]
[Pkg] add filter-single header

dev-internal pkg should include filter-single header for single-shot API.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[TEST] Disable python converter tests.
gichan [Mon, 7 Mar 2022 03:35:38 +0000 (12:35 +0900)]
[TEST] Disable python converter tests.

TEMPORAL SOLUTIONS: PLEASE REVERT THIS COMMIT AFTER FIXING THE ISSUE.

When the Python tensor converter test is completed, a deadlock occurs.

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[Util] fix typo and license
Jaeyun [Wed, 2 Mar 2022 09:02:39 +0000 (18:02 +0900)]
[Util] fix typo and license

Fix typo and license in util functions and header.
Update internal function description and remove unnecessary param.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[tensor_filter] Modify the order of caps_intersect_full
Yongjoo Ahn [Thu, 24 Feb 2022 06:53:50 +0000 (15:53 +0900)]
[tensor_filter] Modify the order of caps_intersect_full

- The pipeline reported in #3636 has nego fail issue because the caps is
   fixated with flexible right after tensor_filter.
- To resolve this, change the order of `gst_caps_intersect_full` in transform_caps.
   This makes static format to be chosen.
- This resolves #3636

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[tests] Add a ssat testcase to check proper negotiation
Yongjoo Ahn [Thu, 24 Feb 2022 06:41:51 +0000 (15:41 +0900)]
[tests] Add a ssat testcase to check proper negotiation

- Test whether tensor_filter - tensor_transform pipeline can be
  negotiated with static format, not flexible format.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[transform] Fix transform_caps in direction GST_PAD_SRC
Yongjoo Ahn [Tue, 22 Feb 2022 09:33:13 +0000 (18:33 +0900)]
[transform] Fix transform_caps in direction GST_PAD_SRC

- Since tensor_transform cannot specify the sinkpad's type caps in some modes,
  let the `transform_caps` remove the field in that case

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[fix/common] Fix calling g_string_append with null
Yongjoo Ahn [Tue, 22 Feb 2022 09:20:02 +0000 (18:20 +0900)]
[fix/common] Fix calling g_string_append with null

- Check null before call g_string_append
- This removes the logs `g_string_insert_len: assertion 'len == 0 || val != NULL' failed`

REF: #3666
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[Util] util function to compare tensor-config
Jaeyun [Wed, 2 Mar 2022 06:09:15 +0000 (15:09 +0900)]
[Util] util function to compare tensor-config

remove gst-dependency to compare tensor config.
add return val of invalid condition.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[fix/tests] Fix mem-leak issues in some unittests
Yongjoo Ahn [Fri, 18 Feb 2022 03:19:16 +0000 (12:19 +0900)]
[fix/tests] Fix mem-leak issues in some unittests

- Fix minor mem-leak in lua, snpe, tvm unittests

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[fix/lua] Fix mem-leak of lua filter
Yongjoo Ahn [Fri, 18 Feb 2022 03:17:40 +0000 (12:17 +0900)]
[fix/lua] Fix mem-leak of lua filter

- Use smart pointer for lua script
- Fix minor typo

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[fix/filter] Add check for model file in some filters
Yongjoo Ahn [Fri, 18 Feb 2022 03:14:55 +0000 (12:14 +0900)]
[fix/filter] Add check for model file in some filters

- Add check for `G_FILE_TEST_IS_REGULAR` in some cpp class based filters

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[Single] Rename single-shot files
Gichan Jang [Mon, 7 Feb 2022 06:55:58 +0000 (15:55 +0900)]
[Single] Rename single-shot files

 - Rename the files related to tensor common functions.
   renamed:    gst/nnstreamer/include/nnstreamer_plugin_api_single.h -> gst/nnstreamer/include/nnstreamer_plugin_api_util.h
   renamed:    gst/nnstreamer/tensor_common.c -> gst/nnstreamer/nnstreamer_plugin_api_impl.c
   renamed:    gst/nnstreamer/tensor_common_single.c -> gst/nnstreamer/nnstreamer_plugin_api_util_impl.c
 - Remove unnecessary pipeline utils from nnstreamer-internal header.

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[TEST] Remove gst dep from singleshot test
gichan [Fri, 28 Jan 2022 11:26:52 +0000 (20:26 +0900)]
[TEST] Remove gst dep from singleshot test

Remove gst dependency from singleshot test

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[Filter] Remove gst dependency from filter subplugins.
gichan [Fri, 28 Jan 2022 10:44:14 +0000 (19:44 +0900)]
[Filter] Remove gst dependency from filter subplugins.

Remove gst dependency from tensor filter subplugins.
 - tensorflow, tensorflow-lite, pytorch, nnfw,caffe2

TODO: Other subplugins later.

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[Filter] Remove gst dep from single-shot
Gichan Jang [Wed, 26 Jan 2022 01:54:09 +0000 (10:54 +0900)]
[Filter] Remove gst dep from single-shot

 - Remove gst dependency from single-shot.
 - Separate single-shot package from nnstreamer(pipeline)
 - nnstreamer depends nnstreaner-single package.

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[tests/tflite] Add tests for tflite2
Yongjoo Ahn [Tue, 9 Nov 2021 05:57:56 +0000 (14:57 +0900)]
[tests/tflite] Add tests for tflite2

- Set tensor_filter_ext_enabled when tflite2_support is available
- Add a gtest based test to examine the XNNPACK delegate

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[tflite] Support tflite v2.7.0 for tizen and deian
Yongjoo Ahn [Tue, 9 Nov 2021 05:50:03 +0000 (14:50 +0900)]
[tflite] Support tflite v2.7.0 for tizen and deian

- Remove unnecessary gles dependency
- Support newly introduced xnnpack delegate
- Remove unnecessary build options

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[Filter/trix-engine] Fix svace issue
gichan [Thu, 24 Feb 2022 03:39:15 +0000 (12:39 +0900)]
[Filter/trix-engine] Fix svace issue

 - Initialize class member.
 - Fix bad copy and paste

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[TEST] Increase sleep time of the query test
gichan [Wed, 16 Feb 2022 02:06:28 +0000 (11:06 +0900)]
[TEST] Increase sleep time of the query test

1 second sleep time is not enough to operate query server.
see: https://github.com/nnstreamer/nnstreamer/issues/3657#issuecomment-1038708557

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[filter] Support complex output types for pytorch
Parichay Kapoor [Thu, 3 Feb 2022 03:12:24 +0000 (12:12 +0900)]
[filter] Support complex output types for pytorch

This patch adds support for complex output types for pytorch, where the
complex output is serialized before being passed out to the gstreamer
based element - tensorfilter.

V2:
- Added more comprehensive error messages
- Added indentation fix

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
2 years ago[Build] Disable trix engine support for TV releases accepted/tizen/unified/20220223.132517 submit/tizen/20220222.112350
yelini-jeong [Tue, 22 Feb 2022 04:42:50 +0000 (13:42 +0900)]
[Build] Disable trix engine support for TV releases

This patch disables trix_engine_support for TV releases.

Signed-off-by: yelini-jeong <yelini.jeong@samsung.com>
2 years agoFix build error - unused param, sign comapre accepted/tizen/unified/20220221.080248 submit/tizen/20220221.055747
gichan [Mon, 21 Feb 2022 02:21:15 +0000 (11:21 +0900)]
Fix build error - unused param, sign comapre

 Fix build error caused by unused param.
  - Ignore auto generated files (flatbuf, protobuf)
 Fix different sign compare

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[MqttSrc/Sink] release mqtt handle
Jaeyun [Tue, 15 Feb 2022 02:33:26 +0000 (11:33 +0900)]
[MqttSrc/Sink] release mqtt handle

Destroy mqtt-async handle when the element instance is finalized.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Svace] fix svace issues
Jaeyun [Fri, 11 Feb 2022 04:56:42 +0000 (13:56 +0900)]
[Svace] fix svace issues

Fix svace issues
- init local variable
- check allocation failure case

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[trivial/doc] Update android guide: gstreamer v1.16.2 -> v1.20.0
Yongjoo Ahn [Fri, 11 Feb 2022 07:30:34 +0000 (16:30 +0900)]
[trivial/doc] Update android guide: gstreamer v1.16.2 -> v1.20.0

- Update android guide: gstreamer version v1.16.2 -> v1.20.0

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[test/ssat] Disable proto flat flex buf SSAT tests when there are no supports
Yongjoo Ahn [Fri, 4 Feb 2022 04:51:57 +0000 (13:51 +0900)]
[test/ssat] Disable proto flat flex buf SSAT tests when there are no supports

- Disable protobuf, flatbuf, flexbuf SSAT tests when related libs did  not built

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[Docker] Remove the existing Dockerfiles for Ubuntu 16.04 and 18.04
Wook Song [Sat, 29 Jan 2022 02:08:13 +0000 (11:08 +0900)]
[Docker] Remove the existing Dockerfiles for Ubuntu 16.04 and 18.04

This patch replaces the existing Dockerfiles corresponding to Ubuntu
16.04 and 18.04 each with the one Dockerfile that has adopted
multi-stage build and build-args concepts.

Signed-off-by: Wook Song <wook16.song@samsung.com>
2 years ago[Docker/README] Add brief instructions on Docker support
Wook Song [Sat, 29 Jan 2022 03:53:36 +0000 (12:53 +0900)]
[Docker/README] Add brief instructions on Docker support

This patch adds a README.md file to give brief instructions on getting
started NNStreamer with Docker.

Signed-off-by: Wook Song <wook16.song@samsung.com>
2 years ago[Docker] Containerize the minimal running environment
Wook Song [Fri, 31 Dec 2021 10:49:31 +0000 (19:49 +0900)]
[Docker] Containerize the minimal running environment

This patch modifies the unified Dockerfile to containerize the minimal
running environment of NNStreamer. By using the build argument,
MIN_RUN_ENV, it is possible to build the image installed nnstreamer,
nnstreamer-core, and nnstreamer-configuration packages only.

Signed-off-by: Wook Song <wook16.song@samsung.com>
2 years ago[Docker] Add another stage containing the runtime environment
Wook Song [Fri, 29 Oct 2021 08:25:26 +0000 (17:25 +0900)]
[Docker] Add another stage containing the runtime environment

This patch adds another stage to provide the runtime environment of
NNStreamer using the *.deb files created from the previous build stage.

Signed-off-by: Wook Song <wook16.song@samsung.com>
2 years ago[Docker] Add an intermediate stage that runs debuild
Wook Song [Fri, 29 Oct 2021 08:09:14 +0000 (17:09 +0900)]
[Docker] Add an intermediate stage that runs debuild

This patch adds an intermediate stage which runs debuild to create
debian packages from the nnstreamer source code at the first development
environment stage. Note that a workaround has been applied in order to
temporarily avoid the unittest_mqtt failure issue.

Signed-off-by: Wook Song <wook16.song@samsung.com>
2 years ago[Docker] Integrate the multiple dockerfiles into one
Wook Song [Thu, 30 Sep 2021 12:40:37 +0000 (21:40 +0900)]
[Docker] Integrate the multiple dockerfiles into one

To integrate the multiple dockerfiles into universal one, this patch
introduces the concept of a build-time variable, ARG, and multi-stage
builds in the Dockerfile.

Signed-off-by: Wook Song <wook16.song@samsung.com>
2 years ago[Meson/TRIx] target dependency for trix engine
Jaeyun [Fri, 21 Jan 2022 07:48:11 +0000 (16:48 +0900)]
[Meson/TRIx] target dependency for trix engine

Define target library to build filter-subplugin for trix-engine.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[MQTTSrc] default options before initializaion
Jaeyun [Thu, 3 Feb 2022 11:33:44 +0000 (20:33 +0900)]
[MQTTSrc] default options before initializaion

Bug fix, set default value after initializing connection option.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[filter] Bug fix for pytorch filter with gpu
Parichay Kapoor [Thu, 27 Jan 2022 08:44:04 +0000 (17:44 +0900)]
[filter] Bug fix for pytorch filter with gpu

ptyorch filter when working with gpu backend had bug when converting
between the devices. The tensors returned by the conversion were not
catched. This patch provides the corresponding fix.

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
2 years ago[test/pytorch] Add ssat test for multiple input/output tensor model
Yongjoo Ahn [Mon, 27 Dec 2021 13:31:16 +0000 (22:31 +0900)]
[test/pytorch] Add ssat test for multiple input/output tensor model

- Add a simple test for pytorch model whose input and output are multiple tensors

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[filter/pytorch] Add support for tuple type output
Yongjoo Ahn [Tue, 21 Dec 2021 05:18:54 +0000 (14:18 +0900)]
[filter/pytorch] Add support for tuple type output

- Support torch script model whose output value is `Tuple`

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[Query] Fix invalid return value
Gichan Jang [Thu, 13 Jan 2022 02:37:51 +0000 (11:37 +0900)]
[Query] Fix invalid return value

Fix invalid return value when caps is same.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
2 years ago[Doc] Fix and add new feature of the query.
Gichan Jang [Thu, 13 Jan 2022 00:46:39 +0000 (09:46 +0900)]
[Doc] Fix and add new feature of the query.

 - Fix capability of the query server and client.
 - Add about mqtt-hybrid

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[Test] Add test cases for extra configuration
Sangjung Woo [Fri, 14 Jan 2022 10:41:02 +0000 (19:41 +0900)]
[Test] Add test cases for extra configuration

This patch newly adds the test cases for extra configuration.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
2 years ago[INI] Add extra configuration for product support
Sangjung Woo [Tue, 14 Dec 2021 03:20:34 +0000 (12:20 +0900)]
[INI] Add extra configuration for product support

The product team wants to update the nnstreamer configuration (i.e.
/etc/nnstreamer.ini). However, the partition is Read-Only so it is not
updatable. Because of this reason, they want another nnstreamer
configuration file to meet their request such as product-specific
allowed elements. This patch newly adds the nnstreamer extra
configuration file for product support.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
2 years ago[TRIx-Engine] Add TRIx-Engine plugin
Dongju Chae [Wed, 12 Jan 2022 06:33:14 +0000 (15:33 +0900)]
[TRIx-Engine] Add TRIx-Engine plugin

This patch adds TRIx-Engine tensor filter subplugin implementation.
It requires TRIV2 NPU HW and devel packages from the upstream tizen repo.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
2 years ago[Build] unnecessary build dependency accepted/tizen/unified/20220124.125235 submit/tizen/20220121.055425
Jaeyun [Fri, 14 Jan 2022 11:03:36 +0000 (20:03 +0900)]
[Build] unnecessary build dependency

Update unnecessary dependency of filter sub-plugins.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[decoder/bounding_box] Support decoder for yolov5
Yongjoo Ahn [Mon, 3 Jan 2022 07:25:10 +0000 (16:25 +0900)]
[decoder/bounding_box] Support decoder for yolov5

- Add feature for decoding yolov5 model's output
- Tested with tflite models from https://github.com/ultralytics/yolov5/releases/tag/v6.0

REF: https://github.com/ultralytics/yolov5
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[trivial] Fix some typos in tensordec-boundingbox.c
Yongjoo Ahn [Thu, 30 Dec 2021 04:19:17 +0000 (13:19 +0900)]
[trivial] Fix some typos in tensordec-boundingbox.c

- Fix some trivial typo issues

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[Spec] Enable SNPE filter on DA profile
Sangjung Woo [Thu, 13 Jan 2022 07:33:54 +0000 (16:33 +0900)]
[Spec] Enable SNPE filter on DA profile

Tizen Robot Vacuum cleaner needs the SNPE filter. This patch enables it
on the DA profile.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
2 years ago[Test] Fix python custom converter test fail
Gichan Jang [Tue, 11 Jan 2022 06:49:02 +0000 (15:49 +0900)]
[Test] Fix python custom converter test fail

Getting result from python json pareser, result string doesn't contain
null char, the test fails.
Add null char to the string from python json parser.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
2 years ago[trivial] Fix CRLF endend files to be LF ended
Yongjoo Ahn [Tue, 11 Jan 2022 04:32:15 +0000 (13:32 +0900)]
[trivial] Fix CRLF endend files to be LF ended

- Replace CRLF with LF

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[Doc] Update debuild guide.
Gichan Jang [Mon, 10 Jan 2022 08:20:16 +0000 (17:20 +0900)]
[Doc] Update debuild guide.

Add description for nnfw ppa.

Related issue: #3612

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
2 years ago[Conf] Update the name of 'restricted-elements'
Sangjung Woo [Thu, 6 Jan 2022 10:23:46 +0000 (19:23 +0900)]
[Conf] Update the name of 'restricted-elements'

The name 'restricted-elements' of nnstreamer configuration is not
matched as its real operation. This patch renames it to
'allowed_elements'.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
2 years ago[Test/Build] fix error on old machine
Jaeyun [Fri, 7 Jan 2022 03:31:34 +0000 (12:31 +0900)]
[Test/Build] fix error on old machine

Fix implicit declaration on old machine.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[TEST] Changed the comparison method of the padded video.
Gichan Jang [Thu, 30 Dec 2021 07:37:02 +0000 (16:37 +0900)]
[TEST] Changed the comparison method of the padded video.

If the test runs with the valgrind, the comparison of the padded video fails.
(Related issue: https://github.com/nnstreamer/nnstreamer/issues/1367)
Zero was padded when running without the valgrind, but trash value was padded when running with the valgrind.
The comparison of the padded data is meaningless, it is modified to compare only the actual data.

Signed-off-by: gichan <gichan2.jang@samsung.com>
Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
2 years ago[TEST] Move replace_string to unittest_util.
gichan [Wed, 5 Jan 2022 03:27:59 +0000 (12:27 +0900)]
[TEST] Move replace_string to unittest_util.

Since `repace_string` is copied to nnstreamer/api and `replace_string` is only used for unit test, moves it to unit test util.
And the test related to `replace_string` is moved to nnstreamer/api.

Test to replace string to check unintended change.

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[Filter] set default fw in common
Jaeyun [Wed, 5 Jan 2022 08:45:15 +0000 (17:45 +0900)]
[Filter] set default fw in common

Fix mem leak, init default framework in filter-common function.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[fix/bug] Fix destructor of cpp class subplugin submit/tizen/20220106.040326
Yongjoo Ahn [Wed, 5 Jan 2022 08:20:53 +0000 (17:20 +0900)]
[fix/bug] Fix destructor of cpp class subplugin

- Fix pointer for subplugin in `cpp_close`
- Fix edgetpu and snpe filter's model path free function

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[TEST] Wait for the server to start and fix comment.
Gichan Jang [Wed, 29 Dec 2021 07:40:12 +0000 (16:40 +0900)]
[TEST] Wait for the server to start and fix comment.

 - Wait for the server to start.
    If client attempts to connect to the server when the server is not ready, it may  fails.
    Previous PR, sleep time was omitted only in Test 7.
 - Fix invalid comment.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
2 years ago[Spec] Remove invalid elements from restricted elements.
Gichan Jang [Wed, 29 Dec 2021 04:51:01 +0000 (13:51 +0900)]
[Spec] Remove invalid elements from restricted elements.

Remove invalid elements from restricted elements.
  queryclient -> tensor_query_client
  queryserversrc -> tensor_query_serversrc
  queryserversink -> tensor_query_serversink

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
2 years ago[TEST/util] Change getTempFileName function
Gichan Jang [Thu, 23 Dec 2021 05:43:07 +0000 (14:43 +0900)]
[TEST/util] Change getTempFileName function

When creating a temp file name, it is set to create a unique name, but duplicated temp names may occasionally generated because we remove generated file and get the temp name only.
So sometimes duplicated temp filed names generated when creating temp filenames multiple times.

For example, generate tmp filename 5 times, tmp2 and tmp3 is duplicated.

[  200s] ** (unittest_cppfilter:132252): CRITICAL **: 05:07:52.416: tmp1: /tmp/nnstreamer_unittest_temp_UJOPE1
[  200s]
[  200s] ** (unittest_cppfilter:132252): CRITICAL **: 05:07:52.416: tmp2: /tmp/nnstreamer_unittest_temp_VIOPE1
[  200s]
[  200s] ** (unittest_cppfilter:132252): CRITICAL **: 05:07:52.416: tmp3: /tmp/nnstreamer_unittest_temp_VIOPE1
[  200s]
[  200s] ** (unittest_cppfilter:132252): CRITICAL **: 05:07:52.416: tmp4: /tmp/nnstreamer_unittest_temp_AJOPE1
[  200s]
[  200s] ** (unittest_cppfilter:132252): CRITICAL **: 05:07:52.416: tmp5: /tmp/nnstreamer_unittest_temp_ILOPE1

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[Common] Add error message for tensor common functions accepted/tizen/unified/20211222.230213 submit/tizen/20211221.100006
gichan [Mon, 13 Dec 2021 08:37:07 +0000 (17:37 +0900)]
[Common] Add error message for tensor common functions

Add error message for tensor common functions.

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[Coverity] Fix use after free
yelini-jeong [Thu, 16 Dec 2021 06:55:01 +0000 (15:55 +0900)]
[Coverity] Fix use after free

This patch fixes coverity issues (WGID 131439, CID 1243725)

Signed-off-by: yelini-jeong <yelini.jeong@samsung.com>
2 years ago[Filter/TFLite] Fix delegates deleter usage
Julien Vuillaumier [Wed, 15 Dec 2021 18:23:21 +0000 (19:23 +0100)]
[Filter/TFLite] Fix delegates deleter usage

On pipeline stop, crash in TFLite filter may be seen with some
delegates with log signature:

Setting pipeline to NULL ...
free(): invalid pointer

Pipeline termination procedure is then aborted.

TFlite delegates shall be released by specific deleter, provided
by their respective interface.
TFLite filter implementation manages delegates instance with
smart pointers for automatic disposal when interpreter goes out of
of scope.

Care should be taken to bind relevant delegate deleter to the
smart pointer, otherwise trivial deleter is used for the managed
pointer which may crash.

Signed-off-by: Julien Vuillaumier <julien.vuillaumier@nxp.com>
2 years ago[Query] Check whether cap is fixed or not.
Gichan Jang [Fri, 10 Dec 2021 09:13:52 +0000 (18:13 +0900)]
[Query] Check whether cap is fixed or not.

 - Check whether the cap is fixed or not before setting the cap.
 - If the tensor format is not fixed, static is set as default format.
 - Set the framerate of the source to the same as the sink.

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[Query] error handing in query-server init
Jaeyun [Tue, 14 Dec 2021 07:18:51 +0000 (16:18 +0900)]
[Query] error handing in query-server init

Fix possible resource leak - handle error case in query-server init.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Test/Query] fix invalid param
Jaeyun [Tue, 14 Dec 2021 07:39:02 +0000 (16:39 +0900)]
[Test/Query] fix invalid param

Fix invalid param - instance after launching test pipeline.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Typo] Fix some typos in query serversink
Dongju Chae [Tue, 14 Dec 2021 06:25:06 +0000 (15:25 +0900)]
[Typo] Fix some typos in query serversink

This patch fixes some typos in query serversink.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
2 years agofilter/tensorflow-lite: loadModel error message
MyungJoo Ham [Mon, 13 Dec 2021 08:07:42 +0000 (17:07 +0900)]
filter/tensorflow-lite: loadModel error message

For developers, we need to elaborate error messages.
The error messages should have enough information to
understand what's wrong and what to fix.

We will be updating all error messages of nnstreamer.

This helps #3603
This is part of #3475

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years ago[Query] client id in connection handle
Jaeyun [Mon, 13 Dec 2021 11:29:57 +0000 (20:29 +0900)]
[Query] client id in connection handle

1. Add new function to set client ID.
2. Remove unnecessary value - protocol in cmd data. The connection handle includes this value.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Query] Set timestamp for each buffer.
Gichan Jang [Thu, 9 Dec 2021 09:11:41 +0000 (18:11 +0900)]
[Query] Set timestamp for each buffer.

Set timestamp for each buffer.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
2 years ago[Decoder] Decode tensors to octet stream.
Gichan Jang [Thu, 4 Nov 2021 06:41:15 +0000 (15:41 +0900)]
[Decoder] Decode tensors to octet stream.

Decode tensors to octet stream.
If tensor format is flexible, remove the header.

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[TEST] Change filesink buffer mode.
Gichan Jang [Fri, 10 Dec 2021 02:10:59 +0000 (11:10 +0900)]
[TEST] Change filesink buffer mode.

Change filesink buffer mode to ubnuffered.
Related issue: https://github.com/nnstreamer/nnstreamer/issues/3275

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
2 years ago[Query] Change error message when GstMeta is invalid.
gichan [Tue, 7 Dec 2021 08:42:04 +0000 (17:42 +0900)]
[Query] Change error message when GstMeta is invalid.

Some GStreamer element don't copy GstMeta. So tensor query cannot handle
buffer.
Change error message when GstMeta is invalid and stop pipeline.
The available elements table is not completed yet and will change frequently, so I will write it on the wiki page first.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
2 years ago[filter] Add a time duration log of filter open
Yongjoo Ahn [Thu, 9 Dec 2021 01:23:30 +0000 (10:23 +0900)]
[filter] Add a time duration log of filter open

- Some filter using hardware accelerator consume quite time for loading model file.
- Add log for what time it takes.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[Query] fix invalid data size
Jaeyun [Thu, 9 Dec 2021 07:18:36 +0000 (16:18 +0900)]
[Query] fix invalid data size

1. Fix invalid data size - caps string length.
2. Clearly define client and server param and update log message.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years agoTest: enhancing log behaviors for unittest
MyungJoo Ham [Fri, 19 Nov 2021 05:51:41 +0000 (14:51 +0900)]
Test: enhancing log behaviors for unittest

1. Add a dlog_print hijacker that makes dlog calls independent
from dlog daemon and drivers. As a result, developers can now
read the dlog log messages of unittests in gbs environment.

2. Clean up a bit of meson.build dependency declaration of
unit tests.

3. A unit test without direct dlog call is updated to call
it directly so that the hijacker is linked (edgetpu).

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years ago[Doc] Add meson build example.
Gichan Jang [Wed, 8 Dec 2021 08:25:49 +0000 (17:25 +0900)]
[Doc] Add meson build example.

Add a simple example of the meson build for a beginner.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
2 years ago[Common] change log level to get tensor-config
Jaeyun [Wed, 8 Dec 2021 05:43:07 +0000 (14:43 +0900)]
[Common] change log level to get tensor-config

Change log level and add proper message to set default tensor format.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[doc] query and image update
yelini-jeong [Tue, 7 Dec 2021 07:48:32 +0000 (16:48 +0900)]
[doc] query and image update

This patch updates query and image for tutorial 4

Signed-off-by: yelini-jeong <yelini.jeong@samsung.com>
2 years agomeson: use version_copmare()
MyungJoo Ham [Mon, 6 Dec 2021 02:42:19 +0000 (11:42 +0900)]
meson: use version_copmare()

Do not compare version strings with general operators.
Use version_compare() API instead.

Reported by #3591

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years ago[Query] set default timeout
Jaeyun [Thu, 2 Dec 2021 10:01:43 +0000 (19:01 +0900)]
[Query] set default timeout

Define common timeout for tensor-query.

TODO: we should handle timeout in query-server elements.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Query/CodeClean] remove unnecessary util functions
Jaeyun [Thu, 2 Dec 2021 09:36:14 +0000 (18:36 +0900)]
[Query/CodeClean] remove unnecessary util functions

Code clean on tensor-query elements.
1. fix build issue on old machine (undefined ref).
2. remove unnecessary util functions.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Query] util function to receive data
Jaeyun [Wed, 1 Dec 2021 10:41:26 +0000 (19:41 +0900)]
[Query] util function to receive data

Add util function to receive data and generate gst-buffer.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years agomeson.build: Fixup for multilib support
Julien Vuillaumier [Mon, 29 Nov 2021 14:08:30 +0000 (15:08 +0100)]
meson.build: Fixup for multilib support

meson.build:
moved nnstreamer_prefix definition upward, before its first usage.

packaging/nnstreamer.spec:
corrected subplugindir definition to rely on actual %{_prefix} variable
and use the expected %{_prefix}/lib/nnstreamer path.

Signed-off-by: Julien Vuillaumier <julien.vuillaumier@nxp.com>
2 years agomeson.build: Fix sideeffects of subplugin install fix
MyungJoo Ham [Fri, 5 Nov 2021 07:36:25 +0000 (16:36 +0900)]
meson.build: Fix sideeffects of subplugin install fix

The PR #3554 breaks conventional non-multilib builds of x64/aarch64
systems (Tizen/Ubuntu). This fixes this side-effect.

Todo: fix Yocto build afterwards.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Cherry-picked from https://github.com/panfir/nnstreamer/pull/1

Signed-off-by: Julien Vuillaumier <julien.vuillaumier@nxp.com>
2 years agomeson.build: Fix subplugin install
Cristinel Panfir [Thu, 4 Nov 2021 13:39:04 +0000 (15:39 +0200)]
meson.build: Fix subplugin install

Use 'libdir' for library path to cover a multilib envoironment.

These checks are usually done before release, for example in the scenario
where images are created for a 64-bit target (imx8 * boards) but which also
supports running 32-bit applications.

This is the error in a linux/yocto build:

| ERROR: nnstreamer-2.0.0-r0 do_package: QA Issue: nnstreamer: Files/directories were installed but not shipped in any package:
|   /usr/lib/nnstreamer/customfilters/libnnstreamer_customfilter_passthrough_variable.so
|   /usr/lib/nnstreamer/customfilters/libdummyLSTM.so
|   /usr/lib/nnstreamer/customfilters/libnnstreamer_customfilter_scaler.so
|   /usr/lib/nnstreamer/customfilters/libnnstreamer_customfilter_average.so
|   /usr/lib/nnstreamer/customfilters/libnnstreamer_customfilter_scaler_allocator.so
|   /usr/lib/nnstreamer/customfilters/libnnscustom_drop_buffer.so
|   /usr/lib/nnstreamer/customfilters/libnnscustom_framecounter.so
|   /usr/lib/nnstreamer/customfilters/libdummyRNN.so
|   /usr/lib/nnstreamer/customfilters/libnnstreamer_customfilter_passthrough.so
|   /usr/lib/nnstreamer/converters/libnnstreamer_converter_protobuf.so
|   /usr/lib/nnstreamer/converters/libnnstreamer_converter_python3.so
|   /usr/lib/nnstreamer/decoders/libnnstreamer_decoder_bounding_boxes.so
|   /usr/lib/nnstreamer/decoders/libnnstreamer_decoder_direct_video.so
|   /usr/lib/nnstreamer/decoders/libnnstreamer_decoder_pose_estimation.so
|   /usr/lib/nnstreamer/decoders/libnnstreamer_decoder_image_labeling.so
|   /usr/lib/nnstreamer/decoders/libnnstreamer_decoder_image_segment.so
|   /usr/lib/nnstreamer/decoders/libnnstreamer_decoder_python3.so
|   /usr/lib/nnstreamer/decoders/libnnstreamer_decoder_protobuf.so
|   /usr/lib/nnstreamer/filters/libnnstreamer_filter_cpp.so
|   /usr/lib/nnstreamer/filters/libnnstreamer_filter_armnn.so
|   /usr/lib/nnstreamer/filters/libnnstreamer_filter_python3.so
|   /usr/lib/nnstreamer/filters/libnnstreamer_filter_tensorflow2-lite.so
|   /usr/lib/nnstreamer/extra/nnstreamer_python3.so
| Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
| nnstreamer: 23 installed and not shipped files. [installed-vs-shipped]

Signed-off-by: Cristinel Panfir <cristinel.panfir@nxp.com>
Cherry-picked from https://github.com/nnstreamer/nnstreamer/pull/3554

Signed-off-by: Julien Vuillaumier <julien.vuillaumier@nxp.com>
2 years ago[Mux/Merge] Change meta copy policy
gichan [Wed, 24 Nov 2021 10:28:33 +0000 (19:28 +0900)]
[Mux/Merge] Change meta copy policy

Currently, GstMeta of the buffer from first pad is used.
Change to copy GstMeta same with sync mode of the tnesor mux and merge.

Signed-off-by: gichan <gichan2.jang@samsung.com>
Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
2 years ago[TEST] Wait for the server to start
gichan [Wed, 1 Dec 2021 07:07:31 +0000 (16:07 +0900)]
[TEST] Wait for the server to start

Wait for the server to start.
If client attempts to connect to the server when the server is not
ready, it may  fails.

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[Query] Change tensor query to accpet ANY caps
Gichan Jang [Mon, 15 Nov 2021 03:21:57 +0000 (12:21 +0900)]
[Query] Change tensor query to accpet ANY caps

Change tensor query to accetp ANY caps.

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[Query] util function to send gst-buffer
Jaeyun [Wed, 1 Dec 2021 05:25:00 +0000 (14:25 +0900)]
[Query] util function to send gst-buffer

Code clean, add util function to send gst-buffer to destination.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Spec] Add restricted_element_vd for VD element
Sangjung Woo [Wed, 1 Dec 2021 08:29:41 +0000 (17:29 +0900)]
[Spec] Add restricted_element_vd for VD element

This patch newly adds the restricted_element_vd for VD specialized
elements.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
2 years ago[Query] fix invalid socket mode
Jaeyun [Wed, 1 Dec 2021 09:42:29 +0000 (18:42 +0900)]
[Query] fix invalid socket mode

Fix socket op mode, blocking IO is unnecessary with multi-threaded server node.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Doc] Fix bad links
yelini-jeong [Wed, 1 Dec 2021 06:56:26 +0000 (15:56 +0900)]
[Doc] Fix bad links

This patch fixes bad links in documentation.

Signed-off-by: yelini-jeong <yelini.jeong@samsung.com>
**Self evaluation:**
1. Build test: [ ]Passed [ ]Failed [X]Skipped
2. Run test: [ ]Passed [ ]Failed [X]Skipped

2 years ago[fix/query] Fix the order of calling `g_socket_listener_set_backlog`
Yongjoo Ahn [Tue, 30 Nov 2021 06:22:50 +0000 (15:22 +0900)]
[fix/query] Fix the order of calling `g_socket_listener_set_backlog`

- backlog should be set before adding address or socket to listener.
REF:
https://people.gnome.org/~ebassi/docs/_build/Gio/method.SocketListener.set_backlog.html#description

- This commit should remove the following error logs:
```
...
GLib-GIO-CRITICAL **: 15:20:18.773: g_socket_set_listen_backlog: assertion '!socket->priv->listening' failed
...
```

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>