On Tue, 23 May 2000, David Benson wrote:

> > Well, with this proposed scheme you would be unable to provide host
> > specific additions to the plugins/structure. With XML we could define
> > a standard base and let hosts provide additional information. I think
> > the XML approach is more flexible than just another C-API.
> > 
> > Richard.
> 
> i think pbd was saying we ought to have both,
> and what the hell, we all *will* need a c-api to it.
> 
> and i'm not sure we'll all agree on gnome-xml (is that what you meant?).
> of course, the best alternate (expat) is a sax-parser so it's
> more annoying ...
> 
> the api should make the choice equivalent.
> (omitting the provite data the api would look something
> like this...)
> 
> here's roughly the .h file i've been considering.
> 
> struct _LadspaControlData {
>   char*              control_name;
>   unsigned           input : 1;
>   unsigned           output : 1;
>   unsigned           control : 1;
>   unsigned           audio : 1;
> };

See? This is limiting - it does not match the GLAME way of life. Obviously
I like to use the proposed Plugin Catalog scheme not only for LADSPA
plugins but for host specific plugins, too. So there needs to be a common
specified _head_ of such a Catalog Data entry:
 
> struct _LadspaData {
>   char*              plugin_name;
>   char*              author;
>   char*              copyright;
>   int                num_controls;
>   LadspaControlData* controls;
> };

struct _CatalogData {
        char *name, *author, *copyright;
        int type;
        void *host_specific;
}

Where type denotes LADSPA/GLAME/etc. (of course we need to coordinate
the numbers)

And the LADSPA/GLAME specific data goes into a specific structure.

> LadspaDatabase*   ladspa_database_new             (const char*     fname);
> LadspaData*       ladspa_plugin_data_find         (LadspaDatabase* db,
>                                                    const char*     name);
> LadspaData*       ladspa_plugin_data_find_by_id   (LadspaDatabase* db,
>                                                    unsigned long   unique_id);
> 
> /* user-defined key => string maps. */
> const char*       ladspa_plugin_data_get_named_key(LadspaData*     data,
>                                                    const char*     key);
> 
> /* user-defined key => xmltree maps. */
> const xmlNode*    ladspa_plugin_data_get_subtree  (LadspaData*     data,
>                                                    const char*     key);
> 
> void              ladspa_database_destroy         (LadspaDatabase* database);

Thats ok as long as the actual XML format gets defined and one can use
it without fearing that it may change but not the C-API.

> 
> 
> 
> i can implement this in glib + gnome-xml in like 15minutes,
> is this the right api?

No, see above. Its just too special, I dont think the catalog needs
to be tied to LADSPA in any way (other than having special infos
for LADSPA plugins).

> - dave
> 

Richard.

--
Richard Guenther <[EMAIL PROTECTED]>
WWW: http://www.anatom.uni-tuebingen.de/~richi/
The GLAME Project: http://www.glame.de/

Reply via email to