From c7fa1074fbc55e9e519f9c7e08dea9603af22e61 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Mon, 17 May 2010 21:59:05 +0000 Subject: Change VideoDecoder::getCurFrame() to mean the last frame drawn instead of the next frame to draw. This is patch 1 from patch #2963496 (VideoDecoder Rewrite). svn-id: r49063 --- graphics/video/video_player.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'graphics/video/video_player.h') diff --git a/graphics/video/video_player.h b/graphics/video/video_player.h index 333c39f700..4f38bd9740 100644 --- a/graphics/video/video_player.h +++ b/graphics/video/video_player.h @@ -60,13 +60,13 @@ public: * Returns the current frame number of the video * @return the current frame number of the video */ - virtual int32 getCurFrame(); + virtual int32 getCurFrame() const; /** * Returns the amount of frames in the video * @return the amount of frames in the video */ - virtual int32 getFrameCount(); + virtual int32 getFrameCount() const; /** * Returns the frame rate of the video @@ -108,7 +108,7 @@ public: /** * Returns if a video file is loaded or not */ - bool isVideoLoaded() { return (_fileStream != NULL); } + bool isVideoLoaded() const { return (_fileStream != NULL); } /** * Set RGB palette, based on current frame @@ -158,6 +158,11 @@ public: */ virtual bool decodeNextFrame() = 0; + /** + * Returns if the video is finished or not + */ + virtual bool endOfVideo() const; + protected: struct { uint32 width; @@ -166,7 +171,7 @@ protected: int32 frameRate; int32 frameDelay; // 1/100 ms (to avoid rounding errors) uint32 firstframeOffset; - uint32 currentFrame; + int32 currentFrame; uint32 startTime; } _videoInfo; -- cgit v1.2.3