#include "nnstreamer-single.h"
#include "nnstreamer-capi-private.h"
#include "nnstreamer_plugin_api.h"
+#include "nnstreamer_conf.h"
#undef ML_SINGLE_SUPPORT_TIMEOUT
#if (GST_VERSION_MAJOR > 1 || (GST_VERSION_MAJOR == 1 && GST_VERSION_MINOR >= 10))
}
}
+ if (!model || !g_file_test (model, G_FILE_TEST_IS_REGULAR)) {
+ ml_loge ("The given param, model path [%s] is invalid.",
+ GST_STR_NULL (model));
+ return ML_ERROR_INVALID_PARAMETER;
+ }
+
/* 1. Determine nnfw */
/* Check file extention. */
path_down = g_ascii_strdown (model, -1);
}
break;
case ML_NNFW_TYPE_CUSTOM_FILTER:
- if (!g_str_has_suffix (path_down, ".so")) {
+ if (!g_str_has_suffix (path_down, NNSTREAMER_SO_FILE_EXTENSION)) {
ml_loge ("The given model [%s] has invalid extension.", model);
status = ML_ERROR_INVALID_PARAMETER;
}
if (status != ML_ERROR_NONE)
return status;
- if (!g_file_test (model, G_FILE_TEST_IS_REGULAR)) {
- ml_loge ("The given param, model path [%s] is invalid.",
- GST_STR_NULL (model));
- return ML_ERROR_INVALID_PARAMETER;
- }
-
/* 2. Determine hw */
/** @todo Now the param hw is ignored. (Supposed CPU only) Support others later. */
status = ml_check_nnfw_availability (nnfw, hw, &available);