diff --git a/examples/osgmovie/osgmovie.cpp b/examples/osgmovie/osgmovie.cpp index a1969a0bb..f90994e35 100644 --- a/examples/osgmovie/osgmovie.cpp +++ b/examples/osgmovie/osgmovie.cpp @@ -250,6 +250,8 @@ int main(int argc, char** argv) if (arguments.isString(i)) { osg::Image* image = osgDB::readImageFile(arguments[i]); + osg::ImageStream* imagestream = dynamic_cast(image); + if (imagestream) imagestream->play(); geode->addDrawable(createTexturedQuadGeometry(pos,image->s(),image->t(),image)); geode->getOrCreateStateSet()->setMode(GL_LIGHTING,osg::StateAttribute::OFF); diff --git a/src/osgDB/ReadFile.cpp b/src/osgDB/ReadFile.cpp index 992b2b840..e5d472f59 100644 --- a/src/osgDB/ReadFile.cpp +++ b/src/osgDB/ReadFile.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -121,6 +122,17 @@ Node* osgDB::readNodeFiles(osg::ArgumentParser& arguments,const ReaderWriter::Op if (image.valid()) nodeList.push_back(osg::createGeodeForImage(image.get())); } + while (arguments.read("--movie",filename)) + { + osg::ref_ptr image = readImageFile(filename.c_str(), options); + osg::ref_ptr imageStream = dynamic_cast(image.get()); + if (image.valid()) + { + imageStream->play(); + nodeList.push_back(osg::createGeodeForImage(imageStream.get())); + } + } + while (arguments.read("--dem",filename)) { osg::HeightField* hf = readHeightFieldFile(filename.c_str(), options); diff --git a/src/osgPlugins/mpeg/ReaderWriterMPEG.cpp b/src/osgPlugins/mpeg/ReaderWriterMPEG.cpp index 07a615033..46c378648 100644 --- a/src/osgPlugins/mpeg/ReaderWriterMPEG.cpp +++ b/src/osgPlugins/mpeg/ReaderWriterMPEG.cpp @@ -30,7 +30,7 @@ class ReaderWriterMPEG : public osgDB::ReaderWriter if (fileName.empty()) return ReadResult::FILE_NOT_FOUND; osg::MpegImageStream* mpeg = new osg::MpegImageStream(fileName.c_str()); - mpeg->play(); + // mpeg->play(); return mpeg; } diff --git a/src/osgPlugins/quicktime/ReaderWriterQT.cpp b/src/osgPlugins/quicktime/ReaderWriterQT.cpp index 33c2a2dcf..de62a1a18 100644 --- a/src/osgPlugins/quicktime/ReaderWriterQT.cpp +++ b/src/osgPlugins/quicktime/ReaderWriterQT.cpp @@ -71,7 +71,7 @@ class ReaderWriterQT : public osgDB::ReaderWriter // state on the ImageStream... will integrated as is right now // to get things off the ground. osg::QuicktimeImageStream* moov = new osg::QuicktimeImageStream(fileName); - moov->play(); + // moov->play(); return moov; } diff --git a/src/osgPlugins/xine/ReaderWriterXine.cpp b/src/osgPlugins/xine/ReaderWriterXine.cpp index c860da104..ac83245ba 100644 --- a/src/osgPlugins/xine/ReaderWriterXine.cpp +++ b/src/osgPlugins/xine/ReaderWriterXine.cpp @@ -69,18 +69,24 @@ class XineImageStream : public osg::ImageStream _ready = false; - xine_play(_stream, 0, 0); + // play(); - // imageStream->play(); - - while (!_ready) - { - osg::notify(osg::NOTICE)<<"waiting..."<