Show
Ignore:
Timestamp:
03/13/09 16:56:19 (4 years ago)
Author:
robert
Message:

From Stephan Huber, clean up of Quicktime plugin

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/quicktime/ReaderWriterQT.cpp

    r9769 r9932  
    132132        supportsExtension("dv","Movie format"); 
    133133        supportsExtension("avi","Movie format"); 
     134        supportsExtension("sdp","RTSP Movie format"); 
    134135        supportsExtension("flv","Movie format"); 
    135136        supportsExtension("swf","Movie format"); 
     
    137138 
    138139        supportsExtension("live","Live video streaming"); 
     140         
     141        supportsProtocol("http", "streaming media per http"); 
     142        supportsProtocol("rtsp", "streaming media per rtsp"); 
    139143 
    140144        #ifdef QT_HANDLE_IMAGES_ALSO 
     
    168172         osgDB::equalCaseInsensitive(extension,"dv")  || 
    169173         osgDB::equalCaseInsensitive(extension,"avi") || 
     174         osgDB::equalCaseInsensitive(extension,"sdp") || 
    170175         osgDB::equalCaseInsensitive(extension,"flv") || 
    171176         osgDB::equalCaseInsensitive(extension,"swf") || 
     
    295300 
    296301      // Not an encoded "live" psuedo file - so check a real file exists 
    297       std::string fileName = osgDB::findDataFile( file,  options); 
    298       if (fileName.empty()) return ReadResult::FILE_NOT_FOUND; 
    299  
     302      // only find the file if it isn't a URL 
     303      std::string fileName = file; 
     304       
     305       
    300306      // Note from Riccardo Corsi  
    301307      // Quicktime initialization is done here, when a media is found 
     
    309315      if (acceptsMovieExtension(ext)) 
    310316      { 
     317         // quicktime supports playing movies from URLs 
     318         if (!osgDB::containsServerAddress(fileName)) { 
     319             fileName = osgDB::findDataFile( file,  options); 
     320            if (fileName.empty()) return ReadResult::FILE_NOT_FOUND; 
     321         } 
     322          
    311323         // note from Robert Osfield when integrating, we should probably have so 
    312324         // error handling mechanism here.  Possibly move the load from 
     
    322334         return moov; 
    323335      } 
    324   
     336         
     337         
     338        // no live-video, no movie-file, so try to load as an image 
     339         
     340        fileName = osgDB::findDataFile( file,  options); 
     341        if (fileName.empty()) return ReadResult::FILE_NOT_FOUND; 
     342             
    325343        QuicktimeImportExport importer; 
    326344