diff --git a/src/lib/plugin.c b/src/lib/plugin.c index 4005bb204..062e266b5 100644 --- a/src/lib/plugin.c +++ b/src/lib/plugin.c @@ -100,6 +100,10 @@ cinelerra_plugin_name_cmp (const void* a, const void* b) return strcmp (((struct cinelerra_plugin*) a)->name, ((struct cinelerra_plugin*) b)->name); } +/** + * Initialize the plugin system. + * always succeeds or aborts + */ void cinelerra_init_plugin (void) { @@ -149,6 +153,16 @@ cinelerra_plugin_lookup (struct cinelerra_plugin* self, const char* path) return -1; /* plugin not found */ } + +/** + * Make an interface available. + * To use an interface provided by a plugin it must be opened first. It is allowed to open an interface more than once. + * Each open must be paired with a close. + * @param plugin name of the plugin to use. + * @param name name of the interface to open. + * @param min_revision the size of the interface structure is used as measure of a minimal required revision (new functions are appended at the end) + * @return handle to the interface or NULL in case of a error. The application shall cast this handle to the actual interface type. + */ struct cinelerra_interface* cinelerra_interface_open (const char* name, const char* interface, size_t min_revision) { @@ -277,6 +291,11 @@ cinelerra_interface_open (const char* name, const char* interface, size_t min_re return NULL; } +/** + * Close an interface. Does not free associated resources + * Calling this function with self==NULL is legal. Every interface handle must be closed only once. + * @param self interface to be closed + */ void cinelerra_interface_close (void* ptr) { diff --git a/src/lib/plugin.h b/src/lib/plugin.h index b787870d2..a710c8285 100644 --- a/src/lib/plugin.h +++ b/src/lib/plugin.h @@ -90,32 +90,14 @@ struct cinelerra_interface int (*close)(void); }; -/** - * Initialize the plugin system. - * always succeeds or aborts - */ void cinelerra_init_plugin (void); -/** - * Make an interface available. - * To use an interface provided by a plugin it must be opened first. It is allowed to open an interface more than once. - * Each open must be paired with a close. - * @param plugin name of the plugin to use. - * @param name name of the interface to open. - * @param min_revision the size of the interface structure is used as measure of a minimal required revision (new functions are appended at the end) - * @return handle to the interface or NULL in case of a error. The application shall cast this handle to the actual interface type. - */ struct cinelerra_interface* cinelerra_interface_open (const char* plugin, const char* name, size_t min_revision); -/** - * Close an interface. Does not free associated resources - * Calling this function with self==NULL is legal. Every interface handle must be closed only once. - * @param self interface to be closed - */ void cinelerra_interface_close (void* self);