platform/upstream/nnstreamer.git
3 years ago[Alloc] ref count in allocator
Jaeyun [Tue, 25 May 2021 05:40:39 +0000 (14:40 +0900)]
[Alloc] ref count in allocator

release object after finding allocator, fix possible leak.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Tests/Meson] Include unit tests for GSTMqtt in the meson build script
Wook Song [Thu, 20 May 2021 11:52:41 +0000 (20:52 +0900)]
[Tests/Meson] Include unit tests for GSTMqtt in the meson build script

This patch modifies the meson build script to generate and run the
executable for the unit tests of the GSTMqtt elements.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Tests/GstMQTT] Add skeleton code for MQTT elements' unit test cases
Wook Song [Thu, 20 May 2021 11:40:16 +0000 (20:40 +0900)]
[Tests/GstMQTT] Add skeleton code for MQTT elements' unit test cases

Prior to enabling the dummy operation mode, this patch adds skeleton code
for MQTT elements' unit test cases.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Filter/tvm] set input without memory copy
Junhwan Kim [Fri, 7 May 2021 04:06:16 +0000 (13:06 +0900)]
[Filter/tvm] set input without memory copy

- Update aligned allocator to provide API for memory alignment
- Fix `set_input` to `set_input_zero_copy`
- Requires calling gst_tensor_alloc_init (127) at initial time

Signed-off-by: Junhwan Kim <jejudo.kim@samsung.com>
3 years ago[MQTTsrc] add mqtt QoS as a property
Hyoung Joo Ahn [Thu, 13 May 2021 10:28:24 +0000 (19:28 +0900)]
[MQTTsrc] add mqtt QoS as a property

MQTTsrc will return ack to server when it receives messages according to QoS level.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
3 years ago[Converter/CodeClean] unnecessary memory map
Jaeyun [Tue, 18 May 2021 09:24:44 +0000 (18:24 +0900)]
[Converter/CodeClean] unnecessary memory map

1. remove unnecessary memory map in chain function.
2. failure case when configuring multi tensors.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Gst/MQTT/Src] Keep subscribing to the topic only in the PLAYING state
Wook Song [Fri, 14 May 2021 06:40:10 +0000 (15:40 +0900)]
[Gst/MQTT/Src] Keep subscribing to the topic only in the PLAYING state

This patch makes the subscription be removed when the state of the
element is changed to PAUSED from PLAYING. In addition, to block the
extra invocation of the receiving message handler running on the other
thread, checking the subscription flag is added to this handler.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Coverage/Tools] Ignore coverage report of source codes in tools
Dongju Chae [Mon, 24 May 2021 07:37:46 +0000 (16:37 +0900)]
[Coverage/Tools] Ignore coverage report of source codes in tools

This patch makes the coverage analyzer ignore the reports of source
codes in tools. We don't need to add unittests for tools.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Fix/Trivial] Fix mem leak in tensordec-pose
Yongjoo Ahn [Mon, 24 May 2021 04:27:09 +0000 (13:27 +0900)]
[Fix/Trivial] Fix mem leak in tensordec-pose

- Free allocated string in tensordec-pose

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[TEST] Initialize tensor(s) info and config
Gichan Jang [Mon, 24 May 2021 05:26:42 +0000 (14:26 +0900)]
[TEST] Initialize tensor(s) info and config

Initialize tensor(s) info and config.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[IF] Fix uninitialized value
Gichan Jang [Mon, 24 May 2021 04:59:24 +0000 (13:59 +0900)]
[IF] Fix uninitialized value

Fix uninitialized supplied value 2.
Don't need to check the number of the supplied value.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[TEST] Fix unittest util function
Gichan Jang [Mon, 24 May 2021 04:30:40 +0000 (13:30 +0900)]
[TEST] Fix unittest util function

Fix possible double free case.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years agoRefactor/GRPC: remove duplicated codes
MyungJoo Ham [Tue, 18 May 2021 04:45:43 +0000 (13:45 +0900)]
Refactor/GRPC: remove duplicated codes

