From 3c5e02900f6397add6365bea819987bf9d6e89e6 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 8 Aug 2010 00:53:55 +0000 Subject: VIDEO: Add getSurface svn-id: r51892 --- graphics/video/coktel_decoder.cpp | 7 +++++++ graphics/video/coktel_decoder.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/graphics/video/coktel_decoder.cpp b/graphics/video/coktel_decoder.cpp index 629e01c2b5..8e8c6f9e93 100644 --- a/graphics/video/coktel_decoder.cpp +++ b/graphics/video/coktel_decoder.cpp @@ -71,6 +71,13 @@ void CoktelDecoder::setSurfaceMemory() { _ownSurface = true; } +const Surface *CoktelDecoder::getSurface() const { + if (!isVideoLoaded()) + return 0; + + return &_surface; +} + bool CoktelDecoder::hasSurface() { return _surface.pixels != 0; } diff --git a/graphics/video/coktel_decoder.h b/graphics/video/coktel_decoder.h index 8bba71ebcd..646e55b0bc 100644 --- a/graphics/video/coktel_decoder.h +++ b/graphics/video/coktel_decoder.h @@ -68,6 +68,8 @@ public: /** Reset the video memory. */ void setSurfaceMemory(); + const Surface *getSurface() const; + /** Draw the video starting at this position within the video memory. */ virtual void setXY(uint16 x, uint16 y); /** Draw the video at the default position. */ -- cgit v1.2.3