[datareposink] Add function to write flexible tensors
authorhyunil park <hyunil46.park@samsung.com>
Tue, 20 Jun 2023 10:19:48 +0000 (19:19 +0900)
committerjaeyun-jung <39614140+jaeyun-jung@users.noreply.github.com>
Tue, 4 Jul 2023 05:54:16 +0000 (14:54 +0900)
commit50dcabd7d68781a40904e0e1c540c47e963990d2
tree1d13ace1ea487e2ffc7ea250ec53b0470dc4fd82
parente93d66d5b9be70707529d7126e5cd2bd6d299250
[datareposink] Add function to write flexible tensors

- To add memory to gstbuffer by number of flexible tensors when read sample in datareposrc,
  sample_offset, tensor_size, and tensor_count field are added to the JSON file
- Add unit test

- Reference
  * If caps of sink pad is flexible, the input gstBuffer is saved as a flexible tensor
  * The size of the input gstBuffer is stored as sample_offset field in JSON file and
    it will be used when shuffle operation in datareposrc
  * Each flexible tensor size is stored as tensor_size field in JSON file and
    it will be used with gst_buffer_append_memory() in datareposrc

Signed-off-by: hyunil park <hyunil46.park@samsung.com>
gst/datarepo/gstdatareposink.c
gst/datarepo/gstdatareposink.h
tests/nnstreamer_datarepo/unittest_datareposink.cc