grpc-sink and grpc-src have duplicated codes. Remove them.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[Tool/Parser] check null ptr
Jaeyun [Thu, 20 May 2021 03:35:23 +0000 (12:35 +0900)]
[Tool/Parser] check null ptr

In tool/parser, check null ptr before comparing the id.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Gst/MQTT] Revise README.md
Wook Song [Thu, 20 May 2021 04:21:52 +0000 (13:21 +0900)]
[Gst/MQTT] Revise README.md

This patch slightly revises README.md.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Converter/CodeClean] remove unnecessary arg
Jaeyun [Mon, 17 May 2021 11:19:36 +0000 (20:19 +0900)]
[Converter/CodeClean] remove unnecessary arg

Code clean, remove unnecessary arg in converter internal functions.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Tools/Parser] Convert gst pipeline to pbtxt (w/ mediapipe demo site)
Dongju Chae [Thu, 13 May 2021 07:48:32 +0000 (16:48 +0900)]
[Tools/Parser] Convert gst pipeline to pbtxt (w/ mediapipe demo site)

This patch converts gst pipeline to pbtxt. It also works on mediapipe demo site.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years agoAdding information about misc ppa
shortcipher3 [Mon, 17 May 2021 15:00:14 +0000 (09:00 -0600)]
Adding information about misc ppa

Adding information about misc ppa to make join plugin more discoverable, also added details to make other packages more discoverable.

Signed-off-by: shortcipher3 <chris.jon.hall@gmail.com>
3 years ago[Crop] output framerate
Jaeyun [Fri, 14 May 2021 09:33:51 +0000 (18:33 +0900)]
[Crop] output framerate

While caps negotiation, set output framerate from input configuration.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[MQTTsink] revive the removed callback
Hyoung Joo Ahn [Mon, 17 May 2021 08:33:57 +0000 (17:33 +0900)]
[MQTTsink] revive the removed callback

according to the `paho-c-mqtt`, if the `message_arrived` callback is null, the others are not registered. For this reason, the removed callback should be existed even they are not called.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
3 years ago[Tools/Parser] Add nnstreamer-parser to util package
Dongju Chae [Thu, 13 May 2021 04:38:26 +0000 (13:38 +0900)]
[Tools/Parser] Add nnstreamer-parser to util package

This patch nnstreamer-parser to util package.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Test/Filter] testcase for flex tensor
Jaeyun [Mon, 3 May 2021 09:21:32 +0000 (18:21 +0900)]
[Test/Filter] testcase for flex tensor

add testcases to handle flexible tensor.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Filter] support flex tensor
Jaeyun [Mon, 3 May 2021 09:17:55 +0000 (18:17 +0900)]
[Filter] support flex tensor

Add pad template to support flex tensor in tensor-filter.

If incoming tensor is flexible, tensor-filter cannot get the meta from caps.
In this case, tensor-filter gets model info from subplugin and compares buffer size in transform().
That means, if the model handles non-static info (e.g., set-dimension with input info), it cannot support flex tensor.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Crop] add two sink pads
Jaeyun [Thu, 13 May 2021 03:16:54 +0000 (12:16 +0900)]
[Crop] add two sink pads

tensor-crop has 2 sink pads - raw and info.
- raw: receive raw tensor data to be cropped (other/tensor)
- info: receive crop info (other/tensors-flexible)

The output is cropped tensors (flex tensor format).

TODO
1. define GstTensorCropInfo (x,y,w,h) in tensor_typedef.h
2. add cropping in chain function

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Gst/MQTT/Src] Avoid deadlock cases in create() of GstBaseSrcClass
Wook Song [Fri, 14 May 2021 04:09:11 +0000 (13:09 +0900)]
[Gst/MQTT/Src] Avoid deadlock cases in create() of GstBaseSrcClass

