[Scummvm-cvs-logs] SF.net SVN: scummvm:[54927] scummvm/trunk
mthreepwood at users.sourceforge.net
mthreepwood at users.sourceforge.net
Thu Dec 16 02:35:13 CET 2010
Revision: 54927
http://scummvm.svn.sourceforge.net/scummvm/?rev=54927&view=rev
Author: mthreepwood
Date: 2010-12-16 01:35:13 +0000 (Thu, 16 Dec 2010)
Log Message:
-----------
VIDEO: Make VideoDecoder::decodeNextFrame() return a const Surface pointer
Modified Paths:
--------------
scummvm/trunk/engines/agos/animation.cpp
scummvm/trunk/engines/gob/videoplayer.cpp
scummvm/trunk/engines/mohawk/video.cpp
scummvm/trunk/engines/saga/introproc_saga2.cpp
scummvm/trunk/engines/sci/engine/kvideo.cpp
scummvm/trunk/engines/sci/video/seq_decoder.cpp
scummvm/trunk/engines/sci/video/seq_decoder.h
scummvm/trunk/engines/scumm/he/animation_he.cpp
scummvm/trunk/engines/sword1/animation.cpp
scummvm/trunk/engines/sword2/animation.cpp
scummvm/trunk/engines/sword25/fmv/movieplayer.cpp
scummvm/trunk/engines/sword25/fmv/theora_decoder.cpp
scummvm/trunk/engines/sword25/fmv/theora_decoder.h
scummvm/trunk/engines/toon/movie.cpp
scummvm/trunk/engines/tucker/sequences.cpp
scummvm/trunk/graphics/video/avi_decoder.cpp
scummvm/trunk/graphics/video/avi_decoder.h
scummvm/trunk/graphics/video/coktel_decoder.cpp
scummvm/trunk/graphics/video/coktel_decoder.h
scummvm/trunk/graphics/video/dxa_decoder.cpp
scummvm/trunk/graphics/video/dxa_decoder.h
scummvm/trunk/graphics/video/flic_decoder.cpp
scummvm/trunk/graphics/video/flic_decoder.h
scummvm/trunk/graphics/video/qt_decoder.cpp
scummvm/trunk/graphics/video/qt_decoder.h
scummvm/trunk/graphics/video/smk_decoder.cpp
scummvm/trunk/graphics/video/smk_decoder.h
scummvm/trunk/graphics/video/video_decoder.h
Modified: scummvm/trunk/engines/agos/animation.cpp
===================================================================
--- scummvm/trunk/engines/agos/animation.cpp 2010-12-15 23:52:24 UTC (rev 54926)
+++ scummvm/trunk/engines/agos/animation.cpp 2010-12-16 01:35:13 UTC (rev 54927)
@@ -267,7 +267,7 @@
uint h = getHeight();
uint w = getWidth();
- Graphics::Surface *surface = decodeNextFrame();
+ const Graphics::Surface *surface = decodeNextFrame();
byte *src = (byte *)surface->pixels;
dst += y * pitch + x;
@@ -428,7 +428,7 @@
uint h = getHeight();
uint w = getWidth();
- Graphics::Surface *surface = decodeNextFrame();
+ const Graphics::Surface *surface = decodeNextFrame();
byte *src = (byte *)surface->pixels;
dst += y * pitch + x;
Modified: scummvm/trunk/engines/gob/videoplayer.cpp
===================================================================
--- scummvm/trunk/engines/gob/videoplayer.cpp 2010-12-15 23:52:24 UTC (rev 54926)
+++ scummvm/trunk/engines/gob/videoplayer.cpp 2010-12-16 01:35:13 UTC (rev 54927)
@@ -325,7 +325,7 @@
_vm->_draw->forceBlit();
}
- Graphics::Surface *surface = video->decoder->decodeNextFrame();
+ const Graphics::Surface *surface = video->decoder->decodeNextFrame();
WRITE_VAR(11, video->decoder->getCurFrame());
Modified: scummvm/trunk/engines/mohawk/video.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/video.cpp 2010-12-15 23:52:24 UTC (rev 54926)
+++ scummvm/trunk/engines/mohawk/video.cpp 2010-12-16 01:35:13 UTC (rev 54927)
@@ -178,18 +178,19 @@
// Check if we need to draw a frame
if (_videoStreams[i]->needsUpdate()) {
- Graphics::Surface *frame = _videoStreams[i]->decodeNextFrame();
- bool deleteFrame = false;
+ const Graphics::Surface *frame = _videoStreams[i]->decodeNextFrame();
+ Graphics::Surface *convertedFrame = 0;
if (frame && _videoStreams[i].enabled) {
// Convert from 8bpp to the current screen format if necessary
Graphics::PixelFormat pixelFormat = _vm->_system->getScreenFormat();
+
if (frame->bytesPerPixel == 1 && pixelFormat.bytesPerPixel != 1) {
- Graphics::Surface *newFrame = new Graphics::Surface();
+ convertedFrame = new Graphics::Surface();
byte *palette = _videoStreams[i]->getPalette();
assert(palette);
- newFrame->create(frame->w, frame->h, pixelFormat.bytesPerPixel);
+ convertedFrame->create(frame->w, frame->h, pixelFormat.bytesPerPixel);
for (uint16 j = 0; j < frame->h; j++) {
for (uint16 k = 0; k < frame->w; k++) {
@@ -198,14 +199,13 @@
byte g = palette[palIndex * 3 + 1];
byte b = palette[palIndex * 3 + 2];
if (pixelFormat.bytesPerPixel == 2)
- *((uint16 *)newFrame->getBasePtr(k, j)) = pixelFormat.RGBToColor(r, g, b);
+ *((uint16 *)convertedFrame->getBasePtr(k, j)) = pixelFormat.RGBToColor(r, g, b);
else
- *((uint32 *)newFrame->getBasePtr(k, j)) = pixelFormat.RGBToColor(r, g, b);
+ *((uint32 *)convertedFrame->getBasePtr(k, j)) = pixelFormat.RGBToColor(r, g, b);
}
}
- frame = newFrame;
- deleteFrame = true;
+ frame = convertedFrame;
}
// Clip the width/height to make sure we stay on the screen (Myst does this a few times)
@@ -216,10 +216,10 @@
// We've drawn something to the screen, make sure we update it
updateScreen = true;
- // Delete the frame if we're using the buffer from the 8bpp conversion
- if (deleteFrame) {
- frame->free();
- delete frame;
+ // Delete 8bpp conversion surface
+ if (convertedFrame) {
+ convertedFrame->free();
+ delete convertedFrame;
}
}
}
Modified: scummvm/trunk/engines/saga/introproc_saga2.cpp
===================================================================
--- scummvm/trunk/engines/saga/introproc_saga2.cpp 2010-12-15 23:52:24 UTC (rev 54926)
+++ scummvm/trunk/engines/saga/introproc_saga2.cpp 2010-12-16 01:35:13 UTC (rev 54927)
@@ -103,7 +103,7 @@
while (!_vm->shouldQuit() && !smkDecoder->endOfVideo() && !skipVideo) {
if (smkDecoder->needsUpdate()) {
- Graphics::Surface *frame = smkDecoder->decodeNextFrame();
+ const Graphics::Surface *frame = smkDecoder->decodeNextFrame();
if (frame) {
_vm->_system->copyRectToScreen((byte *)frame->pixels, frame->pitch, x, y, frame->w, frame->h);
Modified: scummvm/trunk/engines/sci/engine/kvideo.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kvideo.cpp 2010-12-15 23:52:24 UTC (rev 54926)
+++ scummvm/trunk/engines/sci/engine/kvideo.cpp 2010-12-16 01:35:13 UTC (rev 54927)
@@ -67,7 +67,7 @@
while (!g_engine->shouldQuit() && !videoDecoder->endOfVideo() && !skipVideo) {
if (videoDecoder->needsUpdate()) {
- Graphics::Surface *frame = videoDecoder->decodeNextFrame();
+ const Graphics::Surface *frame = videoDecoder->decodeNextFrame();
if (frame) {
if (scaleBuffer) {
// TODO: Probably should do aspect ratio correction in e.g. GK1 Windows
Modified: scummvm/trunk/engines/sci/video/seq_decoder.cpp
===================================================================
--- scummvm/trunk/engines/sci/video/seq_decoder.cpp 2010-12-15 23:52:24 UTC (rev 54926)
+++ scummvm/trunk/engines/sci/video/seq_decoder.cpp 2010-12-16 01:35:13 UTC (rev 54927)
@@ -108,7 +108,7 @@
reset();
}
-Graphics::Surface *SeqDecoder::decodeNextFrame() {
+const Graphics::Surface *SeqDecoder::decodeNextFrame() {
int16 frameWidth = _fileStream->readUint16LE();
int16 frameHeight = _fileStream->readUint16LE();
int16 frameLeft = _fileStream->readUint16LE();
Modified: scummvm/trunk/engines/sci/video/seq_decoder.h
===================================================================
--- scummvm/trunk/engines/sci/video/seq_decoder.h 2010-12-15 23:52:24 UTC (rev 54926)
+++ scummvm/trunk/engines/sci/video/seq_decoder.h 2010-12-16 01:35:13 UTC (rev 54927)
@@ -47,7 +47,7 @@
uint16 getWidth() const { return SEQ_SCREEN_WIDTH; }
uint16 getHeight() const { return SEQ_SCREEN_HEIGHT; }
uint32 getFrameCount() const { return _frameCount; }
- Graphics::Surface *decodeNextFrame();
+ const Graphics::Surface *decodeNextFrame();
Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); }
byte *getPalette() { _dirtyPalette = false; return _palette; }
bool hasDirtyPalette() const { return _dirtyPalette; }
Modified: scummvm/trunk/engines/scumm/he/animation_he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/animation_he.cpp 2010-12-15 23:52:24 UTC (rev 54926)
+++ scummvm/trunk/engines/scumm/he/animation_he.cpp 2010-12-16 01:35:13 UTC (rev 54927)
@@ -68,7 +68,7 @@
uint h = getHeight();
uint w = getWidth();
- Graphics::Surface *surface = decodeNextFrame();
+ const Graphics::Surface *surface = decodeNextFrame();
byte *src = (byte *)surface->pixels;
if (hasDirtyPalette())
Modified: scummvm/trunk/engines/sword1/animation.cpp
===================================================================
--- scummvm/trunk/engines/sword1/animation.cpp 2010-12-15 23:52:24 UTC (rev 54926)
+++ scummvm/trunk/engines/sword1/animation.cpp 2010-12-16 01:35:13 UTC (rev 54927)
@@ -252,7 +252,7 @@
while (!_vm->shouldQuit() && !_decoder->endOfVideo()) {
if (_decoder->needsUpdate()) {
- Graphics::Surface *frame = _decoder->decodeNextFrame();
+ const Graphics::Surface *frame = _decoder->decodeNextFrame();
if (frame)
_vm->_system->copyRectToScreen((byte *)frame->pixels, frame->pitch, x, y, frame->w, frame->h);
Modified: scummvm/trunk/engines/sword2/animation.cpp
===================================================================
--- scummvm/trunk/engines/sword2/animation.cpp 2010-12-15 23:52:24 UTC (rev 54926)
+++ scummvm/trunk/engines/sword2/animation.cpp 2010-12-16 01:35:13 UTC (rev 54927)
@@ -279,7 +279,7 @@
while (!_vm->shouldQuit() && !_decoder->endOfVideo()) {
if (_decoder->needsUpdate()) {
- Graphics::Surface *frame = _decoder->decodeNextFrame();
+ const Graphics::Surface *frame = _decoder->decodeNextFrame();
if (frame)
_vm->_system->copyRectToScreen((byte *)frame->pixels, frame->pitch, x, y, frame->w, frame->h);
Modified: scummvm/trunk/engines/sword25/fmv/movieplayer.cpp
===================================================================
--- scummvm/trunk/engines/sword25/fmv/movieplayer.cpp 2010-12-15 23:52:24 UTC (rev 54926)
+++ scummvm/trunk/engines/sword25/fmv/movieplayer.cpp 2010-12-16 01:35:13 UTC (rev 54927)
@@ -124,7 +124,7 @@
void MoviePlayer::update() {
if (_decoder.isVideoLoaded()) {
- Graphics::Surface *s = _decoder.decodeNextFrame();
+ const Graphics::Surface *s = _decoder.decodeNextFrame();
if (s) {
// Transfer the next frame
assert(s->bytesPerPixel == 4);
Modified: scummvm/trunk/engines/sword25/fmv/theora_decoder.cpp
===================================================================
--- scummvm/trunk/engines/sword25/fmv/theora_decoder.cpp 2010-12-15 23:52:24 UTC (rev 54926)
+++ scummvm/trunk/engines/sword25/fmv/theora_decoder.cpp 2010-12-16 01:35:13 UTC (rev 54927)
@@ -329,7 +329,7 @@
reset();
}
-Graphics::Surface *TheoraDecoder::decodeNextFrame() {
+const Graphics::Surface *TheoraDecoder::decodeNextFrame() {
int i, j;
// _stateFlag = false; // playback has not begun
Modified: scummvm/trunk/engines/sword25/fmv/theora_decoder.h
===================================================================
--- scummvm/trunk/engines/sword25/fmv/theora_decoder.h 2010-12-15 23:52:24 UTC (rev 54926)
+++ scummvm/trunk/engines/sword25/fmv/theora_decoder.h 2010-12-16 01:35:13 UTC (rev 54927)
@@ -67,7 +67,7 @@
* @note the return surface should *not* be freed
* @note this may return 0, in which case the last frame should be kept on screen
*/
- Graphics::Surface *decodeNextFrame();
+ const Graphics::Surface *decodeNextFrame();
bool isVideoLoaded() const {
return _fileStream != 0;
Modified: scummvm/trunk/engines/toon/movie.cpp
===================================================================
--- scummvm/trunk/engines/toon/movie.cpp 2010-12-15 23:52:24 UTC (rev 54926)
+++ scummvm/trunk/engines/toon/movie.cpp 2010-12-16 01:35:13 UTC (rev 54927)
@@ -97,7 +97,7 @@
int32 y = 0;
while (!_vm->shouldQuit() && !_decoder->endOfVideo()) {
if (_decoder->needsUpdate()) {
- Graphics::Surface *frame = _decoder->decodeNextFrame();
+ const Graphics::Surface *frame = _decoder->decodeNextFrame();
if (frame)
_vm->getSystem()->copyRectToScreen((byte *)frame->pixels, frame->pitch, x, y, frame->w, frame->h);
_decoder->setSystemPalette();
Modified: scummvm/trunk/engines/tucker/sequences.cpp
===================================================================
--- scummvm/trunk/engines/tucker/sequences.cpp 2010-12-15 23:52:24 UTC (rev 54926)
+++ scummvm/trunk/engines/tucker/sequences.cpp 2010-12-16 01:35:13 UTC (rev 54927)
@@ -765,7 +765,7 @@
}
bool AnimationSequencePlayer::decodeNextAnimationFrame(int index, bool copyDirtyRects) {
- ::Graphics::Surface *surface = _flicPlayer[index].decodeNextFrame();
+ const ::Graphics::Surface *surface = _flicPlayer[index].decodeNextFrame();
if (!copyDirtyRects) {
for (uint16 y = 0; (y < surface->h) && (y < kScreenHeight); y++)
@@ -804,7 +804,7 @@
// The intro credits animation. This uses 2 animations: the foreground one, which
// is the actual intro credits, and the background one, which is an animation of
// cogs, and is being replayed when an intro credit appears
- ::Graphics::Surface *surface = 0;
+ const ::Graphics::Surface *surface = 0;
if (_flicPlayer[0].getCurFrame() >= 115) {
surface = _flicPlayer[1].decodeNextFrame();
Modified: scummvm/trunk/graphics/video/avi_decoder.cpp
===================================================================
--- scummvm/trunk/graphics/video/avi_decoder.cpp 2010-12-15 23:52:24 UTC (rev 54926)
+++ scummvm/trunk/graphics/video/avi_decoder.cpp 2010-12-16 01:35:13 UTC (rev 54927)
@@ -316,7 +316,7 @@
return VideoDecoder::getElapsedTime();
}
-Surface *AviDecoder::decodeNextFrame() {
+const Surface *AviDecoder::decodeNextFrame() {
uint32 nextTag = _fileStream->readUint32BE();
if (_fileStream->eos())
@@ -334,9 +334,9 @@
error ("Expected 'rec ' LIST");
// Decode chunks in the list and see if we get a frame
- Surface *frame = NULL;
+ const Surface *frame = NULL;
while (_fileStream->pos() < startPos + (int32)listSize) {
- Surface *temp = decodeNextFrame();
+ const Surface *temp = decodeNextFrame();
if (temp)
frame = temp;
}
Modified: scummvm/trunk/graphics/video/avi_decoder.h
===================================================================
--- scummvm/trunk/graphics/video/avi_decoder.h 2010-12-15 23:52:24 UTC (rev 54926)
+++ scummvm/trunk/graphics/video/avi_decoder.h 2010-12-16 01:35:13 UTC (rev 54927)
@@ -176,7 +176,7 @@
uint16 getHeight() const { return _header.height; }
uint32 getFrameCount() const { return _header.totalFrames; }
uint32 getElapsedTime() const;
- Surface *decodeNextFrame();
+ const Surface *decodeNextFrame();
PixelFormat getPixelFormat() const;
byte *getPalette() { _dirtyPalette = false; return _palette; }
bool hasDirtyPalette() const { return _dirtyPalette; }
Modified: scummvm/trunk/graphics/video/coktel_decoder.cpp
===================================================================
--- scummvm/trunk/graphics/video/coktel_decoder.cpp 2010-12-15 23:52:24 UTC (rev 54926)
+++ scummvm/trunk/graphics/video/coktel_decoder.cpp 2010-12-16 01:35:13 UTC (rev 54927)
@@ -669,7 +669,7 @@
return _stream != 0;
}
-Surface *PreIMDDecoder::decodeNextFrame() {
+const Surface *PreIMDDecoder::decodeNextFrame() {
if (!isVideoLoaded() || endOfVideo())
return 0;
@@ -1128,7 +1128,7 @@
return _stream != 0;
}
-Surface *IMDDecoder::decodeNextFrame() {
+const Surface *IMDDecoder::decodeNextFrame() {
if (!isVideoLoaded() || endOfVideo())
return 0;
@@ -1925,7 +1925,7 @@
return _stream != 0;
}
-Surface *VMDDecoder::decodeNextFrame() {
+const Surface *VMDDecoder::decodeNextFrame() {
if (!isVideoLoaded() || endOfVideo())
return 0;
Modified: scummvm/trunk/graphics/video/coktel_decoder.h
===================================================================
--- scummvm/trunk/graphics/video/coktel_decoder.h 2010-12-15 23:52:24 UTC (rev 54926)
+++ scummvm/trunk/graphics/video/coktel_decoder.h 2010-12-16 01:35:13 UTC (rev 54927)
@@ -227,7 +227,7 @@
bool isVideoLoaded() const;
- Surface *decodeNextFrame();
+ const Surface *decodeNextFrame();
PixelFormat getPixelFormat() const;
@@ -260,7 +260,7 @@
bool isVideoLoaded() const;
- Surface *decodeNextFrame();
+ const Surface *decodeNextFrame();
PixelFormat getPixelFormat() const;
@@ -364,7 +364,7 @@
bool isVideoLoaded() const;
- Surface *decodeNextFrame();
+ const Surface *decodeNextFrame();
PixelFormat getPixelFormat() const;
Modified: scummvm/trunk/graphics/video/dxa_decoder.cpp
===================================================================
--- scummvm/trunk/graphics/video/dxa_decoder.cpp 2010-12-15 23:52:24 UTC (rev 54926)
+++ scummvm/trunk/graphics/video/dxa_decoder.cpp 2010-12-16 01:35:13 UTC (rev 54927)
@@ -477,7 +477,7 @@
#endif
}
-Surface *DXADecoder::decodeNextFrame() {
+const Surface *DXADecoder::decodeNextFrame() {
uint32 tag = _fileStream->readUint32BE();
if (tag == MKID_BE('CMAP')) {
_fileStream->read(_palette, 256 * 3);
Modified: scummvm/trunk/graphics/video/dxa_decoder.h
===================================================================
--- scummvm/trunk/graphics/video/dxa_decoder.h 2010-12-15 23:52:24 UTC (rev 54926)
+++ scummvm/trunk/graphics/video/dxa_decoder.h 2010-12-16 01:35:13 UTC (rev 54927)
@@ -50,7 +50,7 @@
uint16 getWidth() const { return _width; }
uint16 getHeight() const { return _height; }
uint32 getFrameCount() const { return _frameCount; }
- Surface *decodeNextFrame();
+ const Surface *decodeNextFrame();
PixelFormat getPixelFormat() const { return PixelFormat::createFormatCLUT8(); }
byte *getPalette() { _dirtyPalette = false; return _palette; }
bool hasDirtyPalette() const { return _dirtyPalette; }
Modified: scummvm/trunk/graphics/video/flic_decoder.cpp
===================================================================
--- scummvm/trunk/graphics/video/flic_decoder.cpp 2010-12-15 23:52:24 UTC (rev 54926)
+++ scummvm/trunk/graphics/video/flic_decoder.cpp 2010-12-16 01:35:13 UTC (rev 54927)
@@ -194,7 +194,7 @@
#define PSTAMP 18
#define FRAME_TYPE 0xF1FA
-Surface *FlicDecoder::decodeNextFrame() {
+const Surface *FlicDecoder::decodeNextFrame() {
// Read chunk
uint32 frameSize = _fileStream->readUint32LE();
uint16 frameType = _fileStream->readUint16LE();
Modified: scummvm/trunk/graphics/video/flic_decoder.h
===================================================================
--- scummvm/trunk/graphics/video/flic_decoder.h 2010-12-15 23:52:24 UTC (rev 54926)
+++ scummvm/trunk/graphics/video/flic_decoder.h 2010-12-16 01:35:13 UTC (rev 54927)
@@ -59,7 +59,7 @@
* @note the return surface should *not* be freed
* @note this may return 0, in which case the last frame should be kept on screen
*/
- Surface *decodeNextFrame();
+ const Surface *decodeNextFrame();
bool isVideoLoaded() const { return _fileStream != 0; }
uint16 getWidth() const { return _surface->w; }
Modified: scummvm/trunk/graphics/video/qt_decoder.cpp
===================================================================
--- scummvm/trunk/graphics/video/qt_decoder.cpp 2010-12-15 23:52:24 UTC (rev 54926)
+++ scummvm/trunk/graphics/video/qt_decoder.cpp 2010-12-16 01:35:13 UTC (rev 54927)
@@ -216,7 +216,7 @@
return _streams[_videoStreamIndex]->stsdEntries[0].videoCodec;
}
-Surface *QuickTimeDecoder::decodeNextFrame() {
+const Surface *QuickTimeDecoder::decodeNextFrame() {
if (_videoStreamIndex < 0 || _curFrame >= (int32)getFrameCount() - 1)
return 0;
Modified: scummvm/trunk/graphics/video/qt_decoder.h
===================================================================
--- scummvm/trunk/graphics/video/qt_decoder.h 2010-12-15 23:52:24 UTC (rev 54926)
+++ scummvm/trunk/graphics/video/qt_decoder.h 2010-12-16 01:35:13 UTC (rev 54927)
@@ -107,7 +107,7 @@
void setChunkBeginOffset(uint32 offset) { _beginOffset = offset; }
bool isVideoLoaded() const { return _fd != 0; }
- Surface *decodeNextFrame();
+ const Surface *decodeNextFrame();
bool endOfVideo() const;
uint32 getElapsedTime() const;
uint32 getTimeToNextFrame() const;
Modified: scummvm/trunk/graphics/video/smk_decoder.cpp
===================================================================
--- scummvm/trunk/graphics/video/smk_decoder.cpp 2010-12-15 23:52:24 UTC (rev 54926)
+++ scummvm/trunk/graphics/video/smk_decoder.cpp 2010-12-16 01:35:13 UTC (rev 54927)
@@ -519,7 +519,7 @@
reset();
}
-Surface *SmackerDecoder::decodeNextFrame() {
+const Surface *SmackerDecoder::decodeNextFrame() {
uint i;
uint32 chunkSize = 0;
uint32 dataSizeUnpacked = 0;
Modified: scummvm/trunk/graphics/video/smk_decoder.h
===================================================================
--- scummvm/trunk/graphics/video/smk_decoder.h 2010-12-15 23:52:24 UTC (rev 54926)
+++ scummvm/trunk/graphics/video/smk_decoder.h 2010-12-16 01:35:13 UTC (rev 54927)
@@ -65,7 +65,7 @@
uint16 getHeight() const { return _surface->h; }
uint32 getFrameCount() const { return _frameCount; }
uint32 getElapsedTime() const;
- Surface *decodeNextFrame();
+ const Surface *decodeNextFrame();
PixelFormat getPixelFormat() const { return PixelFormat::createFormatCLUT8(); }
byte *getPalette() { _dirtyPalette = false; return _palette; }
bool hasDirtyPalette() const { return _dirtyPalette; }
Modified: scummvm/trunk/graphics/video/video_decoder.h
===================================================================
--- scummvm/trunk/graphics/video/video_decoder.h 2010-12-15 23:52:24 UTC (rev 54926)
+++ scummvm/trunk/graphics/video/video_decoder.h 2010-12-16 01:35:13 UTC (rev 54927)
@@ -109,7 +109,7 @@
* @note the return surface should *not* be freed
* @note this may return 0, in which case the last frame should be kept on screen
*/
- virtual Surface *decodeNextFrame() = 0;
+ virtual const Surface *decodeNextFrame() = 0;
/**
* Get the pixel format of the video
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list