HI Glenn + JS, On Mon, Feb 23, 2009 at 3:00 PM, Jean-Sébastien Guay <[email protected]> wrote: > Hi Robert, Glenn, > >> Could the mime type simply be mapped to a plugin name? If so then all >> we'd need to do to set up a alias list for mime type in addition to >> the current extension aliasing that the osgDB::Registry holds. > > I've seen lately, MediaWiki keeps a mapping of MIME type to extension (for > security, it checks that the file actually contains what its extension > suggests it should). In our case, we could do the same, and when the MIME > type is checked, an extension would be returned, and then the plugin for > that extension would be used. > > Where to store the mapping would be an open question though. Hard-coded in a > header/cpp somewhere, or as a text file in OpenSceneGraph-Data? But I > thought I'd just throw the idea out there.
Perhaps one could query the plugins and from this generate a configuration file that provides the mapping/functionality that the plugins provide and a .cpp implementation of this configuration file which could be compiled into osgDB. This would allow us to autogenerate and keep up to date the configuration. The mapping would also have a precedence, if a configuration file is manually specified then this over-writes the built in, and finally any plugins that are loaded could patch this configuration file to keep it full up to date. Not quite the minimal approach though... Robert. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

