Subject: Re: [linux-audio-dev] LADSPA extension proposal (quick action wanted)
From: Paul Davis (pbd_AT_Op.Net)
Date: Fri Dec 07 2001 - 16:01:19 EET
>to do a specialized GUI for a single LADSPA plugin, he can just have
>that communicate through the CORBA interface (which you may want to
>hide in a little wrapper library to avoid too much confusion amongst
>the plugin developers).
precisely. thats what the lcp "wrapper" is for. the plugin developer
should not have to learn about CORBA (or Unix domain sockets or inet
sockets or ...)
as to what's actually inside the LADSPA Control Protocol implementation:
> typedef struct __ladspa_control_protocol_client lcp_client_t;
>
> lcp_client_t *lcp_open (pid_t pid);
> int lcp_close (lcp_client_t *client);
> int lcp_write (lcp_client_t *client,
> unsigned long plugin,
> unsigned long port,
> LADSPA_Data value);
> int lcp_read (lcp_client_t *client,
> unsigned long plugin,
> unsigned long port,
> LADSPA_Data *value);
well, thats sort of irrelevant, right? as it happens, i agree with
steve that using CORBA to pass int+float around is overkill, but there
is nothing to stop us from switching the internal implementation to
CORBA if that ended up being useful.
however, even CORBA does not help with the issue of "naming". do you
have any thoughts on the correct argument type to lcp_open()? there
are, as i mentioned, 2 scenarios:
1) host fork/execs the GUI process, passes it a cmdline argument
for the argument to lcp_open and a UID of some kind for the
plugin it will control. since the GUI is necessarily on the
same host, use pid_t will work just fine.
2) user or other program fork/execs the GUI process, passing
it a cmdline argument to point it at the desired LADSPA host.
I don't really see (2) being very common, but given our technical+unix
orientation, it seems that many people would want it catered to. Or
perhaps not. I don't know.
Anyway, my best guess so far has been this:
lcp_open (const char *name);
if (strchr (name, '/')) {
... unix domain socket like /tmp/lcp/<pid>
} else if (strchr (name, ':') {
... inet domain socket like host.domain:port
} else {
... malformed name ...
}
how does that seem ?
--p
This archive was generated by hypermail 2b28 : Fri Dec 07 2001 - 16:00:32 EET