From cdc4c3bfa88a3d94d3c75c9766e97fd87053241f Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Mon, 21 Mar 2011 18:27:49 -0400 Subject: MOHAWK: Add a getDuration() function to the VideoManager --- engines/mohawk/video.cpp | 5 +++++ engines/mohawk/video.h | 1 + 2 files changed, 6 insertions(+) diff --git a/engines/mohawk/video.cpp b/engines/mohawk/video.cpp index 9bf202083a..f481b5ceb2 100644 --- a/engines/mohawk/video.cpp +++ b/engines/mohawk/video.cpp @@ -490,6 +490,11 @@ uint32 VideoManager::getElapsedTime(VideoHandle handle) { return _videoStreams[handle]->getElapsedTime(); } +uint32 VideoManager::getDuration(VideoHandle handle) { + assert(handle != NULL_VID_HANDLE); + return _videoStreams[handle]->getDuration(); +} + bool VideoManager::endOfVideo(VideoHandle handle) { assert(handle != NULL_VID_HANDLE); return _videoStreams[handle].endOfVideo(); diff --git a/engines/mohawk/video.h b/engines/mohawk/video.h index 6b9cfa25d2..e65629a1ec 100644 --- a/engines/mohawk/video.h +++ b/engines/mohawk/video.h @@ -104,6 +104,7 @@ public: int32 getCurFrame(VideoHandle handle); uint32 getFrameCount(VideoHandle handle); uint32 getElapsedTime(VideoHandle handle); + uint32 getDuration(VideoHandle videoHandle); bool endOfVideo(VideoHandle handle); void setVideoBounds(VideoHandle handle, Audio::Timestamp start, Audio::Timestamp end); void seekToTime(VideoHandle handle, Audio::Timestamp time); -- cgit v1.2.3