Changes to fix multiple thread start.
This commit is contained in:
@@ -60,9 +60,6 @@ QuicktimeImageStream::QuicktimeImageStream(std::string fileName) : ImageStream()
|
||||
|
||||
if (!fileName.empty())
|
||||
setFileName(fileName);
|
||||
|
||||
startThread();
|
||||
start();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -51,7 +51,12 @@ namespace osg {
|
||||
virtual const char* className() const { return "QuicktimeImageStream"; }
|
||||
|
||||
/// Start or continue stream.
|
||||
virtual void play() { setCmd(THREAD_START); }
|
||||
virtual void play()
|
||||
{
|
||||
if (!isRunning()) start();
|
||||
|
||||
setCmd(THREAD_START);
|
||||
}
|
||||
|
||||
/// Pause stream at current position.
|
||||
virtual void pause() { setCmd(THREAD_STOP); }
|
||||
|
||||
@@ -70,7 +70,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->start();
|
||||
moov->play();
|
||||
return moov;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user