C-API/Common: add _ prefix for internal functions.
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Tue, 26 Oct 2021 04:16:55 +0000 (13:16 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Wed, 27 Oct 2021 07:16:02 +0000 (16:16 +0900)
Add _ prefix for all internal functions
so that developers can distinguish external (API) functions
and internal functions easily.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
13 files changed:
c/src/ml-api-common-tizen-feature-check.c
c/src/ml-api-common.c
c/src/ml-api-inference-internal.c
c/src/ml-api-inference-internal.h
c/src/ml-api-inference-pipeline.c
c/src/ml-api-inference-single.c
c/src/ml-api-inference-tizen-privilege-check.c
c/src/ml-api-internal.h
java/android/nnstreamer/src/main/jni/nnstreamer-native-api.c
java/android/nnstreamer/src/main/jni/nnstreamer-native-customfilter.c
java/android/nnstreamer/src/main/jni/nnstreamer-native-pipeline.c
java/android/nnstreamer/src/main/jni/nnstreamer-native-singleshot.c
tests/capi/unittest_capi_inference.cc

index 59ca0d1..5e1c7a9 100644 (file)
@@ -55,7 +55,7 @@ ml_tizen_initialize_feature_state (void)
  * @brief Set the feature status of machine_learning.inference.
  */
 int
-ml_tizen_set_feature_state (int state)
+_ml_tizen_set_feature_state (int state)
 {
   ml_tizen_initialize_feature_state ();
   g_mutex_lock (&feature_info->mutex);
@@ -74,7 +74,7 @@ ml_tizen_set_feature_state (int state)
  * @brief Checks whether machine_learning.inference feature is enabled or not.
  */
 int
-ml_tizen_get_feature_enabled (void)
+_ml_tizen_get_feature_enabled (void)
 {
   int ret;
   int feature_enabled;
@@ -95,11 +95,11 @@ ml_tizen_get_feature_enabled (void)
     if (0 == ret) {
       if (false == ml_inf_supported) {
         _ml_loge ("machine_learning.inference NOT supported");
-        ml_tizen_set_feature_state (NOT_SUPPORTED);
+        _ml_tizen_set_feature_state (NOT_SUPPORTED);
         return ML_ERROR_NOT_SUPPORTED;
       }
 
-      ml_tizen_set_feature_state (SUPPORTED);
+      _ml_tizen_set_feature_state (SUPPORTED);
     } else {
       switch (ret) {
         case SYSTEM_INFO_ERROR_INVALID_PARAMETER:
index edbee0f..3cc10e4 100644 (file)
@@ -37,7 +37,7 @@ ml_tensors_info_create (ml_tensors_info_h * info)
   g_mutex_init (&tensors_info->lock);
 
   /* init tensors info struct */
-  return ml_tensors_info_initialize (tensors_info);
+  return _ml_tensors_info_initialize (tensors_info);
 }
 
 /**
@@ -57,7 +57,7 @@ ml_tensors_info_destroy (ml_tensors_info_h info)
 
   G_LOCK_UNLESS_NOLOCK (*tensors_info);
 
-  ml_tensors_info_free (tensors_info);
+  _ml_tensors_info_free (tensors_info);
   G_UNLOCK_UNLESS_NOLOCK (*tensors_info);
   g_mutex_clear (&tensors_info->lock);
   g_free (tensors_info);
@@ -69,7 +69,7 @@ ml_tensors_info_destroy (ml_tensors_info_h info)
  * @brief Initializes the tensors information with default value.
  */
 int
-ml_tensors_info_initialize (ml_tensors_info_s * info)
+_ml_tensors_info_initialize (ml_tensors_info_s * info)
 {
   guint i, j;
 
@@ -197,7 +197,7 @@ ml_tensors_info_validate (const ml_tensors_info_h info, bool *valid)
  * @brief Compares the given tensors information.
  */
 int
-ml_tensors_info_compare (const ml_tensors_info_h info1,
+_ml_tensors_info_compare (const ml_tensors_info_h info1,
     const ml_tensors_info_h info2, bool *equal)
 {
   ml_tensors_info_s *i1, *i2;
@@ -460,7 +460,7 @@ ml_tensors_info_get_tensor_dimension (ml_tensors_info_h info,
  * @brief Gets the byte size of the given tensor info.
  */
 size_t
-ml_tensor_info_get_size (const ml_tensor_info_s * info)
+_ml_tensor_info_get_size (const ml_tensor_info_s * info)
 {
   size_t tensor_size;
   gint i;
@@ -524,7 +524,7 @@ ml_tensors_info_get_tensor_size (ml_tensors_info_h info,
 
     /* get total byte size */
     for (i = 0; i < tensors_info->num_tensors; i++) {
-      *data_size += ml_tensor_info_get_size (&tensors_info->info[i]);
+      *data_size += _ml_tensor_info_get_size (&tensors_info->info[i]);
     }
   } else {
     if (tensors_info->num_tensors <= index) {
@@ -532,7 +532,7 @@ ml_tensors_info_get_tensor_size (ml_tensors_info_h info,
       return ML_ERROR_INVALID_PARAMETER;
     }
 
-    *data_size = ml_tensor_info_get_size (&tensors_info->info[index]);
+    *data_size = _ml_tensor_info_get_size (&tensors_info->info[index]);
   }
 
   G_UNLOCK_UNLESS_NOLOCK (*tensors_info);
@@ -544,7 +544,7 @@ ml_tensors_info_get_tensor_size (ml_tensors_info_h info,
  * @note This does not touch the lock
  */
 void
-ml_tensors_info_free (ml_tensors_info_s * info)
+_ml_tensors_info_free (ml_tensors_info_s * info)
 {
   gint i;
 
@@ -558,7 +558,7 @@ ml_tensors_info_free (ml_tensors_info_s * info)
     }
   }
 
-  ml_tensors_info_initialize (info);
+  _ml_tensors_info_initialize (info);
 }
 
 /**
@@ -568,7 +568,7 @@ ml_tensors_info_free (ml_tensors_info_s * info)
  * @return @c 0 on success. Otherwise a negative error value.
  */
 int
-ml_tensors_data_destroy_internal (ml_tensors_data_h data, gboolean free_data)
+_ml_tensors_data_destroy_internal (ml_tensors_data_h data, gboolean free_data)
 {
   int status = ML_ERROR_NONE;
   ml_tensors_data_s *_data;
@@ -609,7 +609,7 @@ int
 ml_tensors_data_destroy (ml_tensors_data_h data)
 {
   check_feature_state ();
-  return ml_tensors_data_destroy_internal (data, TRUE);
+  return _ml_tensors_data_destroy_internal (data, TRUE);
 }
 
 /**
@@ -617,7 +617,7 @@ ml_tensors_data_destroy (ml_tensors_data_h data)
  * @note Memory for data buffer is not allocated.
  */
 int
-ml_tensors_data_create_no_alloc (const ml_tensors_info_h info,
+_ml_tensors_data_create_no_alloc (const ml_tensors_info_h info,
     ml_tensors_data_h * data)
 {
   ml_tensors_data_s *_data;
@@ -647,7 +647,7 @@ ml_tensors_data_create_no_alloc (const ml_tensors_info_h info,
     G_LOCK_UNLESS_NOLOCK (*_info);
     _data->num_tensors = _info->num_tensors;
     for (i = 0; i < _data->num_tensors; i++) {
-      _data->tensors[i].size = ml_tensor_info_get_size (&_info->info[i]);
+      _data->tensors[i].size = _ml_tensor_info_get_size (&_info->info[i]);
       _data->tensors[i].tensor = NULL;
     }
     G_UNLOCK_UNLESS_NOLOCK (*_info);
@@ -662,7 +662,7 @@ ml_tensors_data_create_no_alloc (const ml_tensors_info_h info,
  * @note Memory ptr for data buffer is copied. No new memory for data buffer is allocated.
  */
 int
-ml_tensors_data_clone_no_alloc (const ml_tensors_data_s * data_src,
+_ml_tensors_data_clone_no_alloc (const ml_tensors_data_s * data_src,
     ml_tensors_data_h * data)
 {
   int status;
@@ -673,7 +673,7 @@ ml_tensors_data_clone_no_alloc (const ml_tensors_data_s * data_src,
   if (data == NULL || data_src == NULL)
     return ML_ERROR_INVALID_PARAMETER;
 
-  status = ml_tensors_data_create_no_alloc (data_src->info,
+  status = _ml_tensors_data_create_no_alloc (data_src->info,
       (ml_tensors_data_h *) & _data);
   if (status != ML_ERROR_NONE)
     return status;
@@ -710,7 +710,7 @@ ml_tensors_data_create (const ml_tensors_info_h info, ml_tensors_data_h * data)
   }
 
   status =
-      ml_tensors_data_create_no_alloc (info, (ml_tensors_data_h *) & _data);
+      _ml_tensors_data_create_no_alloc (info, (ml_tensors_data_h *) & _data);
 
   if (status != ML_ERROR_NONE) {
     return status;
@@ -830,7 +830,7 @@ ml_tensors_info_clone (ml_tensors_info_h dest, const ml_tensors_info_h src)
   if (status != ML_ERROR_NONE || !valid)
     goto done;
 
-  ml_tensors_info_initialize (dest_info);
+  _ml_tensors_info_initialize (dest_info);
 
   dest_info->num_tensors = src_info->num_tensors;
 
@@ -862,7 +862,7 @@ done:
  * @return Newly allocated string. The returned string should be freed with g_free().
  */
 gchar *
-ml_replace_string (gchar * source, const gchar * what, const gchar * to,
+_ml_replace_string (gchar * source, const gchar * what, const gchar * to,
     const gchar * delimiters, guint * count)
 {
   GString *builder;
index 816e654..c681d54 100644 (file)
@@ -47,7 +47,7 @@ static const char *ml_nnfw_subplugin_name[] = {
  * @brief Internal function to get the sub-plugin name.
  */
 const char *
-ml_get_nnfw_subplugin_name (ml_nnfw_type_e nnfw)
+_ml_get_nnfw_subplugin_name (ml_nnfw_type_e nnfw)
 {
   /* check sub-plugin for android */
   if (nnfw == ML_NNFW_TYPE_SNAP)
@@ -60,7 +60,7 @@ ml_get_nnfw_subplugin_name (ml_nnfw_type_e nnfw)
  * @brief Allocates a tensors information handle from gst info.
  */
 int
-ml_tensors_info_create_from_gst (ml_tensors_info_h * ml_info,
+_ml_tensors_info_create_from_gst (ml_tensors_info_h * ml_info,
     GstTensorsInfo * gst_info)
 {
   int status;
@@ -72,7 +72,7 @@ ml_tensors_info_create_from_gst (ml_tensors_info_h * ml_info,
   if (status != ML_ERROR_NONE)
     return status;
 
-  ml_tensors_info_copy_from_gst (*ml_info, gst_info);
+  _ml_tensors_info_copy_from_gst (*ml_info, gst_info);
   return ML_ERROR_NONE;
 }
 
@@ -81,7 +81,7 @@ ml_tensors_info_create_from_gst (ml_tensors_info_h * ml_info,
  * @bug Thread safety required. Check its internal users first!
  */
 void
-ml_tensors_info_copy_from_gst (ml_tensors_info_s * ml_info,
+_ml_tensors_info_copy_from_gst (ml_tensors_info_s * ml_info,
     const GstTensorsInfo * gst_info)
 {
   guint i, j;
@@ -90,7 +90,7 @@ ml_tensors_info_copy_from_gst (ml_tensors_info_s * ml_info,
   if (!ml_info || !gst_info)
     return;
 
-  ml_tensors_info_initialize (ml_info);
+  _ml_tensors_info_initialize (ml_info);
   max_dim = MIN (ML_TENSOR_RANK_LIMIT, NNS_TENSOR_RANK_LIMIT);
 
   ml_info->num_tensors = gst_info->num_tensors;
@@ -154,7 +154,7 @@ ml_tensors_info_copy_from_gst (ml_tensors_info_s * ml_info,
  * @bug Thread safety required. Check its internal users first!
  */
 void
-ml_tensors_info_copy_from_ml (GstTensorsInfo * gst_info,
+_ml_tensors_info_copy_from_ml (GstTensorsInfo * gst_info,
     const ml_tensors_info_s * ml_info)
 {
   guint i, j;
@@ -229,7 +229,7 @@ ml_tensors_info_copy_from_ml (GstTensorsInfo * gst_info,
  * @brief Initializes the GStreamer library. This is internal function.
  */
 int
-ml_initialize_gstreamer (void)
+_ml_initialize_gstreamer (void)
 {
   GError *err = NULL;
 
@@ -251,7 +251,7 @@ ml_initialize_gstreamer (void)
  * @brief Internal helper function to validate model files.
  */
 static int
-_ml_validate_model_file (const char *const *model,
+__ml_validate_model_file (const char *const *model,
     const unsigned int num_models, gboolean * is_dir)
 {
   guint i;
@@ -281,7 +281,7 @@ _ml_validate_model_file (const char *const *model,
  * @brief Internal function to get the nnfw type.
  */
 ml_nnfw_type_e
-ml_get_nnfw_type_by_subplugin_name (const char *name)
+_ml_get_nnfw_type_by_subplugin_name (const char *name)
 {
   ml_nnfw_type_e nnfw_type = ML_NNFW_TYPE_ANY;
   int idx = -1;
@@ -314,7 +314,7 @@ ml_get_nnfw_type_by_subplugin_name (const char *name)
  * @retval #ML_ERROR_INVALID_PARAMETER Given parameter is invalid.
  */
 int
-ml_validate_model_file (const char *const *model,
+_ml_validate_model_file (const char *const *model,
     const unsigned int num_models, ml_nnfw_type_e * nnfw)
 {
   int status = ML_ERROR_NONE;
@@ -327,7 +327,7 @@ ml_validate_model_file (const char *const *model,
   if (!nnfw)
     return ML_ERROR_INVALID_PARAMETER;
 
-  status = _ml_validate_model_file (model, num_models, &is_dir);
+  status = __ml_validate_model_file (model, num_models, &is_dir);
   if (status != ML_ERROR_NONE)
     return status;
 
@@ -337,7 +337,7 @@ ml_validate_model_file (const char *const *model,
    * If any condition for auto detection is added later, below code also should be updated.
    */
   fw_name = gst_tensor_filter_detect_framework (model, num_models, TRUE);
-  detected = ml_get_nnfw_type_by_subplugin_name (fw_name);
+  detected = _ml_get_nnfw_type_by_subplugin_name (fw_name);
   g_free (fw_name);
 
   if (*nnfw == ML_NNFW_TYPE_ANY) {
@@ -346,7 +346,7 @@ ml_validate_model_file (const char *const *model,
       status = ML_ERROR_INVALID_PARAMETER;
     } else {
       _ml_logi ("The given model is supposed a %s model.",
-          ml_get_nnfw_subplugin_name (detected));
+          _ml_get_nnfw_subplugin_name (detected));
       *nnfw = detected;
     }
 
@@ -417,8 +417,8 @@ ml_validate_model_file (const char *const *model,
 
 done:
   if (status == ML_ERROR_NONE) {
-    if (!ml_nnfw_is_available (*nnfw, ML_NNFW_HW_ANY)) {
-      _ml_loge ("%s is not available.", ml_get_nnfw_subplugin_name (*nnfw));
+    if (!_ml_nnfw_is_available (*nnfw, ML_NNFW_HW_ANY)) {
+      _ml_loge ("%s is not available.", _ml_get_nnfw_subplugin_name (*nnfw));
       status = ML_ERROR_NOT_SUPPORTED;
     }
   } else {
@@ -433,7 +433,7 @@ done:
  * @brief Convert c-api based hw to internal representation
  */
 accl_hw
-ml_nnfw_to_accl_hw (const ml_nnfw_hw_e hw)
+_ml_nnfw_to_accl_hw (const ml_nnfw_hw_e hw)
 {
   switch (hw) {
     case ML_NNFW_HW_ANY:
@@ -475,13 +475,13 @@ ml_nnfw_to_accl_hw (const ml_nnfw_hw_e hw)
  * @note More details on format can be found in gst_tensor_filter_install_properties() in tensor_filter_common.c.
  */
 char *
-ml_nnfw_to_str_prop (const ml_nnfw_hw_e hw)
+_ml_nnfw_to_str_prop (const ml_nnfw_hw_e hw)
 {
   const gchar *hw_name;
   const gchar *use_accl = "true:";
   gchar *str_prop = NULL;
 
-  hw_name = get_accl_hw_str (ml_nnfw_to_accl_hw (hw));
+  hw_name = get_accl_hw_str (_ml_nnfw_to_accl_hw (hw));
   str_prop = g_strdup_printf ("%s%s", use_accl, hw_name);
 
   return str_prop;
@@ -501,7 +501,7 @@ ml_check_element_availability (const char *element_name, bool *available)
   if (!element_name || !available)
     return ML_ERROR_INVALID_PARAMETER;
 
-  status = ml_initialize_gstreamer ();
+  status = _ml_initialize_gstreamer ();
   if (status != ML_ERROR_NONE)
     return status;
 
@@ -514,7 +514,7 @@ ml_check_element_availability (const char *element_name, bool *available)
     const gchar *plugin_name = gst_plugin_feature_get_plugin_name (feature);
 
     /* check restricted element */
-    status = ml_check_plugin_availability (plugin_name, element_name);
+    status = _ml_check_plugin_availability (plugin_name, element_name);
     if (status == ML_ERROR_NONE)
       *available = true;
 
@@ -528,7 +528,8 @@ ml_check_element_availability (const char *element_name, bool *available)
  * @brief Checks the availability of the plugin.
  */
 int
-ml_check_plugin_availability (const char *plugin_name, const char *element_name)
+_ml_check_plugin_availability (const char *plugin_name,
+    const char *element_name)
 {
   static gboolean list_loaded = FALSE;
   static gchar **restricted_elements = NULL;
index 3eb74ac..6b74d36 100644 (file)
@@ -32,11 +32,11 @@ extern "C" {
 #if defined (__TIZEN__)
 #if defined (__PRIVILEGE_CHECK_SUPPORT__)
 
-#define convert_tizen_element(...) ml_tizen_convert_element(__VA_ARGS__)
+#define convert_tizen_element(...) _ml_tizen_convert_element(__VA_ARGS__)
 
 #if (TIZENVERSION >= 5) && (TIZENVERSION < 9999)
-#define get_tizen_resource(...) ml_tizen_get_resource(__VA_ARGS__)
-#define release_tizen_resource(...) ml_tizen_release_resource(__VA_ARGS__)
+#define get_tizen_resource(...) _ml_tizen_get_resource(__VA_ARGS__)
+#define release_tizen_resource(...) _ml_tizen_release_resource(__VA_ARGS__)
 
 #elif (TIZENVERSION < 5)
 #define get_tizen_resource(...) (0)
@@ -189,47 +189,47 @@ typedef struct _ml_pipeline_common_elem {
 /**
  * @brief Macro to check the availability of given NNFW.
  */
-#define ml_nnfw_is_available(f,h) ({bool a; (ml_check_nnfw_availability ((f), (h), &a) == ML_ERROR_NONE && a);})
+#define _ml_nnfw_is_available(f,h) ({bool a; (ml_check_nnfw_availability ((f), (h), &a) == ML_ERROR_NONE && a);})
 
 /**
  * @brief Macro to check the availability of given element.
  */
-#define ml_element_is_available(e) ({bool a; (ml_check_element_availability ((e), &a) == ML_ERROR_NONE && a);})
+#define _ml_element_is_available(e) ({bool a; (ml_check_element_availability ((e), &a) == ML_ERROR_NONE && a);})
 
 /**
  * @brief Allocates a tensors information handle from gst info.
  */
-int ml_tensors_info_create_from_gst (ml_tensors_info_h *ml_info, GstTensorsInfo *gst_info);
+int _ml_tensors_info_create_from_gst (ml_tensors_info_h *ml_info, GstTensorsInfo *gst_info);
 
 /**
  * @brief Copies tensor metadata from gst tensors info.
  */
-void ml_tensors_info_copy_from_gst (ml_tensors_info_s *ml_info, const GstTensorsInfo *gst_info);
+void _ml_tensors_info_copy_from_gst (ml_tensors_info_s *ml_info, const GstTensorsInfo *gst_info);
 
 /**
  * @brief Copies tensor metadata from ml tensors info.
  */
-void ml_tensors_info_copy_from_ml (GstTensorsInfo *gst_info, const ml_tensors_info_s *ml_info);
+void _ml_tensors_info_copy_from_ml (GstTensorsInfo *gst_info, const ml_tensors_info_s *ml_info);
 
 /**
  * @brief Internal function to get the sub-plugin name.
  */
-const char * ml_get_nnfw_subplugin_name (ml_nnfw_type_e nnfw);
+const char * _ml_get_nnfw_subplugin_name (ml_nnfw_type_e nnfw);
 
 /**
  * @brief Convert c-api based hw to internal representation
  */
-accl_hw ml_nnfw_to_accl_hw (const ml_nnfw_hw_e hw);
+accl_hw _ml_nnfw_to_accl_hw (const ml_nnfw_hw_e hw);
 
 /**
  * @brief Internal function to get the nnfw type.
  */
-ml_nnfw_type_e ml_get_nnfw_type_by_subplugin_name (const char *name);
+ml_nnfw_type_e _ml_get_nnfw_type_by_subplugin_name (const char *name);
 
 /**
  * @brief Initializes the GStreamer library. This is internal function.
  */
-int ml_initialize_gstreamer (void);
+int _ml_initialize_gstreamer (void);
 
 /**
  * @brief Validates the nnfw model file. (Internal only)
@@ -242,18 +242,18 @@ int ml_initialize_gstreamer (void);
  * @retval #ML_ERROR_NOT_SUPPORTED Not supported.
  * @retval #ML_ERROR_INVALID_PARAMETER Given parameter is invalid.
  */
-int ml_validate_model_file (const char * const *model, const unsigned int num_models, ml_nnfw_type_e * nnfw);
+int _ml_validate_model_file (const char * const *model, const unsigned int num_models, ml_nnfw_type_e * nnfw);
 
 /**
  * @brief Checks the availability of the plugin.
  */
-int ml_check_plugin_availability (const char *plugin_name, const char *element_name);
+int _ml_check_plugin_availability (const char *plugin_name, const char *element_name);
 
 /**
  * @brief Internal function to convert accelerator as tensor_filter property format.
  * @note returned value must be freed by the caller
  */
-char* ml_nnfw_to_str_prop (ml_nnfw_hw_e hw);
+char* _ml_nnfw_to_str_prop (ml_nnfw_hw_e hw);
 
 /**
  * @brief Gets the element of pipeline itself (GstElement).
@@ -261,24 +261,24 @@ char* ml_nnfw_to_str_prop (ml_nnfw_hw_e hw);
  *          Note that caller should release the returned reference using gst_object_unref().
  * @return The reference of pipeline itself. Null if the pipeline is not constructed or closed.
  */
-GstElement* ml_pipeline_get_gst_element (ml_pipeline_h pipe);
+GstElement* _ml_pipeline_get_gst_element (ml_pipeline_h pipe);
 
 #if defined (__TIZEN__)
 /****** TIZEN PRIVILEGE CHECK BEGINS ******/
 /**
  * @brief Releases the resource handle of Tizen.
  */
-void ml_tizen_release_resource (gpointer handle, const gchar * res_type);
+void _ml_tizen_release_resource (gpointer handle, const gchar * res_type);
 
 /**
  * @brief Gets the resource handle of Tizen.
  */
-int ml_tizen_get_resource (ml_pipeline_h pipe, const gchar * res_type);
+int _ml_tizen_get_resource (ml_pipeline_h pipe, const gchar * res_type);
 
 /**
  * @brief Converts predefined element for Tizen.
  */
-int ml_tizen_convert_element (ml_pipeline_h pipe, gchar ** result, gboolean is_internal);
+int _ml_tizen_convert_element (ml_pipeline_h pipe, gchar ** result, gboolean is_internal);
 /****** TIZEN PRIVILEGE CHECK ENDS ******/
 #endif /* __TIZEN */
 #ifdef __cplusplus
index 93ded3a..978520b 100644 (file)
@@ -230,7 +230,7 @@ construct_element (GstElement * e, ml_pipeline * p, const char *name,
   ret->handles = NULL;
   ret->src = NULL;
   ret->sink = NULL;
-  ml_tensors_info_initialize (&ret->tensors_info);
+  _ml_tensors_info_initialize (&ret->tensors_info);
   ret->size = 0;
   ret->maxid = 0;
   ret->handle_id = 0;
@@ -252,7 +252,7 @@ get_tensors_info_from_caps (GstCaps * caps, ml_tensors_info_s * info,
   guint i, n_caps;
   gboolean found = FALSE;
 
-  ml_tensors_info_initialize (info);
+  _ml_tensors_info_initialize (info);
   n_caps = gst_caps_get_size (caps);
 
   for (i = 0; i < n_caps; i++) {
@@ -260,7 +260,7 @@ get_tensors_info_from_caps (GstCaps * caps, ml_tensors_info_s * info,
     found = gst_tensors_config_from_structure (&config, s);
 
     if (found) {
-      ml_tensors_info_copy_from_gst (info, &config.info);
+      _ml_tensors_info_copy_from_gst (info, &config.info);
       *is_flexible = gst_tensors_config_is_flexible (&config);
       break;
     }
@@ -301,7 +301,7 @@ cb_sink_event (GstElement * e, GstBuffer * b, gpointer user_data)
 
   /* set tensor data */
   status =
-      ml_tensors_data_create_no_alloc (NULL, (ml_tensors_data_h *) & _data);
+      _ml_tensors_data_create_no_alloc (NULL, (ml_tensors_data_h *) & _data);
   if (status != ML_ERROR_NONE) {
     _ml_loge ("Failed to allocate memory for tensors data in sink callback.");
     return;
@@ -359,7 +359,7 @@ cb_sink_event (GstElement * e, GstBuffer * b, gpointer user_data)
           }
 
           for (i = 0; i < _info->num_tensors; i++) {
-            size_t sz = ml_tensor_info_get_size (&_info->info[i]);
+            size_t sz = _ml_tensor_info_get_size (&_info->info[i]);
 
             /* Not configured, yet. */
             if (sz == 0)
@@ -418,7 +418,7 @@ send_cb:
       _data->tensors[i].size = map[i].size - hsize;
     }
 
-    ml_tensors_info_copy_from_gst (_info, &gst_info);
+    _ml_tensors_info_copy_from_gst (_info, &gst_info);
   }
 
   /* Iterate e->handles, pass the data to them */
@@ -443,7 +443,7 @@ error:
   }
 
   if (_data) {
-    ml_tensors_data_destroy_internal (_data, FALSE);
+    _ml_tensors_data_destroy_internal (_data, FALSE);
     _data = NULL;
   }
   return;
@@ -587,7 +587,7 @@ cleanup_node (gpointer data)
   if (e->sink)
     gst_object_unref (e->sink);
 
-  ml_tensors_info_free (&e->tensors_info);
+  _ml_tensors_info_free (&e->tensors_info);
 
   g_mutex_unlock (&e->lock);
   g_mutex_clear (&e->lock);
@@ -733,7 +733,7 @@ iterate_element (ml_pipeline * pipe_h, GstElement * pipeline,
             const gchar *element_name = gst_plugin_feature_get_name (feature);
 
             /* validate the availability of the plugin */
-            if (!is_internal && ml_check_plugin_availability (plugin_name,
+            if (!is_internal && _ml_check_plugin_availability (plugin_name,
                     element_name) != ML_ERROR_NONE) {
               status = ML_ERROR_NOT_SUPPORTED;
               done = TRUE;
@@ -842,7 +842,7 @@ construct_pipeline_internal (const char *pipeline_description,
   /* init null */
   *pipe = NULL;
 
-  if ((status = ml_initialize_gstreamer ()) != ML_ERROR_NONE)
+  if ((status = _ml_initialize_gstreamer ()) != ML_ERROR_NONE)
     return status;
 
   /* prepare pipeline handle */
@@ -1359,7 +1359,7 @@ ml_pipeline_src_parse_tensors_info (ml_pipeline_element * elem)
 
       if (found && !flexible) {
         for (i = 0; i < _info->num_tensors; i++) {
-          sz = ml_tensor_info_get_size (&_info->info[i]);
+          sz = _ml_tensor_info_get_size (&_info->info[i]);
           elem->size += sz;
         }
       } else {
@@ -1519,7 +1519,7 @@ ml_pipeline_src_input_data (ml_pipeline_src_h h, ml_tensors_data_h data,
     }
 
     for (i = 0; i < elem->tensors_info.num_tensors; i++) {
-      size_t sz = ml_tensor_info_get_size (&elem->tensors_info.info[i]);
+      size_t sz = _ml_tensor_info_get_size (&elem->tensors_info.info[i]);
 
       if (sz != _data->tensors[i].size) {
         _ml_loge
@@ -1534,7 +1534,7 @@ ml_pipeline_src_input_data (ml_pipeline_src_h h, ml_tensors_data_h data,
 
   /* Create buffer to be pushed from buf[] */
   buffer = gst_buffer_new ();
-  ml_tensors_info_copy_from_ml (&gst_info, _data->info);
+  _ml_tensors_info_copy_from_ml (&gst_info, _data->info);
 
   for (i = 0; i < _data->num_tensors; i++) {
     mem_data = _data->tensors[i].tensor;
@@ -1570,7 +1570,7 @@ ml_pipeline_src_input_data (ml_pipeline_src_h h, ml_tensors_data_h data,
   /* Free data ptr if buffer policy is auto-free */
   if (policy == ML_PIPELINE_BUF_POLICY_AUTO_FREE) {
     G_UNLOCK_UNLESS_NOLOCK (*_data);
-    ml_tensors_data_destroy_internal (_data, FALSE);
+    _ml_tensors_data_destroy_internal (_data, FALSE);
     _data = NULL;
   }
 
@@ -2469,7 +2469,7 @@ ml_pipeline_element_get_property_enum (ml_pipeline_element_h elem_h,
  * @brief Gets the element of pipeline itself (GstElement).
  */
 GstElement *
-ml_pipeline_get_gst_element (ml_pipeline_h pipe)
+_ml_pipeline_get_gst_element (ml_pipeline_h pipe)
 {
   ml_pipeline *p = (ml_pipeline *) pipe;
   GstElement *element = NULL;
@@ -2561,7 +2561,7 @@ ml_pipeline_custom_invoke (void *data, const GstTensorFilterProperties * prop,
   g_mutex_lock (&c->lock);
 
   /* prepare invoke */
-  status = ml_tensors_data_create_no_alloc (c->in_info, &in_data);
+  status = _ml_tensors_data_create_no_alloc (c->in_info, &in_data);
   if (status != ML_ERROR_NONE)
     goto done;
 
@@ -2569,7 +2569,7 @@ ml_pipeline_custom_invoke (void *data, const GstTensorFilterProperties * prop,
   for (i = 0; i < _data->num_tensors; i++)
     _data->tensors[i].tensor = in[i].data;
 
-  status = ml_tensors_data_create_no_alloc (c->out_info, &out_data);
+  status = _ml_tensors_data_create_no_alloc (c->out_info, &out_data);
   if (status != ML_ERROR_NONE)
     goto done;
 
@@ -2636,8 +2636,8 @@ ml_pipeline_custom_easy_filter_register (const char *name,
     goto exit;
 
   /* register custom filter */
-  ml_tensors_info_copy_from_ml (&in_info, c->in_info);
-  ml_tensors_info_copy_from_ml (&out_info, c->out_info);
+  _ml_tensors_info_copy_from_ml (&in_info, c->in_info);
+  _ml_tensors_info_copy_from_ml (&out_info, c->out_info);
 
   if (NNS_custom_easy_register (name, ml_pipeline_custom_invoke, c,
           &in_info, &out_info) != 0) {
@@ -2752,8 +2752,8 @@ ml_pipeline_if_custom (const GstTensorsInfo * info,
   if (!c || !c->cb)
     return FALSE;
 
-  ml_tensors_info_create_from_gst (&ml_info, &in_info);
-  status = ml_tensors_data_create_no_alloc (ml_info, &in_data);
+  _ml_tensors_info_create_from_gst (&ml_info, &in_info);
+  status = _ml_tensors_data_create_no_alloc (ml_info, &in_data);
   if (status != ML_ERROR_NONE)
     goto done;
 
index 18040e8..fbe8387 100644 (file)
@@ -130,11 +130,11 @@ ml_check_nnfw_availability_full (ml_nnfw_type_e nnfw, ml_nnfw_hw_e hw,
   if (nnfw == ML_NNFW_TYPE_ANY)
     return ML_ERROR_INVALID_PARAMETER;
 
-  fw_name = ml_get_nnfw_subplugin_name (nnfw);
+  fw_name = _ml_get_nnfw_subplugin_name (nnfw);
 
   if (fw_name) {
     if (nnstreamer_filter_find (fw_name) != NULL) {
-      accl_hw accl = ml_nnfw_to_accl_hw (hw);
+      accl_hw accl = _ml_nnfw_to_accl_hw (hw);
 
       if (gst_tensor_filter_check_hw_availability (fw_name, accl, custom)) {
         *available = true;
@@ -177,7 +177,7 @@ __setup_in_out_tensors (ml_single * single_h)
     /** memory will be allocated by tensor_filter_single */
     in_tensors->tensors[i].tensor = NULL;
     in_tensors->tensors[i].size =
-        ml_tensor_info_get_size (&single_h->in_info.info[i]);
+        _ml_tensor_info_get_size (&single_h->in_info.info[i]);
   }
 
   /** Setup output buffer */
@@ -186,7 +186,7 @@ __setup_in_out_tensors (ml_single * single_h)
     /** memory will be allocated by tensor_filter_single */
     out_tensors->tensors[i].tensor = NULL;
     out_tensors->tensors[i].size =
-        ml_tensor_info_get_size (&single_h->out_info.info[i]);
+        _ml_tensor_info_get_size (&single_h->out_info.info[i]);
   }
 }
 
@@ -490,13 +490,13 @@ ml_single_set_gst_info (ml_single * single_h, const ml_tensors_info_h info)
   int status = ML_ERROR_NONE;
   int ret = -EINVAL;
 
-  ml_tensors_info_copy_from_ml (&gst_in_info, info);
+  _ml_tensors_info_copy_from_ml (&gst_in_info, info);
 
   ret = single_h->klass->set_input_info (single_h->filter, &gst_in_info,
       &gst_out_info);
   if (ret == 0) {
-    ml_tensors_info_copy_from_gst (&single_h->in_info, &gst_in_info);
-    ml_tensors_info_copy_from_gst (&single_h->out_info, &gst_out_info);
+    _ml_tensors_info_copy_from_gst (&single_h->in_info, &gst_in_info);
+    _ml_tensors_info_copy_from_gst (&single_h->out_info, &gst_out_info);
     __setup_in_out_tensors (single_h);
   } else if (ret == -ENOENT) {
     status = ML_ERROR_NOT_SUPPORTED;
@@ -530,7 +530,7 @@ ml_single_set_inout_tensors_info (GObject * object,
     str_name_name = CONCAT_MACRO_STR (OUTPUT_STR, NAME_STR);
   }
 
-  ml_tensors_info_copy_from_ml (&info, tensors_info);
+  _ml_tensors_info_copy_from_ml (&info, tensors_info);
 
   /* Set input option */
   str_dim = gst_tensors_info_get_dimensions_string (&info);
@@ -584,7 +584,7 @@ ml_single_set_info_in_handle (ml_single_h single, gboolean is_input,
     ml_tensors_info_h info = NULL;
 
     ml_single_get_gst_info (single_h, is_input, &gst_info);
-    ml_tensors_info_create_from_gst (&info, &gst_info);
+    _ml_tensors_info_create_from_gst (&info, &gst_info);
 
     gst_tensors_info_free (&gst_info);
 
@@ -649,8 +649,8 @@ ml_single_create_handle (ml_nnfw_type_e nnfw)
   single_h->destroy_data_list = NULL;
   single_h->invoking = FALSE;
 
-  ml_tensors_info_initialize (&single_h->in_info);
-  ml_tensors_info_initialize (&single_h->out_info);
+  _ml_tensors_info_initialize (&single_h->in_info);
+  _ml_tensors_info_initialize (&single_h->out_info);
   g_mutex_init (&single_h->mutex);
   g_cond_init (&single_h->cond);
 
@@ -747,7 +747,7 @@ ml_single_open_custom (ml_single_h * single, ml_single_preset * info)
   list_models = g_strsplit (info->models, ",", -1);
   num_models = g_strv_length (list_models);
 
-  status = ml_validate_model_file ((const char **) list_models, num_models,
+  status = _ml_validate_model_file ((const char **) list_models, num_models,
       &nnfw);
   if (status != ML_ERROR_NONE) {
     g_strfreev (list_models);
@@ -760,7 +760,7 @@ ml_single_open_custom (ml_single_h * single, ml_single_preset * info)
    * 2. Determine hw
    * (Supposed CPU only) Support others later.
    */
-  if (!ml_nnfw_is_available (nnfw, hw)) {
+  if (!_ml_nnfw_is_available (nnfw, hw)) {
     _ml_loge ("The given nnfw is not available.");
     return ML_ERROR_NOT_SUPPORTED;
   }
@@ -813,8 +813,8 @@ ml_single_open_custom (ml_single_h * single, ml_single_preset * info)
   }
 
   /* set accelerator, framework, model files and custom option */
-  fw_name = ml_get_nnfw_subplugin_name (nnfw);
-  hw_name = ml_nnfw_to_str_prop (hw);
+  fw_name = _ml_get_nnfw_subplugin_name (nnfw);
+  hw_name = _ml_nnfw_to_str_prop (hw);
   g_object_set (filter_obj, "framework", fw_name, "accelerator", hw_name,
       "model", info->models, NULL);
   g_free (hw_name);
@@ -944,8 +944,8 @@ ml_single_close (ml_single_h single)
     single_h->klass = NULL;
   }
 
-  ml_tensors_info_free (&single_h->in_info);
-  ml_tensors_info_free (&single_h->out_info);
+  _ml_tensors_info_free (&single_h->in_info);
+  _ml_tensors_info_free (&single_h->out_info);
 
   g_cond_clear (&single_h->cond);
   g_mutex_clear (&single_h->mutex);
@@ -1084,7 +1084,7 @@ _ml_single_invoke_internal (ml_single_h single,
   if (need_alloc) {
     *output = NULL;
 
-    status = ml_tensors_data_clone_no_alloc (&single_h->out_tensors,
+    status = _ml_tensors_data_clone_no_alloc (&single_h->out_tensors,
         &single_h->output);
     if (status != ML_ERROR_NONE)
       goto exit;
@@ -1378,7 +1378,7 @@ ml_single_set_property (ml_single_h single, const char *name, const char *value)
     if (num == gst_info.num_tensors) {
       ml_tensors_info_h ml_info;
 
-      ml_tensors_info_create_from_gst (&ml_info, &gst_info);
+      _ml_tensors_info_create_from_gst (&ml_info, &gst_info);
 
       /* change configuration */
       status = ml_single_set_gst_info (single_h, ml_info);
index 2bc4b57..ab3ca2c 100644 (file)
@@ -655,7 +655,7 @@ ml_tizen_mm_replace_element (MMHandleType * handle, camera_conf * conf,
   }
 
   *description =
-      ml_replace_string (*description, what, src_name, " !", &changed);
+      _ml_replace_string (*description, what, src_name, " !", &changed);
   if (changed > 1) {
     /* allow one src in the pipeline */
     _ml_loge ("Cannot parse duplicated src node.");
@@ -730,7 +730,7 @@ ml_tizen_mm_convert_element (ml_pipeline_h pipe, gchar ** result,
         status = ML_ERROR_NOT_SUPPORTED;
         goto mm_error;
       }
-      *result = ml_replace_string (*result, ML_TIZEN_CAM_VIDEO_SRC, src_name,
+      *result = _ml_replace_string (*result, ML_TIZEN_CAM_VIDEO_SRC, src_name,
           " !", &changed);
       if (changed > 1) {
         /* Allow one src only in a pipeline */
@@ -751,7 +751,7 @@ ml_tizen_mm_convert_element (ml_pipeline_h pipe, gchar ** result,
         status = ML_ERROR_NOT_SUPPORTED;
         goto mm_error;
       }
-      *result = ml_replace_string (*result, ML_TIZEN_CAM_AUDIO_SRC, src_name,
+      *result = _ml_replace_string (*result, ML_TIZEN_CAM_AUDIO_SRC, src_name,
           " !", &changed);
       if (changed > 1) {
         /* Allow one src only in a pipeline */
@@ -851,7 +851,7 @@ ml_tizen_mm_convert_element (ml_pipeline_h pipe, gchar ** result,
  * @brief Releases the resource handle of Tizen.
  */
 void
-ml_tizen_release_resource (gpointer handle, const gchar * res_type)
+_ml_tizen_release_resource (gpointer handle, const gchar * res_type)
 {
   if (g_str_equal (res_type, TIZEN_RES_MM)) {
     ml_tizen_mm_res_release (handle, TRUE);
@@ -862,7 +862,7 @@ ml_tizen_release_resource (gpointer handle, const gchar * res_type)
  * @brief Gets the resource handle of Tizen.
  */
 int
-ml_tizen_get_resource (ml_pipeline_h pipe, const gchar * res_type)
+_ml_tizen_get_resource (ml_pipeline_h pipe, const gchar * res_type)
 {
   int status = ML_ERROR_NONE;
 
@@ -878,7 +878,7 @@ ml_tizen_get_resource (ml_pipeline_h pipe, const gchar * res_type)
  * @brief Converts predefined element for Tizen.
  */
 int
-ml_tizen_convert_element (ml_pipeline_h pipe, gchar ** result,
+_ml_tizen_convert_element (ml_pipeline_h pipe, gchar ** result,
     gboolean is_internal)
 {
   int status;
index 5379660..3cfda84 100644 (file)
@@ -65,12 +65,12 @@ typedef enum
 #if defined (__FEATURE_CHECK_SUPPORT__)
 #define check_feature_state() \
   do { \
-    int feature_ret = ml_tizen_get_feature_enabled (); \
+    int feature_ret = _ml_tizen_get_feature_enabled (); \
     if (ML_ERROR_NONE != feature_ret) \
       return feature_ret; \
   } while (0);
 
-#define set_feature_state(...) ml_tizen_set_feature_state(__VA_ARGS__)
+#define set_feature_state(...) _ml_tizen_set_feature_state(__VA_ARGS__)
 #else /* __FEATURE_CHECK_SUPPORT__ */
 #define check_feature_state()
 #define set_feature_state(...)
@@ -164,7 +164,7 @@ typedef struct {
 /**
  * @brief Macro to compare the tensors info.
  */
-#define ml_tensors_info_is_equal(i1,i2) ({bool e; (ml_tensors_info_compare ((i1), (i2), &e) == ML_ERROR_NONE && e);})
+#define ml_tensors_info_is_equal(i1,i2) ({bool e; (_ml_tensors_info_compare ((i1), (i2), &e) == ML_ERROR_NONE && e);})
 
 /**
  * @brief The function to be called when destroying the allocated handle.
@@ -204,7 +204,7 @@ typedef struct {
  * @brief Gets the byte size of the given tensor info.
  * @note This is not thread safe.
  */
-size_t ml_tensor_info_get_size (const ml_tensor_info_s *info);
+size_t _ml_tensor_info_get_size (const ml_tensor_info_s *info);
 
 /**
  * @brief Initializes the tensors information with default value.
@@ -214,14 +214,14 @@ size_t ml_tensor_info_get_size (const ml_tensor_info_s *info);
  * @retval #ML_ERROR_NONE Successful
  * @retval #ML_ERROR_INVALID_PARAMETER Given parameter is invalid.
  */
-int ml_tensors_info_initialize (ml_tensors_info_s *info);
+int _ml_tensors_info_initialize (ml_tensors_info_s *info);
 
 /**
  * @brief Frees and initialize the data in tensors info.
  * @since_tizen 5.5
  * @param[in] info The tensors info pointer to be freed.
  */
-void ml_tensors_info_free (ml_tensors_info_s *info);
+void _ml_tensors_info_free (ml_tensors_info_s *info);
 
 /**
  * @brief Creates a tensor data frame without allocating new buffer cloning the given tensors data.
@@ -233,7 +233,7 @@ void ml_tensors_info_free (ml_tensors_info_s *info);
  * @retval #ML_ERROR_INVALID_PARAMETER Given parameter is invalid.
  * @retval #ML_ERROR_OUT_OF_MEMORY Failed to allocate required memory.
  */
-int ml_tensors_data_clone_no_alloc (const ml_tensors_data_s * data_src, ml_tensors_data_h * data);
+int _ml_tensors_data_clone_no_alloc (const ml_tensors_data_s * data_src, ml_tensors_data_h * data);
 
 /**
  * @brief Replaces string.
@@ -246,7 +246,7 @@ int ml_tensors_data_clone_no_alloc (const ml_tensors_data_s * data_src, ml_tenso
  * @param[out] count The count of replaced. Set NULL if it is unnecessary.
  * @return Newly allocated string. The returned string should be freed with g_free().
  */
-gchar * ml_replace_string (gchar * source, const gchar * what, const gchar * to, const gchar * delimiters, guint * count);
+gchar * _ml_replace_string (gchar * source, const gchar * what, const gchar * to, const gchar * delimiters, guint * count);
 
 /**
  * @brief Compares the given tensors information.
@@ -260,7 +260,7 @@ gchar * ml_replace_string (gchar * source, const gchar * what, const gchar * to,
  * @retval #ML_ERROR_NOT_SUPPORTED Not supported.
  * @retval #ML_ERROR_INVALID_PARAMETER Given parameter is invalid.
  */
-int ml_tensors_info_compare (const ml_tensors_info_h info1, const ml_tensors_info_h info2, bool *equal);
+int _ml_tensors_info_compare (const ml_tensors_info_h info1, const ml_tensors_info_h info2, bool *equal);
 
 /**
  * @brief Frees the tensors data handle and its data.
@@ -268,7 +268,7 @@ int ml_tensors_info_compare (const ml_tensors_info_h info1, const ml_tensors_inf
  * @param[in] free_data The flag to free the buffers in handle.
  * @return @c 0 on success. Otherwise a negative error value.
  */
-int ml_tensors_data_destroy_internal (ml_tensors_data_h data, gboolean free_data);
+int _ml_tensors_data_destroy_internal (ml_tensors_data_h data, gboolean free_data);
 
 /**
  * @brief Creates a tensor data frame without buffer with the given tensors information.
@@ -277,20 +277,20 @@ int ml_tensors_data_destroy_internal (ml_tensors_data_h data, gboolean free_data
  * @param[out] data The handle of tensors data.
  * @return @c 0 on success. Otherwise a negative error value.
  */
-int ml_tensors_data_create_no_alloc (const ml_tensors_info_h info, ml_tensors_data_h *data);
+int _ml_tensors_data_create_no_alloc (const ml_tensors_info_h info, ml_tensors_data_h *data);
 
 #if defined (__TIZEN__)
 /****** TIZEN CHECK FEATURE BEGINS *****/
 /**
  * @brief Checks whether machine_learning.inference feature is enabled or not.
  */
-int ml_tizen_get_feature_enabled (void);
+int _ml_tizen_get_feature_enabled (void);
 
 /**
  * @brief Set the feature status of machine_learning.inference.
  * This is only used for Unit test.
  */
-int ml_tizen_set_feature_state (int state);
+int _ml_tizen_set_feature_state (int state);
 /****** TIZEN CHECK FEATURE ENDS *****/
 #endif /* __TIZEN__ */
 
index 8abe51e..9502134 100644 (file)
@@ -511,7 +511,7 @@ nns_parse_tensors_data (pipeline_info_s * pipe_info, JNIEnv * env,
       }
     }
 
-    status = ml_tensors_data_create_no_alloc (_info, data_h);
+    status = _ml_tensors_data_create_no_alloc (_info, data_h);
     if (_info != info_h)
       ml_tensors_info_destroy (_info);
 
@@ -718,7 +718,7 @@ nns_get_nnfw_type (jint fw_type, ml_nnfw_type_e * nnfw)
       return FALSE;
   }
 
-  return ml_nnfw_is_available (*nnfw, ML_NNFW_HW_ANY);
+  return _ml_nnfw_is_available (*nnfw, ML_NNFW_HW_ANY);
 }
 
 /**
@@ -743,7 +743,7 @@ nnstreamer_native_initialize (JNIEnv * env, jobject context)
       gst_android_init (env, context);
     } else {
 #else
-    if (ml_initialize_gstreamer () != ML_ERROR_NONE) {
+    if (_ml_initialize_gstreamer () != ML_ERROR_NONE) {
 #endif
       nns_loge ("Invalid params, cannot initialize GStreamer.");
       goto done;
index 2b16552..cc7622f 100644 (file)
@@ -58,7 +58,7 @@ nns_customfilter_priv_set_info (pipeline_info_s * pipe_info, JNIEnv * env,
       return FALSE;
     }
 
-    ml_tensors_info_free (priv->in_info);
+    _ml_tensors_info_free (priv->in_info);
     ml_tensors_info_clone (priv->in_info, in_info);
 
     if (priv->in_info_obj)
@@ -68,7 +68,7 @@ nns_customfilter_priv_set_info (pipeline_info_s * pipe_info, JNIEnv * env,
   }
 
   if (!ml_tensors_info_is_equal (out_info, priv->out_info)) {
-    ml_tensors_info_free (priv->out_info);
+    _ml_tensors_info_free (priv->out_info);
     ml_tensors_info_clone (priv->out_info, out_info);
   }
 
index b61eb5a..fc3a0ea 100644 (file)
@@ -128,7 +128,7 @@ nns_pipeline_sink_priv_set_out_info (element_data_s * item, JNIEnv * env,
     return FALSE;
   }
 
-  ml_tensors_info_free (priv->out_info);
+  _ml_tensors_info_free (priv->out_info);
   ml_tensors_info_clone (priv->out_info, out_info);
 
   if (priv->out_info_obj)
@@ -939,7 +939,7 @@ static jboolean
 nns_native_check_element_availability (JNIEnv * env, jclass clazz, jstring name)
 {
   const char *element_name = (*env)->GetStringUTFChars (env, name, NULL);
-  jboolean res = ml_element_is_available (element_name) ? JNI_TRUE : JNI_FALSE;
+  jboolean res = _ml_element_is_available (element_name) ? JNI_TRUE : JNI_FALSE;
 
   (*env)->ReleaseStringUTFChars (env, name, element_name);
   return res;
index 3181e5f..5c74314 100644 (file)
@@ -65,7 +65,7 @@ nns_singleshot_priv_set_info (pipeline_info_s * pipe_info, JNIEnv * env)
   }
 
   if (!ml_tensors_info_is_equal (in_info, priv->in_info)) {
-    ml_tensors_info_free (priv->in_info);
+    _ml_tensors_info_free (priv->in_info);
     ml_tensors_info_clone (priv->in_info, in_info);
   }
 
@@ -75,7 +75,7 @@ nns_singleshot_priv_set_info (pipeline_info_s * pipe_info, JNIEnv * env)
       goto done;
     }
 
-    ml_tensors_info_free (priv->out_info);
+    _ml_tensors_info_free (priv->out_info);
     ml_tensors_info_clone (priv->out_info, out_info);
 
     if (priv->out_info_obj)
index d7589c2..d5444ca 100644 (file)
@@ -1870,7 +1870,7 @@ TEST (nnstreamer_capi_util, plugin_availability_fail_invalid_01_n)
 {
   int status;
 
-  status = ml_check_plugin_availability (NULL, "tensor_filter");
+  status = _ml_check_plugin_availability (NULL, "tensor_filter");
   EXPECT_NE (status, ML_ERROR_NONE);
 }
 
@@ -1881,7 +1881,7 @@ TEST (nnstreamer_capi_util, plugin_availability_fail_invalid_02_n)
 {
   int status;
 
-  status = ml_check_plugin_availability (NULL, "tensor_filter");
+  status = _ml_check_plugin_availability (NULL, "tensor_filter");
   EXPECT_NE (status, ML_ERROR_NONE);
 }
 
@@ -2455,7 +2455,7 @@ TEST (nnstreamer_capi_util, info_create_1_n)
 TEST (nnstreamer_capi_util, info_create_2_n)
 {
   ml_tensors_info_h i;
-  int status = ml_tensors_info_create_from_gst (&i, nullptr);
+  int status = _ml_tensors_info_create_from_gst (&i, nullptr);
   ASSERT_EQ (status, ML_ERROR_INVALID_PARAMETER);
 }
 
@@ -2465,7 +2465,7 @@ TEST (nnstreamer_capi_util, info_create_2_n)
 TEST (nnstreamer_capi_util, info_create_3_n)
 {
   GstTensorsInfo gi;
-  int status = ml_tensors_info_create_from_gst (nullptr, &gi);
+  int status = _ml_tensors_info_create_from_gst (nullptr, &gi);
   ASSERT_EQ (status, ML_ERROR_INVALID_PARAMETER);
 }
 
@@ -2483,7 +2483,7 @@ TEST (nnstreamer_capi_util, info_destroy_n)
  */
 TEST (nnstreamer_capi_util, info_init_n)
 {
-  int status = ml_tensors_info_initialize (nullptr);
+  int status = _ml_tensors_info_initialize (nullptr);
   ASSERT_EQ (status, ML_ERROR_INVALID_PARAMETER);
 }
 
@@ -2537,7 +2537,7 @@ TEST (nnstreamer_capi_util, info_comp_01_n)
   ml_tensors_info_set_tensor_type (info, 0, ML_TENSOR_TYPE_UINT8);
   ml_tensors_info_set_tensor_dimension (info, 0, dim);
 
-  status = ml_tensors_info_compare (nullptr, info, &equal);
+  status = _ml_tensors_info_compare (nullptr, info, &equal);
   ASSERT_EQ (status, ML_ERROR_INVALID_PARAMETER);
 
   status = ml_tensors_info_destroy (info);
@@ -2562,7 +2562,7 @@ TEST (nnstreamer_capi_util, info_comp_02_n)
   ml_tensors_info_set_tensor_type (info, 0, ML_TENSOR_TYPE_UINT8);
   ml_tensors_info_set_tensor_dimension (info, 0, dim);
 
-  status = ml_tensors_info_compare (info, nullptr, &equal);
+  status = _ml_tensors_info_compare (info, nullptr, &equal);
   ASSERT_EQ (status, ML_ERROR_INVALID_PARAMETER);
 
   status = ml_tensors_info_destroy (info);
@@ -2592,7 +2592,7 @@ TEST (nnstreamer_capi_util, info_comp_03_n)
   ml_tensors_info_set_tensor_type (info2, 0, ML_TENSOR_TYPE_UINT8);
   ml_tensors_info_set_tensor_dimension (info2, 0, dim);
 
-  status = ml_tensors_info_compare (info1, info2, nullptr);
+  status = _ml_tensors_info_compare (info1, info2, nullptr);
   ASSERT_EQ (status, ML_ERROR_INVALID_PARAMETER);
 
   status = ml_tensors_info_destroy (info1);
@@ -2620,7 +2620,7 @@ TEST (nnstreamer_capi_util, info_comp_0)
   is = (ml_tensors_info_s *)info2;
   is->num_tensors = 2;
 
-  status = ml_tensors_info_compare (info1, info2, &equal);
+  status = _ml_tensors_info_compare (info1, info2, &equal);
   ASSERT_EQ (status, ML_ERROR_NONE);
   ASSERT_FALSE (equal);
 
@@ -3131,7 +3131,7 @@ TEST (nnstreamer_capi_util, data_create_internal_n)
 {
   int status;
 
-  status = ml_tensors_data_create_no_alloc (NULL, NULL);
+  status = _ml_tensors_data_create_no_alloc (NULL, NULL);
   EXPECT_NE (status, ML_ERROR_NONE);
 }
 
@@ -3396,16 +3396,16 @@ TEST (nnstreamer_capi_util, data_set_tdata_05_n)
  */
 TEST (nnstreamer_capi_util, nnfw_name_01_p)
 {
-  EXPECT_STREQ (ml_get_nnfw_subplugin_name (ML_NNFW_TYPE_TENSORFLOW_LITE), "tensorflow-lite");
-  EXPECT_EQ (ml_get_nnfw_type_by_subplugin_name ("tensorflow-lite"), ML_NNFW_TYPE_TENSORFLOW_LITE);
-  EXPECT_STREQ (ml_get_nnfw_subplugin_name (ML_NNFW_TYPE_TENSORFLOW), "tensorflow");
-  EXPECT_EQ (ml_get_nnfw_type_by_subplugin_name ("tensorflow"), ML_NNFW_TYPE_TENSORFLOW);
-  EXPECT_STREQ (ml_get_nnfw_subplugin_name (ML_NNFW_TYPE_NNFW), "nnfw");
-  EXPECT_EQ (ml_get_nnfw_type_by_subplugin_name ("nnfw"), ML_NNFW_TYPE_NNFW);
-  EXPECT_STREQ (ml_get_nnfw_subplugin_name (ML_NNFW_TYPE_VIVANTE), "vivante");
-  EXPECT_EQ (ml_get_nnfw_type_by_subplugin_name ("vivante"), ML_NNFW_TYPE_VIVANTE);
-  EXPECT_STREQ (ml_get_nnfw_subplugin_name (ML_NNFW_TYPE_SNAP), "snap");
-  EXPECT_EQ (ml_get_nnfw_type_by_subplugin_name ("snap"), ML_NNFW_TYPE_SNAP);
+  EXPECT_STREQ (_ml_get_nnfw_subplugin_name (ML_NNFW_TYPE_TENSORFLOW_LITE), "tensorflow-lite");
+  EXPECT_EQ (_ml_get_nnfw_type_by_subplugin_name ("tensorflow-lite"), ML_NNFW_TYPE_TENSORFLOW_LITE);
+  EXPECT_STREQ (_ml_get_nnfw_subplugin_name (ML_NNFW_TYPE_TENSORFLOW), "tensorflow");
+  EXPECT_EQ (_ml_get_nnfw_type_by_subplugin_name ("tensorflow"), ML_NNFW_TYPE_TENSORFLOW);
+  EXPECT_STREQ (_ml_get_nnfw_subplugin_name (ML_NNFW_TYPE_NNFW), "nnfw");
+  EXPECT_EQ (_ml_get_nnfw_type_by_subplugin_name ("nnfw"), ML_NNFW_TYPE_NNFW);
+  EXPECT_STREQ (_ml_get_nnfw_subplugin_name (ML_NNFW_TYPE_VIVANTE), "vivante");
+  EXPECT_EQ (_ml_get_nnfw_type_by_subplugin_name ("vivante"), ML_NNFW_TYPE_VIVANTE);
+  EXPECT_STREQ (_ml_get_nnfw_subplugin_name (ML_NNFW_TYPE_SNAP), "snap");
+  EXPECT_EQ (_ml_get_nnfw_type_by_subplugin_name ("snap"), ML_NNFW_TYPE_SNAP);
 }
 
 /**
@@ -3414,8 +3414,8 @@ TEST (nnstreamer_capi_util, nnfw_name_01_p)
  */
 TEST (nnstreamer_capi_util, nnfw_name_02_n)
 {
-  EXPECT_EQ (ml_get_nnfw_type_by_subplugin_name ("invalid-fw"), ML_NNFW_TYPE_ANY);
-  EXPECT_EQ (ml_get_nnfw_type_by_subplugin_name (NULL), ML_NNFW_TYPE_ANY);
+  EXPECT_EQ (_ml_get_nnfw_type_by_subplugin_name ("invalid-fw"), ML_NNFW_TYPE_ANY);
+  EXPECT_EQ (_ml_get_nnfw_type_by_subplugin_name (NULL), ML_NNFW_TYPE_ANY);
 }
 
 /**
@@ -3515,7 +3515,7 @@ TEST (nnstreamer_capi_singleshot, invoke_invalid_param_02_n)
   ml_tensors_info_set_tensor_dimension (in_info, 0, in_dim);
 
   /* handle null data */
-  status = ml_tensors_data_create_no_alloc (in_info, &input);
+  status = _ml_tensors_data_create_no_alloc (in_info, &input);
   EXPECT_EQ (status, ML_ERROR_NONE);
 
   status = ml_single_invoke (single, input, &output);
@@ -9632,7 +9632,7 @@ TEST (nnstreamer_capi_element, scenario_02_p)
 }
 
 /**
- * @brief Test for internal function 'ml_tensors_info_copy_from_gst'.
+ * @brief Test for internal function '_ml_tensors_info_copy_from_gst'.
  */
 TEST (nnstreamer_capi_internal, copy_from_gst)
 {
@@ -9655,7 +9655,7 @@ TEST (nnstreamer_capi_internal, copy_from_gst)
   status = ml_tensors_info_create (&ml_info);
   EXPECT_EQ (status, ML_ERROR_NONE);
 
-  ml_tensors_info_copy_from_gst ((ml_tensors_info_s *)ml_info, &gst_info);
+  _ml_tensors_info_copy_from_gst ((ml_tensors_info_s *)ml_info, &gst_info);
   status = ml_tensors_info_get_count (ml_info, &count);
   EXPECT_EQ (status, ML_ERROR_NONE);
   EXPECT_EQ (count, 2U);
@@ -9668,7 +9668,7 @@ TEST (nnstreamer_capi_internal, copy_from_gst)
 
   gst_info.info[0].type = _NNS_INT32;
   gst_info.info[1].type = _NNS_UINT32;
-  ml_tensors_info_copy_from_gst ((ml_tensors_info_s *)ml_info, &gst_info);
+  _ml_tensors_info_copy_from_gst ((ml_tensors_info_s *)ml_info, &gst_info);
   status = ml_tensors_info_get_tensor_type (ml_info, 0, &type);
   EXPECT_EQ (status, ML_ERROR_NONE);
   EXPECT_EQ (type, ML_TENSOR_TYPE_INT32);
@@ -9678,7 +9678,7 @@ TEST (nnstreamer_capi_internal, copy_from_gst)
 
   gst_info.info[0].type = _NNS_INT16;
   gst_info.info[1].type = _NNS_UINT16;
-  ml_tensors_info_copy_from_gst ((ml_tensors_info_s *)ml_info, &gst_info);
+  _ml_tensors_info_copy_from_gst ((ml_tensors_info_s *)ml_info, &gst_info);
   status = ml_tensors_info_get_tensor_type (ml_info, 0, &type);
   EXPECT_EQ (status, ML_ERROR_NONE);
   EXPECT_EQ (type, ML_TENSOR_TYPE_INT16);
@@ -9688,7 +9688,7 @@ TEST (nnstreamer_capi_internal, copy_from_gst)
 
   gst_info.info[0].type = _NNS_INT8;
   gst_info.info[1].type = _NNS_UINT8;
-  ml_tensors_info_copy_from_gst ((ml_tensors_info_s *)ml_info, &gst_info);
+  _ml_tensors_info_copy_from_gst ((ml_tensors_info_s *)ml_info, &gst_info);
   status = ml_tensors_info_get_tensor_type (ml_info, 0, &type);
   EXPECT_EQ (status, ML_ERROR_NONE);
   EXPECT_EQ (type, ML_TENSOR_TYPE_INT8);
@@ -9698,7 +9698,7 @@ TEST (nnstreamer_capi_internal, copy_from_gst)
 
   gst_info.info[0].type = _NNS_INT64;
   gst_info.info[1].type = _NNS_UINT64;
-  ml_tensors_info_copy_from_gst ((ml_tensors_info_s *)ml_info, &gst_info);
+  _ml_tensors_info_copy_from_gst ((ml_tensors_info_s *)ml_info, &gst_info);
   status = ml_tensors_info_get_tensor_type (ml_info, 0, &type);
   EXPECT_EQ (status, ML_ERROR_NONE);
   EXPECT_EQ (type, ML_TENSOR_TYPE_INT64);
@@ -9708,7 +9708,7 @@ TEST (nnstreamer_capi_internal, copy_from_gst)
 
   gst_info.info[0].type = _NNS_FLOAT64;
   gst_info.info[1].type = _NNS_FLOAT32;
-  ml_tensors_info_copy_from_gst ((ml_tensors_info_s *)ml_info, &gst_info);
+  _ml_tensors_info_copy_from_gst ((ml_tensors_info_s *)ml_info, &gst_info);
   status = ml_tensors_info_get_tensor_type (ml_info, 0, &type);
   EXPECT_EQ (status, ML_ERROR_NONE);
   EXPECT_EQ (type, ML_TENSOR_TYPE_FLOAT64);
@@ -9718,7 +9718,7 @@ TEST (nnstreamer_capi_internal, copy_from_gst)
 
   gst_info.info[0].name = g_strdup ("tn1");
   gst_info.info[1].name = g_strdup ("tn2");
-  ml_tensors_info_copy_from_gst ((ml_tensors_info_s *)ml_info, &gst_info);
+  _ml_tensors_info_copy_from_gst ((ml_tensors_info_s *)ml_info, &gst_info);
   status = ml_tensors_info_get_tensor_name (ml_info, 0, &name);
   EXPECT_EQ (status, ML_ERROR_NONE);
   EXPECT_STREQ (name, "tn1");
@@ -9735,7 +9735,7 @@ TEST (nnstreamer_capi_internal, copy_from_gst)
 }
 
 /**
- * @brief Test for internal function 'ml_tensors_info_copy_from_ml'.
+ * @brief Test for internal function '_ml_tensors_info_copy_from_ml'.
  */
 TEST (nnstreamer_capi_internal, copy_from_ml)
 {
@@ -9755,7 +9755,7 @@ TEST (nnstreamer_capi_internal, copy_from_ml)
   status = ml_tensors_info_set_tensor_dimension (ml_info, 1, dim);
   EXPECT_EQ (status, ML_ERROR_NONE);
 
-  ml_tensors_info_copy_from_ml (&gst_info, (ml_tensors_info_s *)ml_info);
+  _ml_tensors_info_copy_from_ml (&gst_info, (ml_tensors_info_s *)ml_info);
   EXPECT_EQ (gst_info.num_tensors, 2U);
   EXPECT_EQ (gst_info.info[0].dimension[0], 1U);
   EXPECT_EQ (gst_info.info[0].dimension[1], 2U);
@@ -9766,7 +9766,7 @@ TEST (nnstreamer_capi_internal, copy_from_ml)
   EXPECT_EQ (status, ML_ERROR_NONE);
   status = ml_tensors_info_set_tensor_type (ml_info, 1, ML_TENSOR_TYPE_UINT32);
   EXPECT_EQ (status, ML_ERROR_NONE);
-  ml_tensors_info_copy_from_ml (&gst_info, (ml_tensors_info_s *)ml_info);
+  _ml_tensors_info_copy_from_ml (&gst_info, (ml_tensors_info_s *)ml_info);
   EXPECT_EQ (gst_info.info[0].type, _NNS_INT32);
   EXPECT_EQ (gst_info.info[1].type, _NNS_UINT32);
 
@@ -9774,7 +9774,7 @@ TEST (nnstreamer_capi_internal, copy_from_ml)
   EXPECT_EQ (status, ML_ERROR_NONE);
   status = ml_tensors_info_set_tensor_type (ml_info, 1, ML_TENSOR_TYPE_UINT16);
   EXPECT_EQ (status, ML_ERROR_NONE);
-  ml_tensors_info_copy_from_ml (&gst_info, (ml_tensors_info_s *)ml_info);
+  _ml_tensors_info_copy_from_ml (&gst_info, (ml_tensors_info_s *)ml_info);
   EXPECT_EQ (gst_info.info[0].type, _NNS_INT16);
   EXPECT_EQ (gst_info.info[1].type, _NNS_UINT16);
 
@@ -9782,7 +9782,7 @@ TEST (nnstreamer_capi_internal, copy_from_ml)
   EXPECT_EQ (status, ML_ERROR_NONE);
   status = ml_tensors_info_set_tensor_type (ml_info, 1, ML_TENSOR_TYPE_UINT8);
   EXPECT_EQ (status, ML_ERROR_NONE);
-  ml_tensors_info_copy_from_ml (&gst_info, (ml_tensors_info_s *)ml_info);
+  _ml_tensors_info_copy_from_ml (&gst_info, (ml_tensors_info_s *)ml_info);
   EXPECT_EQ (gst_info.info[0].type, _NNS_INT8);
   EXPECT_EQ (gst_info.info[1].type, _NNS_UINT8);
 
@@ -9790,7 +9790,7 @@ TEST (nnstreamer_capi_internal, copy_from_ml)
   EXPECT_EQ (status, ML_ERROR_NONE);
   status = ml_tensors_info_set_tensor_type (ml_info, 1, ML_TENSOR_TYPE_UINT64);
   EXPECT_EQ (status, ML_ERROR_NONE);
-  ml_tensors_info_copy_from_ml (&gst_info, (ml_tensors_info_s *)ml_info);
+  _ml_tensors_info_copy_from_ml (&gst_info, (ml_tensors_info_s *)ml_info);
   EXPECT_EQ (gst_info.info[0].type, _NNS_INT64);
   EXPECT_EQ (gst_info.info[1].type, _NNS_UINT64);
 
@@ -9798,7 +9798,7 @@ TEST (nnstreamer_capi_internal, copy_from_ml)
   EXPECT_EQ (status, ML_ERROR_NONE);
   status = ml_tensors_info_set_tensor_type (ml_info, 1, ML_TENSOR_TYPE_FLOAT32);
   EXPECT_EQ (status, ML_ERROR_NONE);
-  ml_tensors_info_copy_from_ml (&gst_info, (ml_tensors_info_s *)ml_info);
+  _ml_tensors_info_copy_from_ml (&gst_info, (ml_tensors_info_s *)ml_info);
   EXPECT_EQ (gst_info.info[0].type, _NNS_FLOAT64);
   EXPECT_EQ (gst_info.info[1].type, _NNS_FLOAT32);
 
@@ -9806,7 +9806,7 @@ TEST (nnstreamer_capi_internal, copy_from_ml)
   EXPECT_EQ (status, ML_ERROR_NONE);
   status = ml_tensors_info_set_tensor_name (ml_info, 1, "tn2");
   EXPECT_EQ (status, ML_ERROR_NONE);
-  ml_tensors_info_copy_from_ml (&gst_info, (ml_tensors_info_s *)ml_info);
+  _ml_tensors_info_copy_from_ml (&gst_info, (ml_tensors_info_s *)ml_info);
   EXPECT_STREQ (gst_info.info[0].name, "tn1");
   EXPECT_STREQ (gst_info.info[1].name, "tn2");
 
@@ -9817,7 +9817,7 @@ TEST (nnstreamer_capi_internal, copy_from_ml)
 }
 
 /**
- * @brief Test for internal function 'ml_validate_model_file'.
+ * @brief Test for internal function '_ml_validate_model_file'.
  * @detail Invalid params.
  */
 TEST (nnstreamer_capi_internal, validate_model_file_01_n)
@@ -9839,13 +9839,13 @@ TEST (nnstreamer_capi_internal, validate_model_file_01_n)
     goto skip_test;
   }
 
-  status = ml_validate_model_file (NULL, 1, &nnfw);
+  status = _ml_validate_model_file (NULL, 1, &nnfw);
   EXPECT_NE (status, ML_ERROR_NONE);
 
-  status = ml_validate_model_file (&test_model, 0, &nnfw);
+  status = _ml_validate_model_file (&test_model, 0, &nnfw);
   EXPECT_NE (status, ML_ERROR_NONE);
 
-  status = ml_validate_model_file (&test_model, 1, NULL);
+  status = _ml_validate_model_file (&test_model, 1, NULL);
   EXPECT_NE (status, ML_ERROR_NONE);
 
 skip_test:
@@ -9854,7 +9854,7 @@ skip_test:
 }
 
 /**
- * @brief Test for internal function 'ml_validate_model_file'.
+ * @brief Test for internal function '_ml_validate_model_file'.
  * @detail Invalid file extension.
  */
 TEST (nnstreamer_capi_internal, validate_model_file_02_n)
@@ -9891,41 +9891,41 @@ TEST (nnstreamer_capi_internal, validate_model_file_02_n)
   test_models[1] = test_model2;
 
   nnfw = ML_NNFW_TYPE_CUSTOM_FILTER;
-  status = ml_validate_model_file (&test_model2, 1, &nnfw);
+  status = _ml_validate_model_file (&test_model2, 1, &nnfw);
   EXPECT_NE (status, ML_ERROR_NONE);
 
   nnfw = ML_NNFW_TYPE_TENSORFLOW_LITE;
-  status = ml_validate_model_file (&test_model1, 1, &nnfw);
+  status = _ml_validate_model_file (&test_model1, 1, &nnfw);
   EXPECT_NE (status, ML_ERROR_NONE);
 
   nnfw = ML_NNFW_TYPE_TENSORFLOW;
-  status = ml_validate_model_file (&test_model2, 1, &nnfw);
+  status = _ml_validate_model_file (&test_model2, 1, &nnfw);
   EXPECT_NE (status, ML_ERROR_NONE);
 
   /* snap only for android */
   nnfw = ML_NNFW_TYPE_SNAP;
-  status = ml_validate_model_file (&test_model1, 1, &nnfw);
+  status = _ml_validate_model_file (&test_model1, 1, &nnfw);
   EXPECT_NE (status, ML_ERROR_NONE);
 
   nnfw = ML_NNFW_TYPE_VIVANTE;
-  status = ml_validate_model_file (test_models, 1, &nnfw);
+  status = _ml_validate_model_file (test_models, 1, &nnfw);
   EXPECT_NE (status, ML_ERROR_NONE);
 
   /** @todo currently mvnc, openvino and edgetpu always return failure */
   nnfw = ML_NNFW_TYPE_MVNC;
-  status = ml_validate_model_file (&test_model1, 1, &nnfw);
+  status = _ml_validate_model_file (&test_model1, 1, &nnfw);
   EXPECT_NE (status, ML_ERROR_NONE);
 
   nnfw = ML_NNFW_TYPE_OPENVINO;
-  status = ml_validate_model_file (&test_model1, 1, &nnfw);
+  status = _ml_validate_model_file (&test_model1, 1, &nnfw);
   EXPECT_NE (status, ML_ERROR_NONE);
 
   nnfw = ML_NNFW_TYPE_EDGE_TPU;
-  status = ml_validate_model_file (&test_model1, 1, &nnfw);
+  status = _ml_validate_model_file (&test_model1, 1, &nnfw);
   EXPECT_NE (status, ML_ERROR_NONE);
 
   nnfw = ML_NNFW_TYPE_ARMNN;
-  status = ml_validate_model_file (&test_model1, 1, &nnfw);
+  status = _ml_validate_model_file (&test_model1, 1, &nnfw);
   EXPECT_NE (status, ML_ERROR_NONE);
 
 skip_test:
@@ -9935,7 +9935,7 @@ skip_test:
 }
 
 /**
- * @brief Test for internal function 'ml_validate_model_file'.
+ * @brief Test for internal function '_ml_validate_model_file'.
  * @detail Invalid model path.
  */
 TEST (nnstreamer_capi_internal, validate_model_file_03_n)
@@ -9956,21 +9956,21 @@ TEST (nnstreamer_capi_internal, validate_model_file_03_n)
   test_dir2 = g_build_filename (test_dir1, "invaliddir", NULL);
 
   nnfw = ML_NNFW_TYPE_TENSORFLOW_LITE;
-  status = ml_validate_model_file (&test_dir1, 1, &nnfw);
+  status = _ml_validate_model_file (&test_dir1, 1, &nnfw);
   EXPECT_NE (status, ML_ERROR_NONE);
 
   nnfw = ML_NNFW_TYPE_TENSORFLOW;
-  status = ml_validate_model_file (&test_dir1, 1, &nnfw);
+  status = _ml_validate_model_file (&test_dir1, 1, &nnfw);
   EXPECT_NE (status, ML_ERROR_NONE);
 
   nnfw = ML_NNFW_TYPE_NNFW;
-  status = ml_validate_model_file (&test_dir2, 1, &nnfw);
+  status = _ml_validate_model_file (&test_dir2, 1, &nnfw);
   EXPECT_NE (status, ML_ERROR_NONE);
 
 #ifdef ENABLE_NNFW_RUNTIME
   /* only NNFW supports dir path */
   nnfw = ML_NNFW_TYPE_NNFW;
-  status = ml_validate_model_file (&test_dir1, 1, &nnfw);
+  status = _ml_validate_model_file (&test_dir1, 1, &nnfw);
   EXPECT_EQ (status, ML_ERROR_NONE);
 #endif