[gmpi] Re: lost-n-found #3 parameter stuff

  • From: Tim Hockin <thockin@xxxxxxxxxx>
  • To: gmpi@xxxxxxxxxxxxx
  • Date: Thu, 21 Oct 2004 10:50:47 -0700

On Thu, Oct 21, 2004 at 10:52:46AM +0100, Steve Harris wrote:
> > What 4 lines of code does it save in plugins?  It would merely be a hint
> > to hosts that IF THEY CARE, they can know that the file referenced by a
> > filename parameter can be bundled with a project.
> 
> OK, in that case /definatly/ dont do it. Stementes like "if they care"
> w.r.t things that can have a significant effect are not a good idea IHMO.
> This implies that the plugin has no idea wether the host will be bundling
> source files or not, and so has no idea wether it should be.
>
> The 4 lines it could have saved if it was compulsory would be the plugin
> dumping the file to the session directory itsself.

I'm still not agreeing, with this.  Not all hosts have the concept of a
'project dir' or a 'bundle'.  Some hosts do.  Some hosts have a dir with
all the project-related files.  Some hosts keep a .zip of all the project
files.

You CAN'T have the plugin do this by itself.  It is, by definition, a
host-specific function.

> > My advocacy for this stems from frustration with plugins which use
> > external files.  If I transport the project to a different system, say my
> > laptop, the plugins don't find the files unless they are in exactly the
> > same path.
> 
> Sure, that sucks, but this isn't a soltution because it requires the host
> to do the storage (which si a bit hit and miss) and for it to rewrite the
> plugins input values to reflect the new locations. As its not guaranteed
> behaviour of the  host the plugin cant rely on it and it will have to work
> around the case when the host doesnt do it. Messy.

Well, hosts that *DO* bundling will get it right.  Hosts that don't do
bundling will behave just like they do today.  And you get this in
exchange for a plugin setting one flag on a parameter.

If the plugin sets that flag on a parameter AND the host supports a
bundle-save operation or project-local storage, it can bundle the file
(copy, zip, whatever) and change the parameter.  Henceforth the file is
project-local.  If you change the filename parameter to a new file, the
host can dump the local file in favor of the new one.

> Just provide a directory to the plugin where it can store its state and let
> it do it itsself.

Why not just have a stateful output parameter that provides the plugin's
internal state of the file (e.g. raw PCM data, etc)?  I think that plugins
that WANT to do this can, but it is far simpler for plugins just to flag a
file as local, so the host has a CHANCE of getting it right.

Again, hosts that try to get it right today (bundling) fail to get it
right (in my experience).  Hosts that don't try also do not get it right.
We can at least improve that for hosts that DO try.


----------------------------------------------------------------------
Generalized Music Plugin Interface (GMPI) public discussion list
Participation in this list is contingent upon your abiding by the
following rules:  Please stay on topic.  You are responsible for your own
words.  Please respect your fellow subscribers.  Please do not
redistribute anyone else's words without their permission.

Archive: //www.freelists.org/archives/gmpi
Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe

Other related posts: