buffer_concatenator
This section describes the GStreamer plugin named buffer_concatenator.
Brief Description
This plugin is used for concatenating multiple buffers in a single buffer, saved in a specific order.
That is, in config.json
if the order for buffer, input_5233
, is specified as 0
and
for buffer, input_0
, is specified as 1
, the plugin will look like:
[
[input_5233][input_0]
]
Config JSON Parameters
{
"version": 0.1,
"node_name": "buffer_concat",
"memory": {
"cpu": 0,
"next_cpu": 0 <================= Memory type used by allocator. 0 means A65 memory will be used
},
"system": {
"out_buf_queue": 1, <=========== Num of output buffers created by the plugin
"debug": 0,
"dump_data": 0 <================ Dump the output buffer into file at /tmp
},
"buffers": {
"input": [
{
"name": "buffer_1", <======= Name of input buffer
"size": 36964400, <========= Size of input buffer
"order": 0, <=============== Order of buffer in output buffer
"offset" : 0, <============= Offset from which to start copying
"copy_bytes" : 18482200 <=== Size how many bytes should be copied to output buffer
},
{
"name": "buffer_2",
"size": 73928800,
"order": 1,
"offset" : 36964400,
"copy_bytes" : 36964400
}
],
"output": {
"size": 55446600 <============ Output buffer size = Σ(sizes of input buffers specified in this json)
}
}
}
Example Usage
1GST_PLUGIN_PATH="/data/YOLOV5/lib" \
2GST_DEBUG=2 \
3gst-launch-1.0 --gst-plugin-path="/data/YOLOV5/lib" \
4simaaisrc location="/data/YOLOV5/dump/yuv_sample" node-name="allegrodec" \
5! process-cvu config="/data/YOLOV5/etc/yolov5_pre_proc.json" source-node-name="allegrodec" buffers-list="allegrodec" \
6! buffer_concat. \
7simaaisrc location="/data/YOLOV5/dump/mla_out" node-name="mla-yolov5" \
8! process-cvu config="/data/YOLOV5/etc/yolov5_post_proc.json" source-node-name="mla-yolov5" buffers-list="mla-yolov5" \
9! simaaibufferconcat config="/data/YOLOV5/etc/buffer_concat_config.json" name="buffer_concat" silent=false \
10! fakesink
gst-inspect-1.0
Output
1Plugin Details:
2Name buffer_concatenator
3Description
4Filename
5Version 1.18.16
6License LGPL
7Source module gst-plugins-sima
8Binary package
9Origin URL https://bitbucket.org/sima-ai/gst-plugins-sima
10
11buffer_concatenator: SiMa.ai buffer_concatenator element
12
131 features:
14+-- 1 elements
Note
Please refer to buffer_concatenator’s README file for more information.