In the current implementation of GstBaseSrcClass's create vmethod, it is
possible that deadlock occurs since some error cases during the
initialization are not properly handled. This patch fixes this bug.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[TEST] Fix tensor converter python3 test
Gichan Jang [Fri, 14 May 2021 06:16:15 +0000 (15:16 +0900)]
[TEST] Fix tensor converter python3 test

 - Remove the test related files.
 - Remove debugging messages

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Decoder] Add tensor decoder python subplugins
Gichan Jang [Mon, 3 May 2021 10:56:37 +0000 (19:56 +0900)]
[Decoder] Add tensor decoder python subplugins

Add tensor decoder python subplugins.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[MQTTsink] remove message arrived cb
Hyoung Joo Ahn [Thu, 13 May 2021 10:43:41 +0000 (19:43 +0900)]
[MQTTsink] remove message arrived cb

The callback `on_message_arrived ()` is not required for MQTTsink because it publishes the messages

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
3 years ago[Test] testcases for flex tensor
Jaeyun [Fri, 23 Apr 2021 11:30:08 +0000 (20:30 +0900)]
[Test] testcases for flex tensor

add testcases about flex-tensor stream.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Converter] support flex tensor
Jaeyun [Fri, 23 Apr 2021 11:28:36 +0000 (20:28 +0900)]
[Converter] support flex tensor

Add pad template to handle flex tensors.
tensor-converter supports changing capability from flex to static, or static to flex if downstream element has flex-tensor caps.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Tools/Parser] Find element name in the pipeline
Dongju Chae [Tue, 11 May 2021 09:03:56 +0000 (18:03 +0900)]
[Tools/Parser] Find element name in the pipeline

This patch finds element name in the pipeline.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Fix/Filter] Fix tensors info initialization
Junhwan Kim [Thu, 13 May 2021 04:54:19 +0000 (13:54 +0900)]
[Fix/Filter] Fix tensors info initialization

- Internal tensors-info is not correctly initialized for some sub filters, causing incompatible format error.

Signed-off-by: Junhwan Kim <jejudo.kim@samsung.com>
3 years ago[MQTTsink] add mqtt QoS as a property
Hyoung Joo Ahn [Thu, 13 May 2021 03:26:40 +0000 (12:26 +0900)]
[MQTTsink] add mqtt QoS as a property

To activate the delivery_complete callback, the `mqtt-qos` property is required.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
3 years ago[Converter] Add subplugins for python custom converter
Gichan Jang [Thu, 22 Apr 2021 00:29:13 +0000 (09:29 +0900)]
[Converter] Add subplugins for python custom converter

Add subplugins for python custom converter

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[MQTTsrc] remove cb_mqtt_on_delivery_complete ()
Hyoung Joo Ahn [Wed, 12 May 2021 11:40:32 +0000 (20:40 +0900)]
[MQTTsrc] remove cb_mqtt_on_delivery_complete ()

this callbeck is useless for the subscriber

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
3 years ago[MQTTsrc] add log messages when connection lost
Hyoung Joo Ahn [Wed, 12 May 2021 11:12:48 +0000 (20:12 +0900)]
[MQTTsrc] add log messages when connection lost

Since the `cause` of cb_connection_lost is always null, IMO, we need to guide user to check the log messages of the broker

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
3 years ago[MQTTsrc] change the keep alive interval
Hyoung Joo Ahn [Wed, 12 May 2021 11:12:38 +0000 (20:12 +0900)]
[MQTTsrc] change the keep alive interval

set the DEFAULT_MQTT_KEEP_ALIVE_INTERVAL to 1 minute.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
3 years ago[Crop] add tensor-crop
Jaeyun [Mon, 10 May 2021 09:26:53 +0000 (18:26 +0900)]
[Crop] add tensor-crop

Initial commit to add tensor-crop element.
tensor-crop will crop the incoming buffer with crop info.

