diff options
author | Sven Hesse | 2010-08-08 00:37:52 +0000 |
---|---|---|
committer | Sven Hesse | 2010-08-08 00:37:52 +0000 |
commit | 9255d2e2179ee6a2cd63b6d8f521e3b9d8543be6 (patch) | |
tree | 66c9a5498e44a5059596053554398bb5ab4bf83d /graphics/video/coktel_decoder.h | |
parent | 863872216f1f0e987640633d339ef62e314d15d4 (diff) | |
download | scummvm-rg350-9255d2e2179ee6a2cd63b6d8f521e3b9d8543be6.tar.gz scummvm-rg350-9255d2e2179ee6a2cd63b6d8f521e3b9d8543be6.tar.bz2 scummvm-rg350-9255d2e2179ee6a2cd63b6d8f521e3b9d8543be6.zip |
VIDEO/GOB: Add setSurfaceMemory() to CoktelDecoder
This allows the video player to directly draw onto its own video
memory without having to blit each frame another time.
Will also be needed for proper handling of transparency in Woodruff.
svn-id: r51857
Diffstat (limited to 'graphics/video/coktel_decoder.h')
-rw-r--r-- | graphics/video/coktel_decoder.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/graphics/video/coktel_decoder.h b/graphics/video/coktel_decoder.h index b354a5cd9d..ec9acbe879 100644 --- a/graphics/video/coktel_decoder.h +++ b/graphics/video/coktel_decoder.h @@ -64,8 +64,15 @@ public: virtual bool seek(int32 frame, int whence = SEEK_SET, bool restart = false) = 0; + /** Draw directly onto the specified video memory. */ + void setSurfaceMemory(void *mem, uint16 width, uint16 height, uint8 bpp); + /** Reset the video memory. */ + void setSurfaceMemory(); + // VideoDecoder interface + void close(); + uint16 getWidth() const; uint16 getHeight() const; @@ -86,8 +93,15 @@ protected: byte _palette[768]; bool _paletteDirty; + bool _ownSurface; + Surface _surface; + Common::Rational _frameRate; + bool hasSurface(); + void createSurface(); + void freeSurface(); + // FixedRateVideoDecoder interface Common::Rational getFrameRate() const; }; @@ -117,8 +131,6 @@ private: byte *_videoBuffer; uint32 _videoBufferSize; - Surface _surface; - void processFrame(); void renderFrame(); }; |