aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorMatthew Hoops2010-12-16 01:35:13 +0000
committerMatthew Hoops2010-12-16 01:35:13 +0000
commit375f32fbe94e8500a03c19ed32865efdcde8ca8e (patch)
tree3544a3da06401aea4192a7557294b61734e4d1ef /graphics
parenta2bb676c19c70cd79f141650fe0587148c71702b (diff)
downloadscummvm-rg350-375f32fbe94e8500a03c19ed32865efdcde8ca8e.tar.gz
scummvm-rg350-375f32fbe94e8500a03c19ed32865efdcde8ca8e.tar.bz2
scummvm-rg350-375f32fbe94e8500a03c19ed32865efdcde8ca8e.zip
VIDEO: Make VideoDecoder::decodeNextFrame() return a const Surface pointer
svn-id: r54927
Diffstat (limited to 'graphics')
-rw-r--r--graphics/video/avi_decoder.cpp6
-rw-r--r--graphics/video/avi_decoder.h2
-rw-r--r--graphics/video/coktel_decoder.cpp6
-rw-r--r--graphics/video/coktel_decoder.h6
-rw-r--r--graphics/video/dxa_decoder.cpp2
-rw-r--r--graphics/video/dxa_decoder.h2
-rw-r--r--graphics/video/flic_decoder.cpp2
-rw-r--r--graphics/video/flic_decoder.h2
-rw-r--r--graphics/video/qt_decoder.cpp2
-rw-r--r--graphics/video/qt_decoder.h2
-rw-r--r--graphics/video/smk_decoder.cpp2
-rw-r--r--graphics/video/smk_decoder.h2
-rw-r--r--graphics/video/video_decoder.h2
13 files changed, 19 insertions, 19 deletions
diff --git a/graphics/video/avi_decoder.cpp b/graphics/video/avi_decoder.cpp
index aa6844a498..c1346bbe12 100644
--- a/graphics/video/avi_decoder.cpp
+++ b/graphics/video/avi_decoder.cpp
@@ -316,7 +316,7 @@ uint32 AviDecoder::getElapsedTime() const {
return VideoDecoder::getElapsedTime();
}
-Surface *AviDecoder::decodeNextFrame() {
+const Surface *AviDecoder::decodeNextFrame() {
uint32 nextTag = _fileStream->readUint32BE();
if (_fileStream->eos())
@@ -334,9 +334,9 @@ Surface *AviDecoder::decodeNextFrame() {
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;
}
diff --git a/graphics/video/avi_decoder.h b/graphics/video/avi_decoder.h
index 91c6f8edd3..306b32a076 100644
--- a/graphics/video/avi_decoder.h
+++ b/graphics/video/avi_decoder.h
@@ -176,7 +176,7 @@ public:
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; }
diff --git a/graphics/video/coktel_decoder.cpp b/graphics/video/coktel_decoder.cpp
index 394e96d7ac..bcde7ff51e 100644
--- a/graphics/video/coktel_decoder.cpp
+++ b/graphics/video/coktel_decoder.cpp
@@ -669,7 +669,7 @@ bool PreIMDDecoder::isVideoLoaded() const {
return _stream != 0;
}
-Surface *PreIMDDecoder::decodeNextFrame() {
+const Surface *PreIMDDecoder::decodeNextFrame() {
if (!isVideoLoaded() || endOfVideo())
return 0;
@@ -1128,7 +1128,7 @@ bool IMDDecoder::isVideoLoaded() const {
return _stream != 0;
}
-Surface *IMDDecoder::decodeNextFrame() {
+const Surface *IMDDecoder::decodeNextFrame() {
if (!isVideoLoaded() || endOfVideo())
return 0;
@@ -1925,7 +1925,7 @@ bool VMDDecoder::isVideoLoaded() const {
return _stream != 0;
}
-Surface *VMDDecoder::decodeNextFrame() {
+const Surface *VMDDecoder::decodeNextFrame() {
if (!isVideoLoaded() || endOfVideo())
return 0;
diff --git a/graphics/video/coktel_decoder.h b/graphics/video/coktel_decoder.h
index 548e313937..7b54c80304 100644
--- a/graphics/video/coktel_decoder.h
+++ b/graphics/video/coktel_decoder.h
@@ -227,7 +227,7 @@ public:
bool isVideoLoaded() const;
- Surface *decodeNextFrame();
+ const Surface *decodeNextFrame();
PixelFormat getPixelFormat() const;
@@ -260,7 +260,7 @@ public:
bool isVideoLoaded() const;
- Surface *decodeNextFrame();
+ const Surface *decodeNextFrame();
PixelFormat getPixelFormat() const;
@@ -364,7 +364,7 @@ public:
bool isVideoLoaded() const;
- Surface *decodeNextFrame();
+ const Surface *decodeNextFrame();
PixelFormat getPixelFormat() const;
diff --git a/graphics/video/dxa_decoder.cpp b/graphics/video/dxa_decoder.cpp
index 1f7ccc3640..3c52c0fc58 100644
--- a/graphics/video/dxa_decoder.cpp
+++ b/graphics/video/dxa_decoder.cpp
@@ -477,7 +477,7 @@ void DXADecoder::decode13(int size) {
#endif
}
-Surface *DXADecoder::decodeNextFrame() {
+const Surface *DXADecoder::decodeNextFrame() {
uint32 tag = _fileStream->readUint32BE();
if (tag == MKID_BE('CMAP')) {
_fileStream->read(_palette, 256 * 3);
diff --git a/graphics/video/dxa_decoder.h b/graphics/video/dxa_decoder.h
index eb4426dbbc..e4688e36cd 100644
--- a/graphics/video/dxa_decoder.h
+++ b/graphics/video/dxa_decoder.h
@@ -50,7 +50,7 @@ public:
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; }
diff --git a/graphics/video/flic_decoder.cpp b/graphics/video/flic_decoder.cpp
index f55a74f4f3..51c487861e 100644
--- a/graphics/video/flic_decoder.cpp
+++ b/graphics/video/flic_decoder.cpp
@@ -194,7 +194,7 @@ void FlicDecoder::decodeDeltaFLC(uint8 *data) {
#define PSTAMP 18
#define FRAME_TYPE 0xF1FA
-Surface *FlicDecoder::decodeNextFrame() {
+const Surface *FlicDecoder::decodeNextFrame() {
// Read chunk
uint32 frameSize = _fileStream->readUint32LE();
uint16 frameType = _fileStream->readUint16LE();
diff --git a/graphics/video/flic_decoder.h b/graphics/video/flic_decoder.h
index bba1403c22..b716a87b62 100644
--- a/graphics/video/flic_decoder.h
+++ b/graphics/video/flic_decoder.h
@@ -59,7 +59,7 @@ public:
* @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; }
diff --git a/graphics/video/qt_decoder.cpp b/graphics/video/qt_decoder.cpp
index 4c7b95abf5..e7c1c3cab1 100644
--- a/graphics/video/qt_decoder.cpp
+++ b/graphics/video/qt_decoder.cpp
@@ -216,7 +216,7 @@ Codec *QuickTimeDecoder::findDefaultVideoCodec() const {
return _streams[_videoStreamIndex]->stsdEntries[0].videoCodec;
}
-Surface *QuickTimeDecoder::decodeNextFrame() {
+const Surface *QuickTimeDecoder::decodeNextFrame() {
if (_videoStreamIndex < 0 || _curFrame >= (int32)getFrameCount() - 1)
return 0;
diff --git a/graphics/video/qt_decoder.h b/graphics/video/qt_decoder.h
index 6198c2e24b..e409ebb55d 100644
--- a/graphics/video/qt_decoder.h
+++ b/graphics/video/qt_decoder.h
@@ -107,7 +107,7 @@ public:
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;
diff --git a/graphics/video/smk_decoder.cpp b/graphics/video/smk_decoder.cpp
index de1eb4436f..e4d577acd2 100644
--- a/graphics/video/smk_decoder.cpp
+++ b/graphics/video/smk_decoder.cpp
@@ -519,7 +519,7 @@ void SmackerDecoder::close() {
reset();
}
-Surface *SmackerDecoder::decodeNextFrame() {
+const Surface *SmackerDecoder::decodeNextFrame() {
uint i;
uint32 chunkSize = 0;
uint32 dataSizeUnpacked = 0;
diff --git a/graphics/video/smk_decoder.h b/graphics/video/smk_decoder.h
index 5faeab4343..da64927b49 100644
--- a/graphics/video/smk_decoder.h
+++ b/graphics/video/smk_decoder.h
@@ -65,7 +65,7 @@ public:
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; }
diff --git a/graphics/video/video_decoder.h b/graphics/video/video_decoder.h
index 4ad7ae054f..a84253ac2b 100644
--- a/graphics/video/video_decoder.h
+++ b/graphics/video/video_decoder.h
@@ -109,7 +109,7 @@ public:
* @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