TODO: define pads
- 2 sink pads: static tensor for raw data, flexible for crop info
- src pad: flexible with cropped tensor

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Gst/MQTT/Src] Add a new property to control the live source mode
Wook Song [Fri, 30 Apr 2021 08:02:10 +0000 (17:02 +0900)]
[Gst/MQTT/Src] Add a new property to control the live source mode

This patch adds a new property to specify whether this element acts as a
live source or not. If this property is set to true, the incoming
buffers' timestamp would be synchronized with the current running time
of the pipeline. Since the defualt value is true, it should be disabled
if you want to listen to messages that could have relatively long jitters
or delays.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Gst/MQTT/Src] Handle the GST_QEURY_LATENCY query
Wook Song [Fri, 30 Apr 2021 04:43:14 +0000 (13:43 +0900)]
[Gst/MQTT/Src] Handle the GST_QEURY_LATENCY query

This patch overrides the GstBaseSrc virtual method to handl the
GST_QUERY_LATENCY. To this end, the latency calculation procedure is
also added before the incoming buffer is sent the downstream.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[fix/trivial] Fix compile warning of g_param_spec_string in gsttensormerge.c
Yongjoo Ahn [Wed, 12 May 2021 01:35:55 +0000 (10:35 +0900)]
[fix/trivial] Fix compile warning of g_param_spec_string in gsttensormerge.c

- Set default string value as argument of `g_param_spec_string()`

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[Gst/MQTT] Add a new property to enable debugging outputs
Wook Song [Thu, 29 Apr 2021 09:37:01 +0000 (18:37 +0900)]
[Gst/MQTT] Add a new property to enable debugging outputs

This patch adds a new property, 'debug', for controlling the visibility
of debugging outputs.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Gst/MQTT/Sink] Add missing g_free to fix memory leaks
Wook Song [Wed, 28 Apr 2021 07:00:38 +0000 (16:00 +0900)]
[Gst/MQTT/Sink] Add missing g_free to fix memory leaks

This patch fixes memory leaks reported by Valgrind by adding missing
g_free invocations.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Gst/MQTT/Src] Fix memory leaks reported by Valgrind
Wook Song [Wed, 28 Apr 2021 05:45:03 +0000 (14:45 +0900)]
[Gst/MQTT/Src] Fix memory leaks reported by Valgrind

This patch fixes memory leaks reported by Valgrind categorized as
definitely lost.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[filter/tflite] Add XNNPACK delegate support
Yongjoo Ahn [Thu, 6 May 2021 08:39:03 +0000 (17:39 +0900)]
[filter/tflite] Add XNNPACK delegate support

- Support XNNPACK delegate
- XNNPACK is a optimized library of floating point inference operators
  for ARM, x86

REF:
- https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/delegates/xnnpack

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[Tools/Parser] Update build script and add top-level program
Dongju Chae [Wed, 28 Apr 2021 00:40:23 +0000 (09:40 +0900)]
[Tools/Parser] Update build script and add top-level program

This patch updates the build script and adds top-level program
to test build process.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Tools/Parser] Remove gstreamer functions and add their substitutes
Dongju Chae [Tue, 27 Apr 2021 10:44:04 +0000 (19:44 +0900)]
[Tools/Parser] Remove gstreamer functions and add their substitutes

This patch removes gstreamer functions and add their substitutes.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Tools/Parser] Fix logging messages
Dongju Chae [Wed, 28 Apr 2021 01:14:39 +0000 (10:14 +0900)]
[Tools/Parser] Fix logging messages

This patch fixes logging messages.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Tools/Parser] Remove delayed linking temporally
Dongju Chae [Wed, 28 Apr 2021 00:49:22 +0000 (09:49 +0900)]
[Tools/Parser] Remove delayed linking temporally

This patch removes delayed linking temporally
as it requires too much gstreamer-dependent ones.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[TensorMerge] change the description of tensor_merge
Hyoung Joo Ahn [Mon, 10 May 2021 10:50:54 +0000 (19:50 +0900)]
[TensorMerge] change the description of tensor_merge

