} NNStreamerExternalConverter;
/**
+ * @brief Find converter sub-plugin with the name.
+ * @param[in] name The name of converter sub-plugin.
+ * @return NNStreamerExternalConverter if subplugin is found.
+ * NULL if not found or the sub-plugin object has an error.
+ */
+extern const NNStreamerExternalConverter *
+nnstreamer_converter_find (const char *name);
+
+/**
* @brief Converter's sub-plugin should call this function to register itself.
* @param[in] ex Converter sub-plugin to be registered.
* @return TRUE if registered. FALSE is failed or duplicated.
/* append sub-plugin template caps */
total = nnsconf_get_subplugin_info (NNSCONF_PATH_CONVERTERS, &info);
for (i = 0; i < total; i++) {
- ex = get_subplugin (NNS_SUBPLUGIN_CONVERTER, info.names[i]);
+ ex = nnstreamer_converter_find (info.names[i]);
if (ex && ex->query_caps)
gst_caps_append (pad_caps, ex->query_caps (NULL));
}
}
/**
+ * @brief Find converter sub-plugin with the name.
+ * @param[in] name The name of converter sub-plugin.
+ * @return NULL if not found or the sub-plugin object has an error.
+ */
+const NNStreamerExternalConverter *
+nnstreamer_converter_find (const char *name)
+{
+ return get_subplugin (NNS_SUBPLUGIN_CONVERTER, name);
+}
+
+/**
* @brief Converter's external subplugins should call this at init.
*/
int
total = nnsconf_get_subplugin_info (NNSCONF_PATH_CONVERTERS, &info);
for (i = 0; i < total; i++) {
- ex = get_subplugin (NNS_SUBPLUGIN_CONVERTER, info.names[i]);
+ ex = nnstreamer_converter_find (info.names[i]);
if (ex && ex->query_caps) {
caps = ex->query_caps (NULL);