Users may alter behaviors by supplying the "nnstreamer.ini" file or updating environmental variables.
There are three layers of configurations, with higher priority from the top:
Note: in Tizen, you cannot specify the location of nnstreamer.ini with env-var.
For search locations, files in the locations of higher priorities are found first.
For other values, the values configured with higher priorities override those with lower priorities.
The intention of these is to override default values of .ini files without the capability/need to update /etc/nnstreamer.ini file in run-time.
However, in many embedded devices, as in Tizen, such capabilities are prohibited for security reasons.
[common] enable_envvar=true/false # You may disable NNStreamer's environmental variables with this. # However, with envvar, the location of nnstreamer.ini may be altered. # Thus, this is effective only NNSTREAMER_CONF envvar is disabled (__TIZEN__ disables it) enable_symlink=true/false # If this is false, subplugin files should not be sym-linked. (regular files only) [filter] filters=PATH # The search location for tensor-filter subplugins # By default, /usr/lib/nnstreamer/filters/ customfilters=PATH # The search location for custom tensor-filters. # By default, /usr/lib/nnstreamer/customfilters/ # Note that users may specify the full absolute path of a custom filter to ignore this effect. framework_priority_tflite=FW1,FW2,FW3,... # If a .tflite file is given for tensor-filter or "Single" API, # which neuural network framework should be used. # If multiple frameworks are given, NNStreamer will try # from the left. # By default, tensorflow-lite,nnfw,armnn,edgetpu [decoder] decoders=PATH # The search location for tensor-decoder subplugins # By default, /usr/lib/nnstreamer/decoders/ [converter] converters=PATH # The search location for tensor-converter subplugins # By default, /usr/lib/nnstreamer/converters/ [element-restriction] restricted-element=element1,element2,element3,... # If this is set, only the GStreamer elements in the list and NNStreamer's elements are allowed with NNStreamer "Pipeline" API. # We know that the ,ini configuration name is weird and we may update it soon. (e.g., allowed-elements) # If you do not want to restrict the usage of GStreamer elements, do not define this configuration key. [tensorflowlite] enable_nnapi=true/false # For tensorflow-lite subplugin, enable NNAPI. This can be overriden for each instance with GStreamer property values in a pipeline. [pytorch] enable_use_gpu=true/false # For pytorch subplugin, enable GPU. This can be overriden for each instance with GStreamer property values in a pipeline. |
Related Code: /gst/nnstreamer/nnstreamer_conf.{c, h}
Updated at 2020-04-07, based on commit 5ed942e6, (NNStreamer 1.5.1)