diff options
author | Matthew Hoops | 2012-07-27 11:01:21 -0400 |
---|---|---|
committer | Matthew Hoops | 2012-07-27 11:01:21 -0400 |
commit | a364ef8f0fca2675f791a29ef231385e29945939 (patch) | |
tree | 0472b569120837a442f7f4226d34be89d875a8d5 /video | |
parent | 1f67c9dbbed5e92d8b9cb8f4d729366463a05937 (diff) | |
download | scummvm-rg350-a364ef8f0fca2675f791a29ef231385e29945939.tar.gz scummvm-rg350-a364ef8f0fca2675f791a29ef231385e29945939.tar.bz2 scummvm-rg350-a364ef8f0fca2675f791a29ef231385e29945939.zip |
VIDEO: Remove Track::getStartTime()
That should be handled internally instead
Diffstat (limited to 'video')
-rw-r--r-- | video/video_decoder.cpp | 17 | ||||
-rw-r--r-- | video/video_decoder.h | 6 |
2 files changed, 4 insertions, 19 deletions
diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index 77eab3a6e1..cea3960fee 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -210,7 +210,7 @@ uint32 AdvancedVideoDecoder::getTime() const { uint32 time = ((const AudioTrack *)*it)->getRunningTime(); if (time != 0) - return time + (*it)->getStartTime().msecs() + _audioStartOffset.msecs(); + return time + _audioStartOffset.msecs(); } } } @@ -364,15 +364,10 @@ Audio::Timestamp AdvancedVideoDecoder::getDuration() const { Audio::Timestamp maxDuration(0, 1000); for (TrackList::const_iterator it = _tracks.begin(); it != _tracks.end(); it++) { - Audio::Timestamp startTime = (*it)->getStartTime(); Audio::Timestamp duration = (*it)->getDuration(); - if (duration.totalNumberOfFrames() != 0) { - // HACK: Timestamp's + operator doesn't do framerate conversion :( - duration = duration + startTime.convertToFramerate(duration.framerate()); - if (duration > maxDuration) - maxDuration = duration; - } + if (duration > maxDuration) + maxDuration = duration; } return maxDuration; @@ -406,11 +401,7 @@ bool AdvancedVideoDecoder::Track::isRewindable() const { } bool AdvancedVideoDecoder::Track::rewind() { - return seek(getStartTime()); -} - -Audio::Timestamp AdvancedVideoDecoder::Track::getStartTime() const { - return Audio::Timestamp(0, 1000); + return seek(Audio::Timestamp(0, 1000)); } Audio::Timestamp AdvancedVideoDecoder::Track::getDuration() const { diff --git a/video/video_decoder.h b/video/video_decoder.h index f0427668a6..18517c9ad2 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -467,12 +467,6 @@ protected: bool isPaused() const { return _paused; } /** - * Get the start time of the track (starting from the beginning of the - * movie). - */ - virtual Audio::Timestamp getStartTime() const; - - /** * Get the duration of the track (starting from this track's start time). * * By default, this returns 0 for unknown. |