diff options
-rw-r--r-- | video/qt_decoder.h | 1 | ||||
-rw-r--r-- | video/video_decoder.h | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/video/qt_decoder.h b/video/qt_decoder.h index e876097dfd..f11689e021 100644 --- a/video/qt_decoder.h +++ b/video/qt_decoder.h @@ -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. diff --git a/video/video_decoder.h b/video/video_decoder.h index 97cd133bc0..348b5dc0a3 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -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 |