Added support for adding .ffmpeg to filenames to force selection of ffmpeg plugin

This commit is contained in:
Robert Osfield 2009-03-24 23:25:30 +00:00
parent 31e7f32d3f
commit 36b3907d79

View File

@ -30,6 +30,7 @@ public:
{
supportsProtocol("http","Read video/audio from http using ffmpeg.");
supportsExtension("ffmpeg", "");
supportsExtension("avi", "");
supportsExtension("flv", "");
supportsExtension("mov", "");
@ -55,12 +56,14 @@ public:
virtual ReadResult readImage(const std::string & filename, const osgDB::ReaderWriter::Options * options) const
{
const std::string ext = osgDB::getLowerCaseFileExtension(filename);
if (ext=="ffmpeg") return readImage(osgDB::getNameLessExtension(filename),options);
if (filename.compare(0, 5, "/dev/")==0)
{
return readImageStream(filename, options);
}
const std::string ext = osgDB::getLowerCaseFileExtension(filename);
if (! acceptsExtension(ext))
return ReadResult::FILE_NOT_HANDLED;