/**
- * GStreamer / NNStreamer tensor_decoder subplugin, "image labeling"
+ * GStreamer / NNStreamer tensor_decoder subplugin, "bounding boxes"
* Copyright (C) 2018 Samsung Electronics Co. Ltd.
* Copyright (C) 2018 MyungJoo Ham <myungjoo.ham@samsung.com>
*
return GST_FLOW_OK;
}
-/** @brief Image Labeling tensordec-plugin TensorDecDef instance */
+static gchar decoder_subplugin_bounding_box[] = "bounding_boxes";
+
+/** @brief Bounding box tensordec-plugin TensorDecDef instance */
static TensorDecDef boundingBox = {
- .modename = "bounding_boxes",
+ .modename = decoder_subplugin_bounding_box,
.type = OUTPUT_VIDEO,
.init = bb_init,
.exit = bb_exit,
return GST_FLOW_OK;
}
+static gchar decoder_subplugin_direct_video[] = "direct_video";
+
/** @brief Direct-Video tensordec-plugin TensorDecDef instance */
static TensorDecDef directVideo = {
- .modename = "direct_video",
+ .modename = decoder_subplugin_direct_video,
.type = OUTPUT_VIDEO,
.init = dv_init,
.exit = dv_exit,
return GST_FLOW_OK;
}
+static gchar decoder_subplugin_image_labeling[] = "image_labeling";
+
/** @brief Image Labeling tensordec-plugin TensorDecDef instance */
static TensorDecDef imageLabeling = {
- .modename = "image_labeling",
+ .modename = decoder_subplugin_image_labeling,
.type = OUTPUT_TEXT,
.init = il_init,
.exit = il_exit,
py_data *py = *private_data;
g_assert (py);
-
+
return py_core_getOutputDim (py->py_private_data, info);
}
g_printerr ("failed to initailize the object: python");
return -2;
}
-
+
/** check methods in python script */
cb_type type = py_core_getCbType (py->py_private_data);
switch (type) {
return py_loadScriptFile (prop, private_data);
}
-GstTensorFilterFramework _NNS_support_python = {
#if PY_VERSION_HEX >= 0x03000000
- .name = "python3",
+static gchar filter_subplugin_python[] = "python3";
#else
- .name = "python2",
+static gchar filter_subplugin_python[] = "python2";
#endif
+
+GstTensorFilterFramework _NNS_support_python = {
+ .name = filter_subplugin_python,
.allow_in_place = FALSE, /** @todo: support this to optimize performance later. */
.allocate_in_invoke = TRUE,
.invoke_NN = py_run,
tf_core_destroyNotify (data);
}
-GstTensorFilterFramework NNS_support_tensorflow = {
- .name = "tensorflow",
+static gchar filter_subplugin_tensorflow[] = "tensorflow";
+
+static GstTensorFilterFramework NNS_support_tensorflow = {
+ .name = filter_subplugin_tensorflow,
.allow_in_place = FALSE, /** @todo: support this to optimize performance later. */
.allocate_in_invoke = TRUE,
.destroyNotify = tf_destroyNotify,
return tflite_core_getOutputDim (tf->tflite_private_data, info);
}
-GstTensorFilterFramework NNS_support_tensorflow_lite = {
- .name = "tensorflow-lite",
+static gchar filter_subplugin_tensorflow_lite[] = "tensorflow-lite";
+
+static GstTensorFilterFramework NNS_support_tensorflow_lite = {
+ .name = filter_subplugin_tensorflow_lite,
.allow_in_place = FALSE, /** @todo: support this to optimize performance later. */
.allocate_in_invoke = FALSE,
.invoke_NN = tflite_invoke,
*private_data = NULL;
}
+static gchar filter_subplugin_custom[] = "custom";
+
static GstTensorFilterFramework NNS_support_custom = {
- .name = "custom",
+ .name = filter_subplugin_custom,
.allow_in_place = FALSE, /* custom cannot support in-place (output == input). */
.allocate_in_invoke = FALSE, /* GstTensorFilter allocates output buffers */
.invoke_NN = custom_invoke,
PROP_POLL_TIMEOUT
};
+static gchar nns_iio_base_dir_default[] = "/sys/bus/iio/devices/";
+static gchar nns_iio_dev_dir_default[] = "/dev/";
+
+/**
+ * @brief IIO system paths
+ */
+gchar *IIO_BASE_DIR = nns_iio_base_dir_default;
+gchar *IIO_DEV_DIR = nns_iio_dev_dir_default;
+
/**
* @brief iio device channel enabled mode
*/
/**
* @brief IIO system paths
*/
-gchar *IIO_BASE_DIR = "/sys/bus/iio/devices/";
-gchar *IIO_DEV_DIR = "/dev/";
+extern gchar *IIO_BASE_DIR;
+extern gchar *IIO_DEV_DIR;
/**
* @brief iio device channel enabled mode