aboutsummaryrefslogtreecommitdiff
path: root/graphics/video
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/video')
-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
13 files changed, 36 insertions, 17 deletions
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"