Removed the default play() in the MPEG, QuickTime and Xine plugins, moving
it into the osgmovie application, and into readNodeFile method where --movie is now available for detecting movie code.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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..."<<std::endl;
|
||||
usleep(10000);
|
||||
}
|
||||
}
|
||||
|
||||
virtual void play() { _status=PLAYING; }
|
||||
virtual void play()
|
||||
{
|
||||
if (_status!=PLAYING)
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"XineImageStream::play()"<<std::endl;
|
||||
xine_play(_stream, 0, 0);
|
||||
while (!_ready)
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"waiting..."<<std::endl;
|
||||
usleep(10000);
|
||||
}
|
||||
}
|
||||
_status=PLAYING;
|
||||
}
|
||||
|
||||
virtual void pause() { _status=PAUSED; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user