Since the description of `tensor_merge` is too short to make a pipeline with it.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
3 years ago[TensorMerge] change the default mode to linear
Hyoung Joo Ahn [Mon, 10 May 2021 10:35:37 +0000 (19:35 +0900)]
[TensorMerge] change the default mode to linear

Currently, if the property `mode` is empty, `tensor_merge` generates an error because the default of the property is ERR. Furthermore, only the mode `linear` is available, it should be a default mode.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
3 years ago[Transform] change val name in macro
Jaeyun [Mon, 10 May 2021 09:57:27 +0000 (18:57 +0900)]
[Transform] change val name in macro

Fix svace issue, change local param in macro.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Documentation/MQTT] Add a draft explaining the timestamp synchronization
Wook Song [Mon, 10 May 2021 12:35:29 +0000 (21:35 +0900)]
[Documentation/MQTT] Add a draft explaining the timestamp synchronization

This patch adds a draft that explains the timestamp conversion between
inter-pipelines running on the different devices and the intra-pipeline
timestamp synchronization.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Test/Util] compare flex tensor info
Jaeyun [Tue, 27 Apr 2021 03:13:49 +0000 (12:13 +0900)]
[Test/Util] compare flex tensor info

add testcases to compare flex tensor info.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Common] utils to handle flex tensor
Jaeyun [Fri, 23 Apr 2021 11:16:00 +0000 (20:16 +0900)]
[Common] utils to handle flex tensor

add util functions to handle flexible tensor stream.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Filter] handle invalid buffer
Jaeyun [Mon, 3 May 2021 07:48:11 +0000 (16:48 +0900)]
[Filter] handle invalid buffer

handle error case if incoming buffer has invalid size or the number of mem blocks is different.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Gst/MQTT/Src] Support GstCaps re-negotiation
Wook Song [Tue, 27 Apr 2021 04:15:01 +0000 (13:15 +0900)]
[Gst/MQTT/Src] Support GstCaps re-negotiation

To support GstCaps re-negotiation based on the information embedded in
the incoming messages' headers, this patch adds procedures to extract
the GstCaps information from the incoming messages' headers and send a
new Caps event to the downstream. As a result, fixating Caps and
negotiating Caps are done again during the message/buffer processing.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Gst/MQTT/Sink] Update the message header at every publish
Wook Song [Tue, 27 Apr 2021 01:59:31 +0000 (10:59 +0900)]
[Gst/MQTT/Sink] Update the message header at every publish

In order to reduce memory copying overhead, the previous implementation
updates the message header only once at the first publish moment. This
might be a little bit effective but cannot handle the incoming buffers
with variable sizes. To overcome such restriction, the message header
will be updated at every publish moment.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Gst/MQTT/Sink] bugfix: Add missing g_free for the message buffer
Wook Song [Tue, 27 Apr 2021 01:50:17 +0000 (10:50 +0900)]
[Gst/MQTT/Sink] bugfix: Add missing g_free for the message buffer

This patch adds missing g_free for the message buffer,
self->mqtt_msg_buf, dynamically allocated.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Gst/MQTT/Sink] Include a string representing caps in the message header
Wook Song [Mon, 26 Apr 2021 12:06:59 +0000 (21:06 +0900)]
[Gst/MQTT/Sink] Include a string representing caps in the message header

This patch includes a string representation of the fixated GstCaps into
the message header.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Tests/Converter] Fix -Werror=sign-compare error
Wook Song [Mon, 10 May 2021 02:31:41 +0000 (11:31 +0900)]
[Tests/Converter] Fix -Werror=sign-compare error

This patch fixes a build error related to -Werror=sign-compare. Note
that this error occurs while building the source code using gcc-7.5.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Decoder/BoundingBox] remove unnecessary value
Jaeyun [Fri, 7 May 2021 10:39:18 +0000 (19:39 +0900)]
[Decoder/BoundingBox] remove unnecessary value

