mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-20 17:03:05 +00:00
VIDEO: Add a getDuration() function to SeekableVideoDecoder
This function returns the total duration of the video
This commit is contained in:
parent
40c496d730
commit
94c27e4657
@ -122,6 +122,7 @@ public:
|
||||
// SeekableVideoDecoder API
|
||||
void seekToFrame(uint32 frame);
|
||||
void seekToTime(Audio::Timestamp time);
|
||||
uint32 getDuration() const { return _duration * 1000 / _timeScale; }
|
||||
|
||||
private:
|
||||
// This is the file handle from which data is read from. It can be the actual file handle or a decompressed stream.
|
||||
|
@ -266,6 +266,11 @@ public:
|
||||
* Implementation of RewindableVideoDecoder::rewind().
|
||||
*/
|
||||
virtual void rewind() { seekToTime(0); }
|
||||
|
||||
/**
|
||||
* Get the total duration of the video (in ms).
|
||||
*/
|
||||
virtual uint32 getDuration() const = 0;
|
||||
};
|
||||
|
||||
} // End of namespace Video
|
||||
|
Loading…
x
Reference in New Issue
Block a user