int ml_check_nnfw_availability (ml_nnfw_type_e nnfw, ml_nnfw_hw_e hw, bool *available);
/**
+ * @brief Checks the availability of the given execution environments with custom option.
+ * @details If the function returns an error, @a available may not be changed.
+ * @since_tizen 6.5
+ * @param[in] nnfw Check if the nnfw is available in the system.
+ * Set #ML_NNFW_TYPE_ANY to skip checking nnfw.
+ * @param[in] hw Check if the hardware is available in the system.
+ * Set #ML_NNFW_HW_ANY to skip checking hardware.
+ * @param[in] custom_option Custom option string to check framework and hardware.
+ * If an nnstreamer filter plugin needs to handle detailed option for hardware detection, use this parameter.
+ * @param[out] available @c true if it's available, @c false if it's not available.
+ * @return @c 0 on success. Otherwise a negative error value.
+ * @retval #ML_ERROR_NONE Successful and the environments are available.
+ * @retval #ML_ERROR_NOT_SUPPORTED Not supported.
+ * @retval #ML_ERROR_INVALID_PARAMETER Given parameter is invalid.
+ */
+int ml_check_nnfw_availability_full (ml_nnfw_type_e nnfw, ml_nnfw_hw_e hw, const char *custom_option, bool *available);
+
+/**
* @brief Checks if the element is registered and available on the pipeline.
* @details If the function returns an error, @a available may not be changed.
* @since_tizen 6.5
}
/**
- * @brief Checks the availability of the given execution environments.
+ * @brief Checks the availability of the given execution environments with custom option.
*/
int
-ml_check_nnfw_availability (ml_nnfw_type_e nnfw, ml_nnfw_hw_e hw,
- bool *available)
+ml_check_nnfw_availability_full (ml_nnfw_type_e nnfw, ml_nnfw_hw_e hw,
+ const char *custom, bool *available)
{
const char *fw_name = NULL;
if (nnstreamer_filter_find (fw_name) != NULL) {
accl_hw accl = ml_nnfw_to_accl_hw (hw);
- if (gst_tensor_filter_check_hw_availability (fw_name, accl)) {
+ if (gst_tensor_filter_check_hw_availability (fw_name, accl, custom)) {
*available = true;
} else {
ml_logw ("%s is supported but not with the specified hardware.",
}
/**
+ * @brief Checks the availability of the given execution environments.
+ */
+int
+ml_check_nnfw_availability (ml_nnfw_type_e nnfw, ml_nnfw_hw_e hw,
+ bool *available)
+{
+ return ml_check_nnfw_availability_full (nnfw, hw, NULL, available);
+}
+
+/**
* @brief Checks the element is registered and available on the pipeline.
*/
int