remove unnecessary global value in decoder-subplugin.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[TEST] Add set property function accepted/tizen/unified/20210510.155212 submit/tizen/20210507.082542
Gichan Jang [Fri, 7 May 2021 05:27:43 +0000 (14:27 +0900)]
[TEST] Add set property function

Add set filter property function.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Spec] add the restricted elements
Hyoung Joo Ahn [Fri, 7 May 2021 05:10:32 +0000 (14:10 +0900)]
[Spec] add the restricted elements

the elements for audio & edgeAI have been added.
to make it clear, the additional macros have been added.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
3 years ago[Common/CodeClean] function to get pad caps
Jaeyun [Thu, 6 May 2021 04:43:59 +0000 (13:43 +0900)]
[Common/CodeClean] function to get pad caps

Code clean, revise function name and remove unnecessary function to check peer caps.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Filter] error in query caps
Jaeyun [Thu, 6 May 2021 04:35:27 +0000 (13:35 +0900)]
[Filter] error in query caps

In transform-caps function, element should not query caps to peer.
The element should add all possible caps here.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Test] filters with other/tensor
Jaeyun [Tue, 4 May 2021 04:38:43 +0000 (13:38 +0900)]
[Test] filters with other/tensor

tensor-filter queries peer caps to check the mimetype.
nnstreamer should handle multi filters connection without an error.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Test/TVM] Add unittest for TVM subplugin
Junhwan Kim [Tue, 27 Apr 2021 04:47:34 +0000 (13:47 +0900)]
[Test/TVM] Add unittest for TVM subplugin

- Add simple model for unittest

Signed-off-by: Junhwan Kim <jejudo.kim@samsung.com>
3 years ago[Conf/Subplugin] get registered subplugins
Jaeyun [Tue, 4 May 2021 10:24:06 +0000 (19:24 +0900)]
[Conf/Subplugin] get registered subplugins

Util function to get registrable subplugins list.

If conf file is not loaded (or does not exists), nnstreamer cannot get the subplugin list from configuration.
In this case (e.g., Android), conveter cannot set the pad template from subplugins, and will make negotiation failure.

To prevent this error, get subplugins from table and conf file.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[TEST] Seperate postive and negative tests
Gichan Jang [Tue, 4 May 2021 02:19:26 +0000 (11:19 +0900)]
[TEST] Seperate postive and negative tests

Seperate positive and negative tests of the unittest_armnn

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Test] condition to check file size
Jaeyun [Fri, 30 Apr 2021 04:53:55 +0000 (13:53 +0900)]
[Test] condition to check file size

In test-util function, set condition to check file size while running a pipeline.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Filter/Prop] parse combination option
Jaeyun [Fri, 30 Apr 2021 03:06:29 +0000 (12:06 +0900)]
[Filter/Prop] parse combination option

1. parse combi option as unsigned int and check the index (less than 16).
2. fix possible mem leak (release combi option list).

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Filter] input combi option
Jaeyun [Thu, 29 Apr 2021 10:04:15 +0000 (19:04 +0900)]
[Filter] input combi option

While getting tensor info in caps negotiation, check input combi option and compare info with combined.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[If] invalid map info
Jaeyun [Mon, 3 May 2021 08:06:43 +0000 (17:06 +0900)]
[If] invalid map info

memory map info is valid until gst_memory_unmap() is called.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Gst/MQTT/Sink] Support dynamic buffer re-allocation
Wook Song [Fri, 23 Apr 2021 09:42:10 +0000 (18:42 +0900)]
[Gst/MQTT/Sink] Support dynamic buffer re-allocation

This patch changes the message buffer allocation mechanism. When the
size of the incoming GStreamer buffer exceeds that of the current
message buffer allocated, the existing buffer would be freed and
re-allocated. Note that in the case the size of the message buffer
is fixed by the max-buffer-size property, this feature is disabled.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Gst/MQTT/Sink] Introduce a new property, max-buffer-size
Wook Song [Fri, 23 Apr 2021 06:16:41 +0000 (15:16 +0900)]
[Gst/MQTT/Sink] Introduce a new property, max-buffer-size

