Added s/getLoopingMode() to ImageStream and MPEG plugin

This commit is contained in:
Robert Osfield 2004-08-24 12:55:15 +00:00
parent 5095ee5909
commit b2d39d7f5b
4 changed files with 50 additions and 3 deletions

View File

@ -1,3 +1,31 @@
2004-08-18 10:34 robert
* NEWS.txt: Set date for 0.9.7-2 release
2004-08-18 07:06 robert
* src/osg/: dxtctool.cpp, dxtctool.h: Rejigged the __int*
definitions to try and get round Mingw compile errors
2004-08-17 20:42 robert
* src/osg/: dxtctool.cpp, dxtctool.h: From Bruce Clay, fixes for
VS6.0 build.
2004-08-17 19:57 robert
* include/osgUtil/RenderBin: From David Fries, added getBinNum()
method
2004-08-17 19:56 robert
* src/osg/PrimitiveSet.cpp: Changed sizeof(..) references to 1,2,4
respectively.
2004-08-17 09:14 robert
* ChangeLog: Updated changelog
2004-08-17 08:58 robert
* include/osg/AutoTransform, src/osg/AutoTransform.cpp: From David

View File

@ -55,6 +55,17 @@ class SG_EXPORT ImageStream : public Image
StreamStatus getStatus() { return _status; }
enum LoopingMode
{
NO_LOOPING,
LOOPING
};
void setLoopingMode(LoopingMode mode) { _loopingMode = mode; }
LoopingMode getLoopingMode() const { return _loopingMode; }
virtual void setReferenceTime(double) {}
virtual double getReferenceTime() const { return 0.0; }
@ -68,6 +79,7 @@ class SG_EXPORT ImageStream : public Image
virtual ~ImageStream() {}
StreamStatus _status;
LoopingMode _loopingMode;
};
} // namespace

View File

@ -16,7 +16,8 @@
using namespace osg;
ImageStream::ImageStream():
_status(PAUSED)
_status(PAUSED),
_loopingMode(LOOPING)
{
setDataVariance(DYNAMIC);
}

View File

@ -289,8 +289,14 @@ void MpegImageStream::run()
if (frameNumber>=_frames)
{
rewind();
//stop();
if (getLoopingMode()==LOOPING)
{
rewind();
}
else
{
pause();
}
}
else
{