VIDEO: Remove Track::getStartTime()

That should be handled internally instead
This commit is contained in:
Matthew Hoops 2012-07-27 11:01:21 -04:00
parent 1f67c9dbbe
commit a364ef8f0f
2 changed files with 4 additions and 19 deletions

View File

@ -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 {

View File

@ -466,12 +466,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).
*