diff options
author | Matthew Hoops | 2012-09-07 13:22:08 -0400 |
---|---|---|
committer | Matthew Hoops | 2012-09-07 13:22:08 -0400 |
commit | b8bcbb46b47b30c87a0267211ae4aae4c61c4c78 (patch) | |
tree | ee2e5f041325167d153c711c2b93de59e9d9fe26 /engines | |
parent | f35e820e9f2f4c2f8b9c6d3b572d588fccf99f19 (diff) | |
download | scummvm-rg350-b8bcbb46b47b30c87a0267211ae4aae4c61c4c78.tar.gz scummvm-rg350-b8bcbb46b47b30c87a0267211ae4aae4c61c4c78.tar.bz2 scummvm-rg350-b8bcbb46b47b30c87a0267211ae4aae4c61c4c78.zip |
PEGASUS: Make setting the start time of a movie also seek
Better mirrors QuickTime behavior
Diffstat (limited to 'engines')
-rw-r--r-- | engines/pegasus/movie.cpp | 9 | ||||
-rw-r--r-- | engines/pegasus/movie.h | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/engines/pegasus/movie.cpp b/engines/pegasus/movie.cpp index 6187d87a2d..fcceee149a 100644 --- a/engines/pegasus/movie.cpp +++ b/engines/pegasus/movie.cpp @@ -80,7 +80,7 @@ void Movie::initFromMovieFile(const Common::String &fileName, bool transparent) if (!isSurfaceValid()) allocateSurface(bounds); - setStart(0, getScale()); + TimeBase::setStart(0, getScale()); TimeBase::setStop(_video->getDuration().convertToFramerate(getScale()).totalNumberOfFrames(), getScale()); } @@ -132,6 +132,13 @@ void Movie::moveMovieBoxTo(const CoordType h, const CoordType v) { _movieBox.moveTo(h, v); } +void Movie::setStart(const TimeValue startTime, const TimeScale scale) { + TimeBase::setStart(startTime, scale); + + if (_video) + _video->seek(Audio::Timestamp(0, _startTime, _startScale)); +} + void Movie::setStop(const TimeValue stopTime, const TimeScale scale) { TimeBase::setStop(stopTime, scale); diff --git a/engines/pegasus/movie.h b/engines/pegasus/movie.h index 9b9cc2bdbe..275deecca8 100644 --- a/engines/pegasus/movie.h +++ b/engines/pegasus/movie.h @@ -62,6 +62,8 @@ public: virtual void moveMovieBoxTo(const CoordType, const CoordType); + virtual void setStart(const TimeValue, const TimeScale = 0); + virtual void setStop(const TimeValue, const TimeScale = 0); virtual TimeValue getDuration(const TimeScale = 0) const; |