Show
Ignore:
Timestamp:
01/07/10 10:45:34 (4 years ago)
Author:
robert
Message:

From Serge Lages, "Here is a modified fix. It doesn't break the other patch for this plugin as they are for different files. I've only added the file formats handled by default with DirectShow? (based on its Wikipedia page)."

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/directshow/ReaderWriterDirectShow.cpp

    r10798 r10922  
    2929    ReaderWriterDirectShow() 
    3030    { 
     31        supportsExtension("directshow", ""); 
     32        supportsExtension("avi",    ""); 
     33        supportsExtension("wmv",    "Windows Media Video format"); 
     34        supportsExtension("mpg",    "Mpeg movie format"); 
     35        supportsExtension("mpeg",   "Mpeg movie format"); 
    3136    } 
    3237 
     
    4348    { 
    4449        const std::string ext = osgDB::getLowerCaseFileExtension(filename); 
    45         if (ext=="directshow") return readImage(osgDB::getNameLessExtension(filename),options); 
     50        if (ext=="directshow") return readImageStream(osgDB::getNameLessExtension(filename),options); 
     51        if (! acceptsExtension(ext)) 
     52            return ReadResult::FILE_NOT_HANDLED; 
    4653        return readImageStream(filename, options); 
    4754    } 
     
    4956    ReadResult readImageStream(const std::string& filename, const osgDB::ReaderWriter::Options * options) const 
    5057    { 
    51         osg::notify(osg::INFO) << "ReaderWriterFFmpeg::readImage " << filename << std::endl; 
     58        osg::notify(osg::INFO) << "ReaderWriterDirectShow::readImage " << filename << std::endl; 
    5259        const std::string path = osgDB::containsServerAddress(filename) ? 
    5360            filename :