From Brad Colbert, "Added a new method to ImageStream called getLength that is used to
return the length of the stream. Implemented the virtual methods in QuicktimeImageStream, (getLength, getReferenceTime, setTimeMultiplier), to return valid value for each. "
This commit is contained in:
@@ -67,6 +67,8 @@ class OSG_EXPORT ImageStream : public Image
|
||||
LoopingMode getLoopingMode() const { return _loopingMode; }
|
||||
|
||||
|
||||
virtual double getLength() const { return 0.0; }
|
||||
|
||||
virtual void setReferenceTime(double) {}
|
||||
virtual double getReferenceTime() const { return 0.0; }
|
||||
|
||||
|
||||
@@ -87,7 +87,10 @@ public:
|
||||
virtual void quit(bool wiatForThreadToExit);
|
||||
|
||||
/// Get total length in seconds.
|
||||
inline float getLength() const { return _len; }
|
||||
virtual double getLength() const
|
||||
{
|
||||
return double(_len);
|
||||
}
|
||||
|
||||
/// jumps to a specific position
|
||||
void jumpTo(float pos) {
|
||||
@@ -106,6 +109,29 @@ public:
|
||||
/// starts the thread
|
||||
virtual void run();
|
||||
|
||||
/// Go to a specific position in the stream.
|
||||
virtual void setReferenceTime(double time)
|
||||
{
|
||||
jumpTo(float(time));
|
||||
}
|
||||
/// Return the current position in the stream.
|
||||
virtual double getReferenceTime() const
|
||||
{
|
||||
return double(getCurrentTime());
|
||||
}
|
||||
|
||||
// Set the time multiplier if you want to speed up,
|
||||
// slow down, or go normal speed.
|
||||
virtual void setTimeMultiplier(double multiplier)
|
||||
{
|
||||
setMovieRate(float(multiplier));
|
||||
}
|
||||
virtual double getTimeMultiplier()
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
|
||||
protected:
|
||||
/// destructor
|
||||
virtual ~QuicktimeImageStream();
|
||||
|
||||
Reference in New Issue
Block a user