[Build] fix build warning
authorJaeyun <jy1210.jung@samsung.com>
Mon, 5 Aug 2019 04:00:34 +0000 (13:00 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Tue, 6 Aug 2019 01:40:19 +0000 (10:40 +0900)
Add function declaration and fix enum conversion.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
api/android/api/jni/nnstreamer-native-api.c
api/capi/src/nnstreamer-capi-pipeline.c
gst/nnstreamer/nnstreamer_subplugin.c

index 882e1f1..b5f8c84 100644 (file)
 
 #include "nnstreamer-native.h"
 
+/* nnstreamer plugins and sub-plugins declaration */
+GST_PLUGIN_STATIC_DECLARE (nnstreamer);
+extern void init_filter_tflite (void);
+extern void init_dv (void);
+extern void init_bb (void);
+extern void init_il (void);
+extern void init_pose (void);
+
 /**
  * @brief Attach thread with Java VM.
  */
index d9eade2..c6ac6cf 100644 (file)
@@ -290,7 +290,8 @@ cb_bus_sync_message (GstBus * bus, GstMessage * message, gpointer user_data)
             gst_element_state_get_name (new_state));
 
         if (pipe_h->cb) {
-          pipe_h->cb (new_state, pipe_h->pdata);
+          ml_pipeline_state_e ml_state = (ml_pipeline_state_e) new_state;
+          pipe_h->cb (ml_state, pipe_h->pdata);
         }
       }
       break;
@@ -564,7 +565,7 @@ ml_pipeline_get_state (ml_pipeline_h pipe, ml_pipeline_state_e * state)
   if (scret == GST_STATE_CHANGE_FAILURE)
     return ML_ERROR_STREAMS_PIPE;
 
-  *state = _state;
+  *state = (ml_pipeline_state_e) _state;
   return ML_ERROR_NONE;
 }
 
index 51adf4a..5cbbcf0 100644 (file)
@@ -74,9 +74,10 @@ get_subplugin (subpluginType type, const char *name)
 
   if (data == NULL) {
     /** Search and register if found with the conf */
-    const gchar *fullpath = nnsconf_get_fullpath (name, type);
+    nnsconf_type_path conf_type = (nnsconf_type_path) type;
+    const gchar *fullpath = nnsconf_get_fullpath (name, conf_type);
 
-    if (!nnsconf_validate_file (type, fullpath))
+    if (!nnsconf_validate_file (conf_type, fullpath))
       goto error;               /* No Such Thing !!! */
 
     G_UNLOCK (splock);