This patch introduces a new property, max-buffer-size, which specifies
the maximum size of a message buffer.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Gst/MQTT] Support basic timestamp synchronization
Wook Song [Thu, 22 Apr 2021 06:21:05 +0000 (15:21 +0900)]
[Gst/MQTT] Support basic timestamp synchronization

This patch adds a feature for the basic timestamp synchronization
support. Note that this feature works under the assumption that all the
device's system date and time values have been synchronized.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years agowith GST_PLUGIN_PATH set `gst-inspect-1.0 nnstreamer` works, also renamed Dockerfile...
shortcipher3 [Fri, 30 Apr 2021 23:05:59 +0000 (17:05 -0600)]
with GST_PLUGIN_PATH set `gst-inspect-1.0 nnstreamer` works, also renamed Dockerfile to use standard naming convention

Signed-off-by: shortcipher3 <chris.jon.hall@gmail.com>
3 years ago[Format] clang format for typecast
Jaeyun [Fri, 30 Apr 2021 04:55:19 +0000 (13:55 +0900)]
[Format] clang format for typecast

add space when using c-style typecast.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Decoders] fix the mem leaks of the external decoders
Hyoung Joo Ahn [Mon, 26 Apr 2021 02:45:03 +0000 (11:45 +0900)]
[Decoders] fix the mem leaks of the external decoders

Since the ref count is raised when `gst_buffer_get_all_memory ()` is used, `gst_memory_unref ()` has to be called after using the memory.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
3 years ago[Test/NNFW] init info in testcase
Jaeyun [Thu, 29 Apr 2021 07:03:10 +0000 (16:03 +0900)]
[Test/NNFW] init info in testcase

Initialize tensor-info struct before calling filter callback.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[filter/TVM] Add tensor-filter subplugin for TVM
Junhwan Kim [Fri, 16 Apr 2021 12:55:29 +0000 (21:55 +0900)]
[filter/TVM] Add tensor-filter subplugin for TVM

- `dlpack` and either `tvm` or `tvm_runtime` should be included
- Only supports tvm model compiled with relay (graph_executor)

Signed-off-by: Junhwan Kim <jejudo.kim@samsung.com>
3 years ago[Gst/MQTT] bugfix: Change default values for pub/sub-topic and client-id
Wook Song [Tue, 20 Apr 2021 01:45:38 +0000 (10:45 +0900)]
[Gst/MQTT] bugfix: Change default values for pub/sub-topic and client-id

This patch changes the default values which are used when the values for
the pub/sub-topic and client-id properties are not given.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Gst/MQTT/Src] Eliminate unnecessary critical sections
Wook Song [Fri, 2 Apr 2021 15:33:20 +0000 (00:33 +0900)]
[Gst/MQTT/Src] Eliminate unnecessary critical sections

This patch removes unnecessary critical sections. Mutual exclusion
controlling is only needed when trying to change the pipeline's state.
In addition, instead of locking and unlocking the element object itself,
a GMutex variable in the object is used.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Gst/MQTT/Src] Remove unnecessary dynamic memory allocations
Wook Song [Fri, 2 Apr 2021 15:16:29 +0000 (00:16 +0900)]
[Gst/MQTT/Src] Remove unnecessary dynamic memory allocations

In order to reduce the burden from memory management, this patch removes
unnecessary dynamic memory allocations.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Gst/MQTT/Sink] Revise mqttsink to use the MQTTAsync C client library
Wook Song [Fri, 2 Apr 2021 14:40:27 +0000 (23:40 +0900)]
[Gst/MQTT/Sink] Revise mqttsink to use the MQTTAsync C client library

This patch revises the mqttsink element to use the Asynchronous MQTT
client library for C. Unnecessary dynamic allocation and lock operations
are also removed.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Gst/MQTT/Src] Support asynchronous subscribe via paho.mqtt.c
Wook Song [Fri, 26 Mar 2021 13:18:16 +0000 (22:18 +0900)]
[Gst/MQTT/Src] Support asynchronous subscribe via paho.mqtt.c

