On Mon, Feb 23, 2009 at 10:00 AM, Jean-Sébastien Guay < jean-sebastien.g...@cm-labs.com> 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. J-S, I'd be happy with this approach. I think hard-coding should be sufficient for now. If there's a compelling reason, we can move to the config file approach later. Here's a sample mime-type list: http://www.w3schools.com/media/media_mimeref.asp Anyway-- once there's a consensus I will be happy to code something up. Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : +1.703.652.4791
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org