aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/agi/detection.cpp1
-rw-r--r--engines/agi/saveload.cpp3
-rw-r--r--engines/gob/videoplayer.cpp2
-rw-r--r--engines/gob/videoplayer.h2
-rw-r--r--engines/kyra/saveload.cpp1
-rw-r--r--engines/lastexpress/data/animation.cpp1
-rw-r--r--engines/lastexpress/data/animation.h5
-rw-r--r--engines/lastexpress/data/background.cpp2
-rw-r--r--engines/lastexpress/data/background.h4
-rw-r--r--engines/lastexpress/data/cursor.cpp1
-rw-r--r--engines/lastexpress/data/cursor.h4
-rw-r--r--engines/lastexpress/data/font.cpp1
-rw-r--r--engines/lastexpress/data/font.h5
-rw-r--r--engines/lastexpress/data/scene.cpp2
-rw-r--r--engines/lastexpress/data/scene.h5
-rw-r--r--engines/lastexpress/data/sequence.cpp2
-rw-r--r--engines/lastexpress/data/sequence.h5
-rw-r--r--engines/lastexpress/data/snd.h5
-rw-r--r--engines/lastexpress/data/subtitle.cpp1
-rw-r--r--engines/lastexpress/data/subtitle.h5
-rw-r--r--engines/sci/detection.cpp1
-rw-r--r--engines/sci/video/seq_decoder.cpp1
-rw-r--r--engines/sword1/detection.cpp1
-rw-r--r--graphics/dither.cpp4
-rw-r--r--graphics/dither.h6
-rw-r--r--graphics/imagedec.cpp1
-rw-r--r--graphics/imagedec.h8
-rw-r--r--graphics/jpeg.cpp1
-rw-r--r--graphics/jpeg.h5
-rw-r--r--graphics/sjis.cpp7
-rw-r--r--graphics/sjis.h9
-rw-r--r--graphics/thumbnail.cpp1
-rw-r--r--graphics/thumbnail.h10
-rw-r--r--graphics/video/codecs/codec.h5
-rw-r--r--graphics/video/codecs/mjpeg.h1
-rw-r--r--graphics/video/codecs/msrle.cpp1
-rw-r--r--graphics/video/codecs/msvideo1.cpp1
-rw-r--r--graphics/video/codecs/rpza.cpp1
-rw-r--r--graphics/video/codecs/smc.cpp1
-rw-r--r--graphics/video/codecs/truemotion1.cpp1
-rw-r--r--graphics/video/coktel_decoder.cpp5
-rw-r--r--graphics/video/coktel_decoder.h4
-rw-r--r--graphics/video/dxa_decoder.cpp1
-rw-r--r--graphics/video/qt_decoder.cpp19
-rw-r--r--graphics/video/qt_decoder.h12
-rw-r--r--graphics/video/video_decoder.h1
46 files changed, 124 insertions, 41 deletions
diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp
index 14ef169c48..6e9a996756 100644
--- a/engines/agi/detection.cpp
+++ b/engines/agi/detection.cpp
@@ -30,6 +30,7 @@
#include "common/file.h"
#include "common/savefile.h"
#include "graphics/thumbnail.h"
+#include "graphics/surface.h"
#include "agi/agi.h"
#include "agi/preagi.h"
diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp
index 1a968816d4..94df063609 100644
--- a/engines/agi/saveload.cpp
+++ b/engines/agi/saveload.cpp
@@ -29,9 +29,10 @@
//
#include "common/file.h"
-#include "graphics/thumbnail.h"
#include "common/config-manager.h"
#include "common/savefile.h"
+#include "graphics/thumbnail.h"
+#include "graphics/surface.h"
#include "agi/agi.h"
#include "agi/graphics.h"
diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp
index 917bdc66c5..3d29c2ce26 100644
--- a/engines/gob/videoplayer.cpp
+++ b/engines/gob/videoplayer.cpp
@@ -500,7 +500,7 @@ bool VideoPlayer::hasEmbeddedFile(const Common::String &fileName, int slot) cons
return video->decoder->hasEmbeddedFile(fileName);
}
-Common::MemoryReadStream *VideoPlayer::getEmbeddedFile(const Common::String &fileName, int slot) {
+Common::SeekableReadStream *VideoPlayer::getEmbeddedFile(const Common::String &fileName, int slot) {
const Video *video = getVideoBySlot(slot);
if (!video)
return 0;
diff --git a/engines/gob/videoplayer.h b/engines/gob/videoplayer.h
index c154254455..45b3a7b82d 100644
--- a/engines/gob/videoplayer.h
+++ b/engines/gob/videoplayer.h
@@ -121,7 +121,7 @@ public:
const Common::List<Common::Rect> *getDirtyRects(int slot = 0) const;
bool hasEmbeddedFile(const Common::String &fileName, int slot = 0) const;
- Common::MemoryReadStream *getEmbeddedFile(const Common::String &fileName, int slot = 0);
+ Common::SeekableReadStream *getEmbeddedFile(const Common::String &fileName, int slot = 0);
int32 getSubtitleIndex(int slot = 0) const;
diff --git a/engines/kyra/saveload.cpp b/engines/kyra/saveload.cpp
index c5658c0445..cd5ef52b92 100644
--- a/engines/kyra/saveload.cpp
+++ b/engines/kyra/saveload.cpp
@@ -27,6 +27,7 @@
#include "common/savefile.h"
#include "common/system.h"
#include "graphics/thumbnail.h"
+#include "graphics/surface.h"
#include "kyra/kyra_v1.h"
#include "kyra/util.h"
diff --git a/engines/lastexpress/data/animation.cpp b/engines/lastexpress/data/animation.cpp
index 5ac9f8bf00..f3179749c0 100644
--- a/engines/lastexpress/data/animation.cpp
+++ b/engines/lastexpress/data/animation.cpp
@@ -35,6 +35,7 @@
#include "common/events.h"
#include "common/rational.h"
+#include "common/stream.h"
#include "engines/engine.h"
diff --git a/engines/lastexpress/data/animation.h b/engines/lastexpress/data/animation.h
index 435621eb8e..9bc2ba99cb 100644
--- a/engines/lastexpress/data/animation.h
+++ b/engines/lastexpress/data/animation.h
@@ -41,7 +41,10 @@
#include "lastexpress/drawable.h"
#include "common/array.h"
-#include "common/stream.h"
+
+namespace Common {
+class SeekableReadStream;
+}
namespace LastExpress {
diff --git a/engines/lastexpress/data/background.cpp b/engines/lastexpress/data/background.cpp
index 94d7fb16c3..8b0d338f64 100644
--- a/engines/lastexpress/data/background.cpp
+++ b/engines/lastexpress/data/background.cpp
@@ -31,6 +31,8 @@
#include "lastexpress/debug.h"
+#include "common/stream.h"
+
namespace LastExpress {
Background::Background() : _data(NULL) {
diff --git a/engines/lastexpress/data/background.h b/engines/lastexpress/data/background.h
index 5fbdbc13ed..994b216ff9 100644
--- a/engines/lastexpress/data/background.h
+++ b/engines/lastexpress/data/background.h
@@ -46,7 +46,9 @@
#include "lastexpress/drawable.h"
-#include "common/stream.h"
+namespace Common {
+class SeekableReadStream;
+}
namespace LastExpress {
diff --git a/engines/lastexpress/data/cursor.cpp b/engines/lastexpress/data/cursor.cpp
index 4e7003578a..5489fc3d21 100644
--- a/engines/lastexpress/data/cursor.cpp
+++ b/engines/lastexpress/data/cursor.cpp
@@ -27,6 +27,7 @@
#include "lastexpress/lastexpress.h"
+#include "common/stream.h"
#include "common/system.h"
#include "graphics/cursorman.h"
diff --git a/engines/lastexpress/data/cursor.h b/engines/lastexpress/data/cursor.h
index 992266569f..0e9556aa6e 100644
--- a/engines/lastexpress/data/cursor.h
+++ b/engines/lastexpress/data/cursor.h
@@ -43,7 +43,9 @@
#include "lastexpress/shared.h"
-#include "common/stream.h"
+namespace Common {
+class SeekableReadStream;
+}
namespace LastExpress {
diff --git a/engines/lastexpress/data/font.cpp b/engines/lastexpress/data/font.cpp
index 5f4b3b40b8..99239606ab 100644
--- a/engines/lastexpress/data/font.cpp
+++ b/engines/lastexpress/data/font.cpp
@@ -25,6 +25,7 @@
#include "lastexpress/data/font.h"
+#include "common/stream.h"
#include "common/system.h"
namespace LastExpress {
diff --git a/engines/lastexpress/data/font.h b/engines/lastexpress/data/font.h
index 457c0c3432..d49db35ba5 100644
--- a/engines/lastexpress/data/font.h
+++ b/engines/lastexpress/data/font.h
@@ -39,9 +39,12 @@
byte {x} - Unknown data (probably just garbage)
*/
-#include "common/stream.h"
#include "graphics/surface.h"
+namespace Common {
+class SeekableReadStream;
+}
+
namespace LastExpress {
class Font {
diff --git a/engines/lastexpress/data/scene.cpp b/engines/lastexpress/data/scene.cpp
index 47266358f2..5a943982c4 100644
--- a/engines/lastexpress/data/scene.cpp
+++ b/engines/lastexpress/data/scene.cpp
@@ -31,6 +31,8 @@
#include "lastexpress/lastexpress.h"
#include "lastexpress/resource.h"
+#include "common/stream.h"
+
namespace LastExpress {
SceneHotspot::~SceneHotspot() {
diff --git a/engines/lastexpress/data/scene.h b/engines/lastexpress/data/scene.h
index d4c8e7d0da..7fc9425f28 100644
--- a/engines/lastexpress/data/scene.h
+++ b/engines/lastexpress/data/scene.h
@@ -72,7 +72,10 @@
#include "lastexpress/shared.h"
#include "common/array.h"
-#include "common/stream.h"
+
+namespace Common {
+class SeekableReadStream;
+}
namespace LastExpress {
diff --git a/engines/lastexpress/data/sequence.cpp b/engines/lastexpress/data/sequence.cpp
index cf71bd6a61..2308d70a2b 100644
--- a/engines/lastexpress/data/sequence.cpp
+++ b/engines/lastexpress/data/sequence.cpp
@@ -29,6 +29,8 @@
#include "lastexpress/debug.h"
+#include "common/stream.h"
+
namespace LastExpress {
void FrameInfo::read(Common::SeekableReadStream *in, bool isSequence) {
diff --git a/engines/lastexpress/data/sequence.h b/engines/lastexpress/data/sequence.h
index 25170993df..7ad0a57254 100644
--- a/engines/lastexpress/data/sequence.h
+++ b/engines/lastexpress/data/sequence.h
@@ -77,7 +77,10 @@
#include "lastexpress/shared.h"
#include "common/array.h"
-#include "common/stream.h"
+
+namespace Common {
+class SeekableReadStream;
+}
namespace LastExpress {
diff --git a/engines/lastexpress/data/snd.h b/engines/lastexpress/data/snd.h
index 2e0bc8c1b0..f76f8ff6ca 100644
--- a/engines/lastexpress/data/snd.h
+++ b/engines/lastexpress/data/snd.h
@@ -39,7 +39,6 @@
byte {x} - IMA ADPCM sample codes
*/
-#include "common/stream.h"
#include "sound/mixer.h"
namespace Audio {
@@ -47,6 +46,10 @@ namespace Audio {
class QueuingAudioStream;
}
+namespace Common {
+class SeekableReadStream;
+}
+
namespace LastExpress {
class SimpleSound {
diff --git a/engines/lastexpress/data/subtitle.cpp b/engines/lastexpress/data/subtitle.cpp
index 67d6445ab9..953edd1d1a 100644
--- a/engines/lastexpress/data/subtitle.cpp
+++ b/engines/lastexpress/data/subtitle.cpp
@@ -33,6 +33,7 @@
#include "lastexpress/debug.h"
#include "common/debug.h"
+#include "common/stream.h"
namespace LastExpress {
diff --git a/engines/lastexpress/data/subtitle.h b/engines/lastexpress/data/subtitle.h
index 9acb7068f1..6d8e7535cb 100644
--- a/engines/lastexpress/data/subtitle.h
+++ b/engines/lastexpress/data/subtitle.h
@@ -45,7 +45,10 @@
#include "lastexpress/drawable.h"
#include "common/array.h"
-#include "common/stream.h"
+
+namespace Common {
+class SeekableReadStream;
+}
namespace LastExpress {
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp
index 35c7a70b0e..a4914e57b4 100644
--- a/engines/sci/detection.cpp
+++ b/engines/sci/detection.cpp
@@ -29,6 +29,7 @@
#include "common/savefile.h"
#include "common/system.h"
#include "graphics/thumbnail.h"
+#include "graphics/surface.h"
#include "sci/sci.h"
#include "sci/engine/kernel.h"
diff --git a/engines/sci/video/seq_decoder.cpp b/engines/sci/video/seq_decoder.cpp
index 58fd60621d..a08f837866 100644
--- a/engines/sci/video/seq_decoder.cpp
+++ b/engines/sci/video/seq_decoder.cpp
@@ -26,6 +26,7 @@
#include "common/debug.h"
#include "common/endian.h"
#include "common/archive.h"
+#include "common/stream.h"
#include "common/system.h"
#include "common/util.h"
diff --git a/engines/sword1/detection.cpp b/engines/sword1/detection.cpp
index 9fc24e75e8..855c7d1f83 100644
--- a/engines/sword1/detection.cpp
+++ b/engines/sword1/detection.cpp
@@ -33,6 +33,7 @@
#include "common/savefile.h"
#include "common/system.h"
#include "graphics/thumbnail.h"
+#include "graphics/surface.h"
#include "engines/metaengine.h"
diff --git a/graphics/dither.cpp b/graphics/dither.cpp
index 7a92441571..6a37679b0a 100644
--- a/graphics/dither.cpp
+++ b/graphics/dither.cpp
@@ -22,9 +22,11 @@
* $Id$
*/
-#include "common/endian.h"
#include "graphics/dither.h"
+#include "common/endian.h"
+#include "common/stream.h"
+
namespace Graphics {
PaletteLUT::PaletteLUT(byte depth, PaletteFormat format) {
diff --git a/graphics/dither.h b/graphics/dither.h
index 1239ba08e8..e5f67b9c71 100644
--- a/graphics/dither.h
+++ b/graphics/dither.h
@@ -26,7 +26,11 @@
#define GRAPHICS_DITHER_H
#include "common/util.h"
-#include "common/stream.h"
+
+namespace Common {
+class SeekableReadStream;
+class WriteStream;
+}
namespace Graphics {
diff --git a/graphics/imagedec.cpp b/graphics/imagedec.cpp
index b38799c45a..a4d2fbc1cf 100644
--- a/graphics/imagedec.cpp
+++ b/graphics/imagedec.cpp
@@ -23,6 +23,7 @@
*/
#include "graphics/imagedec.h"
+#include "graphics/surface.h"
#include "common/file.h"
diff --git a/graphics/imagedec.h b/graphics/imagedec.h
index f3cc5a6e6b..13aa63a153 100644
--- a/graphics/imagedec.h
+++ b/graphics/imagedec.h
@@ -27,13 +27,17 @@
#include "common/scummsys.h"
#include "common/str.h"
-#include "common/stream.h"
-#include "graphics/surface.h"
#include "graphics/pixelformat.h"
+namespace Common{
+class SeekableReadStream;
+}
+
namespace Graphics {
+struct Surface;
+
class ImageDecoder {
public:
ImageDecoder() {}
diff --git a/graphics/jpeg.cpp b/graphics/jpeg.cpp
index fbc81b5db2..bb6da33cfe 100644
--- a/graphics/jpeg.cpp
+++ b/graphics/jpeg.cpp
@@ -27,6 +27,7 @@
#include "common/endian.h"
#include "common/util.h"
+#include "common/stream.h"
namespace Graphics {
diff --git a/graphics/jpeg.h b/graphics/jpeg.h
index ae4ed22f04..f91355e329 100644
--- a/graphics/jpeg.h
+++ b/graphics/jpeg.h
@@ -26,9 +26,12 @@
#ifndef GRAPHICS_JPEG_H
#define GRAPHICS_JPEG_H
-#include "common/stream.h"
#include "graphics/surface.h"
+namespace Common {
+class SeekableReadStream;
+}
+
namespace Graphics {
#define JPEG_MAX_QUANT_TABLES 4
diff --git a/graphics/sjis.cpp b/graphics/sjis.cpp
index 06712a9226..4b9f2fac57 100644
--- a/graphics/sjis.cpp
+++ b/graphics/sjis.cpp
@@ -29,6 +29,9 @@
#include "common/debug.h"
#include "common/archive.h"
#include "common/endian.h"
+#include "common/stream.h"
+
+#include "graphics/surface.h"
namespace Graphics {
@@ -52,6 +55,10 @@ FontSJIS *FontSJIS::createFont(const Common::Platform platform) {
return 0;
}
+void FontSJIS::drawChar(Graphics::Surface &dst, uint16 ch, int x, int y, uint32 c1, uint32 c2) const {
+ drawChar(dst.getBasePtr(x, y), ch, dst.pitch, dst.bytesPerPixel, c1, c2, dst.w - x, dst.h - y);
+}
+
template<typename Color>
void FontSJISBase::blitCharacter(const uint8 *glyph, const int w, const int h, uint8 *dst, int pitch, Color c) const {
for (int y = 0; y < h; ++y) {
diff --git a/graphics/sjis.h b/graphics/sjis.h
index 365e63e470..86bc167b52 100644
--- a/graphics/sjis.h
+++ b/graphics/sjis.h
@@ -46,13 +46,12 @@
#endif
#include "common/scummsys.h"
-#include "common/stream.h"
#include "common/util.h"
-#include "graphics/surface.h"
-
namespace Graphics {
+struct Surface;
+
/**
* A font that is able to draw SJIS encoded characters.
*/
@@ -116,9 +115,7 @@ public:
/**
* Draws a SJIS encoded character on the given surface.
*/
- void drawChar(Graphics::Surface &dst, uint16 ch, int x, int y, uint32 c1, uint32 c2) const {
- drawChar(dst.getBasePtr(x, y), ch, dst.pitch, dst.bytesPerPixel, c1, c2, dst.w - x, dst.h - y);
- }
+ void drawChar(Graphics::Surface &dst, uint16 ch, int x, int y, uint32 c1, uint32 c2) const;
/**
* Draws a SJIS char on the given raw buffer.
diff --git a/graphics/thumbnail.cpp b/graphics/thumbnail.cpp
index ccde78806d..b245cfc5fa 100644
--- a/graphics/thumbnail.cpp
+++ b/graphics/thumbnail.cpp
@@ -27,6 +27,7 @@
#include "graphics/colormasks.h"
#include "common/endian.h"
#include "common/system.h"
+#include "common/stream.h"
namespace Graphics {
diff --git a/graphics/thumbnail.h b/graphics/thumbnail.h
index 9341582aa1..0bfeeda2ed 100644
--- a/graphics/thumbnail.h
+++ b/graphics/thumbnail.h
@@ -25,11 +25,17 @@
#ifndef GRAPHICS_THUMBNAIL_H
#define GRAPHICS_THUMBNAIL_H
-#include "common/stream.h"
-#include "graphics/surface.h"
+#include "common/scummsys.h"
+
+namespace Common{
+class SeekableReadStream;
+class WriteStream;
+}
namespace Graphics {
+struct Surface;
+
/**
* Checks for presence of the thumbnail save header.
* Seeks automatically back to start position after check.
diff --git a/graphics/video/codecs/codec.h b/graphics/video/codecs/codec.h
index 4a280a81df..802671a037 100644
--- a/graphics/video/codecs/codec.h
+++ b/graphics/video/codecs/codec.h
@@ -26,10 +26,13 @@
#ifndef GRAPHICS_CODEC_H
#define GRAPHICS_CODEC_H
-#include "common/stream.h"
#include "graphics/surface.h"
#include "graphics/pixelformat.h"
+namespace Common{
+class SeekableReadStream;
+}
+
namespace Graphics {
class Codec {
diff --git a/graphics/video/codecs/mjpeg.h b/graphics/video/codecs/mjpeg.h
index ab364fb5be..8b0a03609b 100644
--- a/graphics/video/codecs/mjpeg.h
+++ b/graphics/video/codecs/mjpeg.h
@@ -27,7 +27,6 @@
#define GRAPHICS_MJPEG_H
#include "common/scummsys.h"
-#include "common/stream.h"
#include "graphics/video/codecs/codec.h"
#include "graphics/jpeg.h"
diff --git a/graphics/video/codecs/msrle.cpp b/graphics/video/codecs/msrle.cpp
index 64099430d3..f7dcaf7467 100644
--- a/graphics/video/codecs/msrle.cpp
+++ b/graphics/video/codecs/msrle.cpp
@@ -26,6 +26,7 @@
// Based off ffmpeg's msrledec.c
#include "graphics/video/codecs/msrle.h"
+#include "common/stream.h"
namespace Graphics {
diff --git a/graphics/video/codecs/msvideo1.cpp b/graphics/video/codecs/msvideo1.cpp
index f37bdbbf95..8cb1e75058 100644
--- a/graphics/video/codecs/msvideo1.cpp
+++ b/graphics/video/codecs/msvideo1.cpp
@@ -26,6 +26,7 @@
// Based off ffmpeg's msvideo.cpp
#include "graphics/video/codecs/msvideo1.h"
+#include "common/stream.h"
namespace Graphics {
diff --git a/graphics/video/codecs/rpza.cpp b/graphics/video/codecs/rpza.cpp
index f0ed72e730..050f2a5bcf 100644
--- a/graphics/video/codecs/rpza.cpp
+++ b/graphics/video/codecs/rpza.cpp
@@ -28,6 +28,7 @@
#include "graphics/video/codecs/rpza.h"
#include "common/system.h"
+#include "common/stream.h"
#include "graphics/colormasks.h"
namespace Graphics {
diff --git a/graphics/video/codecs/smc.cpp b/graphics/video/codecs/smc.cpp
index 4661e3dc84..6e4914b6f0 100644
--- a/graphics/video/codecs/smc.cpp
+++ b/graphics/video/codecs/smc.cpp
@@ -26,6 +26,7 @@
// Based off ffmpeg's SMC decoder
#include "graphics/video/codecs/smc.h"
+#include "common/stream.h"
namespace Graphics {
diff --git a/graphics/video/codecs/truemotion1.cpp b/graphics/video/codecs/truemotion1.cpp
index 81ac857367..fde9f5c2c8 100644
--- a/graphics/video/codecs/truemotion1.cpp
+++ b/graphics/video/codecs/truemotion1.cpp
@@ -30,6 +30,7 @@
#ifdef GRAPHICS_TRUEMOTION1_H
#include "graphics/video/codecs/truemotion1data.h"
+#include "common/stream.h"
namespace Graphics {
diff --git a/graphics/video/coktel_decoder.cpp b/graphics/video/coktel_decoder.cpp
index 15ba049536..0247630579 100644
--- a/graphics/video/coktel_decoder.cpp
+++ b/graphics/video/coktel_decoder.cpp
@@ -31,6 +31,7 @@
#include "sound/audiostream.h"
#include "sound/decoders/raw.h"
+#include "common/stream.h"
static const uint32 kVideoCodecIndeo3 = MKID_BE('iv32');
@@ -219,7 +220,7 @@ bool CoktelDecoder::hasEmbeddedFile(const Common::String &fileName) const {
return false;
}
-Common::MemoryReadStream *CoktelDecoder::getEmbeddedFile(const Common::String &fileName) const {
+Common::SeekableReadStream *CoktelDecoder::getEmbeddedFile(const Common::String &fileName) const {
return 0;
}
@@ -2440,7 +2441,7 @@ bool VMDDecoder::hasEmbeddedFile(const Common::String &fileName) const {
return false;
}
-Common::MemoryReadStream *VMDDecoder::getEmbeddedFile(const Common::String &fileName) const {
+Common::SeekableReadStream *VMDDecoder::getEmbeddedFile(const Common::String &fileName) const {
const File *file = 0;
for (Common::Array<File>::const_iterator it = _files.begin(); it != _files.end(); ++it)
diff --git a/graphics/video/coktel_decoder.h b/graphics/video/coktel_decoder.h
index 97be9df44b..548e313937 100644
--- a/graphics/video/coktel_decoder.h
+++ b/graphics/video/coktel_decoder.h
@@ -108,7 +108,7 @@ public:
virtual bool hasEmbeddedFile(const Common::String &fileName) const;
/** Return that embedded file. */
- virtual Common::MemoryReadStream *getEmbeddedFile(const Common::String &fileName) const;
+ virtual Common::SeekableReadStream *getEmbeddedFile(const Common::String &fileName) const;
/** Return the current subtitle index. */
virtual int32 getSubtitleIndex() const;
@@ -352,7 +352,7 @@ public:
bool hasEmbeddedFiles() const;
bool hasEmbeddedFile(const Common::String &fileName) const;
- Common::MemoryReadStream *getEmbeddedFile(const Common::String &fileName) const;
+ Common::SeekableReadStream *getEmbeddedFile(const Common::String &fileName) const;
int32 getSubtitleIndex() const;
diff --git a/graphics/video/dxa_decoder.cpp b/graphics/video/dxa_decoder.cpp
index 5066e8cf37..1f7ccc3640 100644
--- a/graphics/video/dxa_decoder.cpp
+++ b/graphics/video/dxa_decoder.cpp
@@ -27,6 +27,7 @@
#include "common/endian.h"
#include "common/archive.h"
#include "common/system.h"
+#include "common/stream.h"
#include "common/util.h"
#include "graphics/video/dxa_decoder.h"
diff --git a/graphics/video/qt_decoder.cpp b/graphics/video/qt_decoder.cpp
index 8437f0af43..f4ecf551d6 100644
--- a/graphics/video/qt_decoder.cpp
+++ b/graphics/video/qt_decoder.cpp
@@ -1331,4 +1331,23 @@ void QuickTimeDecoder::updateAudioBuffer() {
}
}
+QuickTimeDecoder::MOVStreamContext::MOVStreamContext() {
+ // FIXME: Setting all members to 0 via memset is a hack -- it works
+ // because the only non-POD member of MOVStreamContext is of type
+ // Common::Rational, and that luckily has no virtual methods nor
+ // does it keep internal pointers or anything like that. But watch
+ // out if you ever extend MOVStreamContext!
+ memset(this, 0, sizeof(MOVStreamContext));
+}
+
+QuickTimeDecoder::MOVStreamContext::~MOVStreamContext() {
+ delete[] chunk_offsets;
+ delete[] stts_data;
+ delete[] ctts_data;
+ delete[] sample_to_chunk;
+ delete[] sample_sizes;
+ delete[] keyframes;
+ delete extradata;
+}
+
} // End of namespace Graphics
diff --git a/graphics/video/qt_decoder.h b/graphics/video/qt_decoder.h
index 6dcfc0944d..86a092f9a1 100644
--- a/graphics/video/qt_decoder.h
+++ b/graphics/video/qt_decoder.h
@@ -155,16 +155,8 @@ protected:
};
struct MOVStreamContext {
- MOVStreamContext() { memset(this, 0, sizeof(MOVStreamContext)); }
- ~MOVStreamContext() {
- delete[] chunk_offsets;
- delete[] stts_data;
- delete[] ctts_data;
- delete[] sample_to_chunk;
- delete[] sample_sizes;
- delete[] keyframes;
- delete extradata;
- }
+ MOVStreamContext();
+ ~MOVStreamContext();
int ffindex; /* the ffmpeg stream id */
int is_ff_stream; /* Is this stream presented to ffmpeg ? i.e. is this an audio or video stream ? */
diff --git a/graphics/video/video_decoder.h b/graphics/video/video_decoder.h
index a398a62009..4ad7ae054f 100644
--- a/graphics/video/video_decoder.h
+++ b/graphics/video/video_decoder.h
@@ -29,7 +29,6 @@
#include "common/events.h"
#include "common/list.h"
#include "common/rational.h"
-#include "common/stream.h"
#include "graphics/surface.h"
#include "graphics/pixelformat.h"