This patch enables mqttsrc to support an asynchronous subscribe to the
given topic. In the mqttsrc implementation, the asynchronous MQTT client
library for C has been used instead of the MQTT Client library for C,
used for implementation of mqttsink.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Gst/MQTT/Sink] Support synchronize publish via paho.mqtt.c
Wook Song [Thu, 18 Mar 2021 07:58:05 +0000 (16:58 +0900)]
[Gst/MQTT/Sink] Support synchronize publish via paho.mqtt.c

This patch updates mqttsink to support synchronize publish using the
MQTT protocol. Note that only basic features required to publish a
topic are currently implemented.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[TCM] Rename TCM config file
Sangjung Woo [Thu, 29 Apr 2021 06:18:53 +0000 (15:18 +0900)]
[TCM] Rename TCM config file

To run the TCM on AHub infra, the default name of config file should be
'config.yaml'.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years ago[Filter] reduce duplicated source
Jaeyun [Tue, 27 Apr 2021 07:40:03 +0000 (16:40 +0900)]
[Filter] reduce duplicated source

Code clean, add common functions for combi option and set-info callback.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Format] fix format and code style
Jaeyun [Thu, 29 Apr 2021 03:13:26 +0000 (12:13 +0900)]
[Format] fix format and code style

fix clang format error in taos-ci and code style.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Format] fix clang format
Jaeyun [Wed, 28 Apr 2021 08:07:08 +0000 (17:07 +0900)]
[Format] fix clang format

fix clang format error in taos-ci and testcase name rule.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Common] add init-config
Jaeyun [Mon, 26 Apr 2021 04:59:56 +0000 (13:59 +0900)]
[Common] add init-config

Before updating tensor config, initialize config struct.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Meson/MQTT] Add an option to support MQTT
Wook Song [Mon, 15 Mar 2021 07:06:11 +0000 (16:06 +0900)]
[Meson/MQTT] Add an option to support MQTT

This patch adds a Meson configuration option to support MQTT. In order
to avoid build break, this option is disabled for the Debian and Tizen
packages.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Gst/MQTT/Sink] Make it work as a dummy sink
Wook Song [Wed, 10 Mar 2021 09:15:01 +0000 (18:15 +0900)]
[Gst/MQTT/Sink] Make it work as a dummy sink

This patch makes MQTTSink work as a dummy sink that has a single sink
pad with "ANY" caps.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Meson/MQTT] Generate libgstmqtt including MQTT GstElements
Wook Song [Tue, 9 Mar 2021 02:01:28 +0000 (11:01 +0900)]
[Meson/MQTT] Generate libgstmqtt including MQTT GstElements

This patch modifies the meson build scripts to add the skeleton code of
MQTT plugins and generate libgstmqtt, the collection of them.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Gst/MQTT] Add skeleton codes for MQTT plugins
Wook Song [Tue, 9 Mar 2021 01:52:29 +0000 (10:52 +0900)]
[Gst/MQTT] Add skeleton codes for MQTT plugins

This patch adds skeleton codes of sink and src elements for MQTT support.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Filter] python3 helper funciton
Gichan Jang [Tue, 27 Apr 2021 09:51:35 +0000 (18:51 +0900)]
[Filter] python3 helper funciton

nnstreamer_python3 package include python3 helper functiom.
Change it to use by converter and decoder.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Sink] accept flex tensor
Jaeyun [Fri, 23 Apr 2021 10:58:17 +0000 (19:58 +0900)]
[Sink] accept flex tensor

add pad template to handle flexible tensor stream.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Converter] Change external converter param
Gichan Jang [Wed, 14 Apr 2021 04:57:14 +0000 (13:57 +0900)]
[Converter] Change external converter param

Change external converter param
 - Remove unnecessary param (frames_in, frame_size)

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>