Show available frameworks / mode with gst-inspect.
This is the first step to address #3903
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
GstBaseTransformClass *trans_class;
+ gchar **subplugins = NULL;
+ gchar *strbuf;
+ static gchar *strprint = NULL;
GST_DEBUG_CATEGORY_INIT (gst_tensordec_debug, "tensor_decoder", 0,
"Element to convert tensor to media stream");
g_param_spec_boolean ("silent", "Silent", "Produce verbose output",
DEFAULT_SILENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ subplugins = get_all_subplugins (NNS_SUBPLUGIN_DECODER);
+ strbuf = g_strjoinv (", ", subplugins);
+ g_free (strprint);
+ strprint = g_strdup_printf
+ ("Decoder mode. Other options (option1 to optionN) depend on the specified model. For more detail on optionX for each mode, please refer to the documentation or nnstreamer-check utility. Available modes (decoder subplugins) are: {%s}.",
+ strbuf);
+
g_object_class_install_property (gobject_class, PROP_MODE,
- g_param_spec_string ("mode", "Mode", "Decoder mode", "",
+ g_param_spec_string ("mode", "Mode", strprint, "",
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ g_free (strbuf);
+ g_strfreev (subplugins);
g_object_class_install_property (gobject_class, PROP_MODE_OPTION1,
g_param_spec_string ("option1", "Mode option 1",
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
GST_VERSION_MINOR,
nnstreamer,
- "nnstreamer plugin library",
+ "NNStreamer plugin library allows neural networks in GStreamer pipelines. Use nnstreamer-check utility for more information of the current NNStreamer installation.",
gst_nnstreamer_init, VERSION, "LGPL", "nnstreamer",
"https://github.com/nnstreamer/nnstreamer");
void
gst_tensor_filter_install_properties (GObjectClass * gobject_class)
{
+ gchar **subplugins = NULL;
+ gchar *strbuf;
+ static gchar *strprint = NULL;
+
g_object_class_install_property (gobject_class, PROP_SILENT,
g_param_spec_boolean ("silent", "Silent", "Produce verbose output",
FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ subplugins = get_all_subplugins (NNS_SUBPLUGIN_FILTER);
+ strbuf = g_strjoinv (", ", subplugins);
+ g_free (strprint);
+ strprint = g_strdup_printf
+ ("Neural network framework. Custom property depends on the specified framework. Use 'auto' to let tensor_filter determine the framework. For more detail, please refer to the documentation or nnstreamer-check utility. Available frameworks (filter subplugins) are: {%s}.",
+ strbuf);
+
g_object_class_install_property (gobject_class, PROP_FRAMEWORK,
- g_param_spec_string ("framework", "Framework",
- "Neural network framework", "auto",
+ g_param_spec_string ("framework", "Framework", strprint, "auto",
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+ g_free (strbuf);
+ g_strfreev (subplugins);
+
g_object_class_install_property (gobject_class, PROP_MODEL,
g_param_spec_string ("model", "Model filepath",
"File path to the model file. Separated with ',' in case of multiple model files(like caffe2)",