Changeset 9968

Show
Ignore:
Timestamp:
03/25/09 00:25:30 (6 years ago)
Author:
robert
Message:

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

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp

    r9965 r9968  
    3131        supportsProtocol("http","Read video/audio from http using ffmpeg."); 
    3232 
     33        supportsExtension("ffmpeg", ""); 
    3334        supportsExtension("avi", ""); 
    3435        supportsExtension("flv", ""); 
     
    5657    virtual ReadResult readImage(const std::string & filename, const osgDB::ReaderWriter::Options * options) const 
    5758    { 
     59        const std::string ext = osgDB::getLowerCaseFileExtension(filename); 
     60        if (ext=="ffmpeg") return readImage(osgDB::getNameLessExtension(filename),options); 
     61 
    5862        if (filename.compare(0, 5, "/dev/")==0) 
    5963        { 
     
    6165        } 
    6266     
    63         const std::string ext = osgDB::getLowerCaseFileExtension(filename); 
    6467        if (! acceptsExtension(ext)) 
    6568            return ReadResult::FILE_NOT_HANDLED;