[Document] update readme.md
authorJaeyun <jy1210.jung@samsung.com>
Wed, 12 Sep 2018 05:58:15 +0000 (14:58 +0900)
committerMyungJoo Ham <myungjoo.ham@gmail.com>
Thu, 13 Sep 2018 01:47:42 +0000 (10:47 +0900)
1. add readme.md file for tensor-aggregator
2. fix typo in tensor-converter

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
gst/tensor_aggregator/README.md [new file with mode: 0644]
gst/tensor_converter/README.md

diff --git a/gst/tensor_aggregator/README.md b/gst/tensor_aggregator/README.md
new file mode 100644 (file)
index 0000000..f4b552d
--- /dev/null
@@ -0,0 +1,80 @@
+# NNStreamer::tensor\_aggregator
+
+## Supported features
+
+GstTensorAggregator is a plugin to aggregate the tensor using GstAdapter.
+
+This plugin handles the buffer with the unit **frame**.
+Each incoming or outgoing buffer is supposed a single tensor, which may contain one or multi frames.
+
+GstTensorAggregator gets the size of one frame with ```frames-in```, aggregates the frames, and pushes a buffer with ```frames-out``` frames.
+After pushing an outgoing buffer, GstTensorAggregator flushes the ```frames-flush``` frames.
+
+For example, GstTensorAggregator with the properties ```frames-in=3```, ```frames-out=4```, ```frames-flush=2```
+
+```
+Incoming buffer
+--------------------------------------------------------------------
+|  1st buffer  |  2nd buffer  |  3rd buffer  |  4th buffer  |
+--------------------------------------------------------------------
+| 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 | 
+--------------------------------------------------------------------
+Outgoing buffer
+--------------------------------------------------------------------
+|  1st out-buffer   |
+--------------------------------------------------------------------
+ flushed  |  2nd out-buffer   |
+--------------------------------------------------------------------
+            flushed |  3rd out-buffer   |
+--------------------------------------------------------------------
+                      flushed |  4th out-buffer   |
+--------------------------------------------------------------------
+                                flushed |  5th out-buffer   |
+--------------------------------------------------------------------
+```
+
+Please be informed that, to ensure the tensor configuration, you have to change the dimension if input and output frames are different. (See the property ```frames-dim```.)
+
+## Sink Pads
+
+One "Always" sink pad exists. The capability of sink pad is ```other/tensor```.
+
+## Source Pads
+
+One "Always" source pad exists. The capability of source pad is ```other/tensor```.
+It does not support ```other/tensors``` because each frame (or a set of frames consisting a buffer) is supposed to be represented by a **single** tensor instance.
+
+## Properties
+
+- frames-in: The number of frames in incoming buffer. (Default 1)
+
+  GstTensorAggregator itself cannot get the number of frames in buffer.
+  This plugin calculates the size of one frame with this property.
+
+- frames-out: The number of frames in outgoing buffer. (Default 1)
+
+  GstTensorAggregator calculates the size of outgoing frames and pushes a buffer to source pad.
+
+- frames-flush: The number of frames to flush. (Default 0)
+
+  GstTensorAggregator flushes the bytes (```frames-flush``` frames) in GstAdapter after pushing a buffer.
+  If set 0 (default value), all outgoing frames will be flushed.
+
+- frames-dim: The dimension index of frames in tensor. (Default -1)
+
+  If frames-in and frames-out are different, GstTensorAggregator has to change the dimension of tensor.
+  With this property, GstTensorAggregator changes the out-caps.
+  
+  If set -1 (default value), GstTensorAggregator does not change the dimension in outgoing tensor. (This may cause an error if in/out frames are different.)
+
+### Properties for debugging
+
+- silent: Enable/disable debugging messages.
+
+## Usage Examples
+
+```
+$ gst-launch videotestsrc ! video/x-raw,format=RGB,width=640,height=480 ! tensor_converter ! tensor_aggregator frames-out=10 frames-flush=5 frames-dim=3 ! tensor_sink
+```
+
+GstTensorAggregator receives a buffer with 1 frame (dimension 3:640:480:1), pushes a buffer with 10 frames (dimension 3:640:480:10), and flushes 5 frames after pushing a buffer.
index 6b62ef1..4c6d1d3 100644 (file)
@@ -47,10 +47,10 @@ For each outgoing frame (on the source pad), there always is a **single** instan
 
 ### Properties for debugging
 
-- silent: Enable/diable debugging messages.
+- silent: Enable/disable debugging messages.
 
 ## Usage Examples
 
 ```
-$ gst-launch videotestsrc ! video/x-raw,format=RGB,width=640,height=480 ! tensor_convert ! tensor_sink
+$ gst-launch videotestsrc ! video/x-raw,format=RGB,width=640,height=480 ! tensor_converter ! tensor_sink
 ```