From: Dennis S. <sy...@yo...> - 2004-09-28 17:34:28
|
Heya, I'd (finally) like to implement the plugin flag stuff. On the list I now have: VISUAL_PLUGIN_FLAG_NOT_REENTRANT (some plugins, like alsa could use the singleton design pattern to solve this, not sure about this tho) VISUAL_PLUGIN_FLAG_SPECIAL (flag for plugins like gdkpixbuf, plugins that have a special function which shouldn't be used in for example, amarok or the xmms plugin) More suggestions ? Cheers, Dennis |
From: Vitaly V. B. <vit...@us...> - 2004-09-28 19:19:18
|
On Tue, 28 Sep 2004 19:34:19 +0200 Dennis Smit <sy...@yo...> wrote: > I'd (finally) like to implement the plugin flag stuff. > > On the list I now have: > > VISUAL_PLUGIN_FLAG_NOT_REENTRANT (some plugins, like alsa could > use the singleton design pattern > to solve this, not sure about > this tho) > > VISUAL_PLUGIN_FLAG_SPECIAL (flag for plugins like > gdkpixbuf, plugins that > have a special function > which shouldn't be used > in for example, amarok > or the xmms plugin) Looks good :) > More suggestions ? May be implement something like VISUAL_PLUGIN_FLAG_SPECIAL but in an opposite way. I.e. plugin must be used only with this application. This application simply provide some kind of special data/interfaces that can not be used with Libvisual. One nice way to implement this is to use const char* identifier to specify, say, application id. Numeric id's -- enums and #defines not very useful here, I think. We could place this id to VisPluginInfo. If so, we should add some void *dummys[5]; so we can extend functionality further without breaking plugin ABI. -- Vitaly GPG Key ID: F95A23B9 |
From: Dennis S. <sy...@yo...> - 2004-09-28 19:52:44
|
On Tue, 2004-09-28 at 22:14 +0300, Vitaly V. Bursov wrote: > May be implement something like VISUAL_PLUGIN_FLAG_SPECIAL but > in an opposite way. I.e. plugin must be used only with this > application. This application simply provide some kind of > special data/interfaces that can not be used with Libvisual. > > One nice way to implement this is to use const char* identifier > to specify, say, application id. Numeric id's -- enums and > #defines not very useful here, I think. > > We could place this id to VisPluginInfo. If so, we should add > some void *dummys[5]; so we can extend functionality further > without breaking plugin ABI. Ok, this might sound a bit lame, but I kinda lost you here :) Instead of flags, use char *indentifiers or ?, also with different applications, how do we make sure that indentifiers don't collide. Let's keep in mind that libvisual will be very succesful and used everywhere, even on the mobile phone (ehm.. alright I'm a bit dreamy today) but you got my point... About ABI compatibility, we surely need this at some point, but I rather wait till we're not in heavy development anylonger. Cheers, Dennis |
From: Vitaly V. B. <vit...@us...> - 2004-09-28 20:32:53
|
On Tue, 28 Sep 2004 21:52:39 +0200 Dennis Smit <sy...@yo...> wrote: > On Tue, 2004-09-28 at 22:14 +0300, Vitaly V. Bursov wrote: > > May be implement something like VISUAL_PLUGIN_FLAG_SPECIAL but > > in an opposite way. I.e. plugin must be used only with this > > application. This application simply provide some kind of > > special data/interfaces that can not be used with Libvisual. > > > > One nice way to implement this is to use const char* identifier > > to specify, say, application id. Numeric id's -- enums and > > #defines not very useful here, I think. > > > > We could place this id to VisPluginInfo. If so, we should add > > some void *dummys[5]; so we can extend functionality further > > without breaking plugin ABI. > Ok, this might sound a bit lame, but I kinda lost you here :) My fault... I'm trying to do few things at once. In different languages ;) > Instead of flags, use char *indentifiers or ?, also with different Not "instead" but "and". > applications, how do we make sure that indentifiers don't collide. well, usually application names are different... I propose to add char *optional_plugin_app_parameter_or_whatever; to VisPluginInfo. PLugin can set flag, say, APPLICATION_SPECIFIC and that char* string to "my_app_name iface 0.1". Libvisual must be told that it can load and use that plugin. > Let's keep in mind that libvisual will be very succesful and used > everywhere, even on the mobile phone (ehm.. alright I'm a bit :)) it will be REALLY slow! We'll need a mobile phone cluster! > dreamy today) but you got my point... Of course, it's just another to extend functionality with no pain. Plugin can use export'ed data inside of application itself. (i think) On ELF binaries only. he-he. -- Vitaly GPG Key ID: F95A23B9 |
From: Dennis S. <sy...@yo...> - 2004-09-28 21:11:08
|
On Tue, 2004-09-28 at 23:32 +0300, Vitaly V. Bursov wrote: > > Instead of flags, use char *indentifiers or ?, also with different > Not "instead" but "and". > > > applications, how do we make sure that indentifiers don't collide. > well, usually application names are different... I propose to add > char *optional_plugin_app_parameter_or_whatever; > to VisPluginInfo. PLugin can set flag, say, APPLICATION_SPECIFIC > and that char* string to "my_app_name iface 0.1". > Libvisual must be told that it can load and use that plugin. Ok, I kinda understand what you describe here, but as the dummy I'am I probably need an example scenario to understand the real usefulness of the approach... Thanks, Dennis |