From: Parichay Kapoor Date: Fri, 12 Apr 2019 10:52:08 +0000 (+0900) Subject: [IIO] added more documentation X-Git-Tag: accepted/tizen/unified/20190425.014439~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c1ff583f05a2960ff238696b14cfb4f930d3344a;p=platform%2Fupstream%2Fnnstreamer.git [IIO] added more documentation - Updated README.md - Added section description for the element V2: supports -> support Signed-off-by: Parichay Kapoor --- diff --git a/gst/nnstreamer/tensor_source/README.md b/gst/nnstreamer/tensor_source/README.md index b8005ba..5e04d60 100644 --- a/gst/nnstreamer/tensor_source/README.md +++ b/gst/nnstreamer/tensor_source/README.md @@ -2,15 +2,15 @@ ## Motivation -Allow non Gstreamer standard input sources to provide other/tensor stream. +Allow non Gstreamer standard input sources to provide other/tensor or other/tensors stream. Such sources include, but not limited to: -- Output of general external applications including instances of nerual network frameworks and models not using NNStreamer suite. +- Output of general external applications including instances of nerual network frameworks and models not using NNStreamer suite (TBD). - Output of non gstreamer compatible sensors, such as Linux IIO devices: [Industrial I/O, 01.org](https://01.org/linuxgraphics/gfx-docs/drm/driver-api/iio/index.html). We may need to get streams from thermostats, light detectors, IMUs, or signals from GPIO pins. -- Output of LIDAR and RADAR in case we do not have V4L2 interfaces for them. +- Output of LIDAR and RADAR in case we do not have V4L2 interfaces for them (TBD). ## Output Format (src_pad) -other/tensor +other/tensor or other/tensors diff --git a/gst/nnstreamer/tensor_source/tensor_src_iio.c b/gst/nnstreamer/tensor_source/tensor_src_iio.c index 12c1e90..50e3b96 100644 --- a/gst/nnstreamer/tensor_source/tensor_src_iio.c +++ b/gst/nnstreamer/tensor_source/tensor_src_iio.c @@ -35,9 +35,42 @@ /** * SECTION:element-tensor_src_iio * - * Source element to handle sensors as input. - * The output are always in the format of other/tensor or other/tensors. + * #tensor_src_iio extends #gstbasesrc source element to handle Linux + * Industrial I/O sensors as input. IIO sources are only supported in buffered + * mode. Source elements only support push mode scheduling as a live source. * + * #tensor_src_iio supports configuring the device as well as the trigger via + * properties. Buffer capacity, frequency and scan channels to be read can + * be configured before PLAYING the stream. The configuration is supported only + * in states <= READY. Setting the state back to NULL restores the original + * configuration of the IIO device. The source can be configured to work with + * trigger for the source or read the data from the device at regular time + * intervals. Device name/number is the only necessary configuration needed to + * run the element (other configuration parameters is optional). + * + * The output caps is either of + * other/tensor or other/tensors. + * + * Data from various channels can be merged to form 1 other/tensor. Final caps + * of the src pad is of the following format: + * + * Dimension 0 : Channel number + * Dimension 1 : buffer capacity + * + * Other dimensions are not utilized. The data in the dimension 0 is sorted on + * the basis of the indexing of the channels provided by the IIO device. + * + * The enabling of buffer for data capture is performed when transitioning from + * PAUSED to PLAYING state. This leads to automated synchronization handled by + * gstreamer. Buffer duration and timestamps set by #gstbasesrc remain in sync + * with linux IIO timestamps. + * + * + * Example launch line + * |[ + * gst-launch -v -m tensor_src_iio device-number=0 ! fakesink + * ]| + * */ #ifdef HAVE_CONFIG_H