[Build] remove warning
authorJaeyun <jy1210.jung@samsung.com>
Fri, 19 Apr 2019 05:32:33 +0000 (14:32 +0900)
committerJijoong Moon <jijoong.moon@samsung.com>
Tue, 23 Apr 2019 12:08:34 +0000 (21:08 +0900)
remove build warning (-Wdiscarded-qualifiers)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
ext/nnstreamer/tensor_decoder/tensordec-boundingbox.c
ext/nnstreamer/tensor_decoder/tensordec-directvideo.c
ext/nnstreamer/tensor_decoder/tensordec-imagelabel.c
ext/nnstreamer/tensor_filter/tensor_filter_python.c
ext/nnstreamer/tensor_filter/tensor_filter_tensorflow.c
ext/nnstreamer/tensor_filter/tensor_filter_tensorflow_lite.c
gst/nnstreamer/tensor_filter/tensor_filter_custom.c
gst/nnstreamer/tensor_source/tensor_src_iio.c
gst/nnstreamer/tensor_source/tensor_src_iio.h

index 9b55349..1985069 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * 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>
  *
@@ -1000,9 +1000,11 @@ bb_decode (void **pdata, const GstTensorsConfig * config,
   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,
index 36af9d3..df4c9bb 100644 (file)
@@ -188,9 +188,11 @@ dv_decode (void **pdata, const GstTensorsConfig * config,
   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,
index 022471e..128408c 100644 (file)
@@ -290,9 +290,11 @@ il_decode (void **pdata, const GstTensorsConfig * config,
   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,
index f52501a..d634190 100644 (file)
@@ -116,7 +116,7 @@ py_getOutputDim (const GstTensorFilterProperties * prop, void **private_data,
   py_data *py = *private_data;
 
   g_assert (py);
-  
+
   return py_core_getOutputDim (py->py_private_data, info);
 }
 
@@ -170,7 +170,7 @@ py_loadScriptFile (const GstTensorFilterProperties * prop, void **private_data)
       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) {
@@ -207,12 +207,14 @@ py_open (const GstTensorFilterProperties * prop, void **private_data)
   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,
index edc56bd..4dbf4b3 100644 (file)
@@ -171,8 +171,10 @@ tf_destroyNotify (void *data)
   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,
index 234e9af..b71631d 100644 (file)
@@ -158,8 +158,10 @@ tflite_getOutputDim (const GstTensorFilterProperties * prop,
   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,
index a117de6..843a881 100644 (file)
@@ -229,8 +229,10 @@ custom_close (const GstTensorFilterProperties * prop, void **private_data)
   *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,
index a3d4740..1dc684e 100644 (file)
@@ -159,6 +159,15 @@ enum
   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
  */
index aad0895..f875160 100644 (file)
@@ -51,8 +51,8 @@ typedef struct _GstTensorSrcIIOClass GstTensorSrcIIOClass;
 /**
  * @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