aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Hoops2012-08-12 08:58:00 -0400
committerMatthew Hoops2012-08-12 08:58:00 -0400
commit7831225b280d08779bc0d40e76bbbef1e183471a (patch)
tree17bf8613fdea61e95a61f1081c417fb0a1d4fbd7
parent5db42076b87766d29cbcdd153446992bc661aa73 (diff)
downloadscummvm-rg350-7831225b280d08779bc0d40e76bbbef1e183471a.tar.gz
scummvm-rg350-7831225b280d08779bc0d40e76bbbef1e183471a.tar.bz2
scummvm-rg350-7831225b280d08779bc0d40e76bbbef1e183471a.zip
VIDEO: Move TheoraDecoder to video/
-rw-r--r--engines/sword25/fmv/movieplayer.h4
-rw-r--r--engines/sword25/module.mk5
-rw-r--r--video/module.mk5
-rw-r--r--video/theora_decoder.cpp (renamed from engines/sword25/fmv/theora_decoder.cpp)12
-rw-r--r--video/theora_decoder.h (renamed from engines/sword25/fmv/theora_decoder.h)12
5 files changed, 18 insertions, 20 deletions
diff --git a/engines/sword25/fmv/movieplayer.h b/engines/sword25/fmv/movieplayer.h
index 1d256e56ba..2f5614b505 100644
--- a/engines/sword25/fmv/movieplayer.h
+++ b/engines/sword25/fmv/movieplayer.h
@@ -39,7 +39,7 @@
#include "sword25/gfx/bitmap.h"
#ifdef USE_THEORADEC
-#include "sword25/fmv/theora_decoder.h"
+#include "video/theora_decoder.h"
#endif
#define THEORA_INDIRECT_RENDERING
@@ -141,7 +141,7 @@ private:
#ifdef USE_THEORADEC
- TheoraDecoder _decoder;
+ Video::TheoraDecoder _decoder;
Graphics::Surface *_backSurface;
int _outX, _outY;
diff --git a/engines/sword25/module.mk b/engines/sword25/module.mk
index 302120c500..e24a221244 100644
--- a/engines/sword25/module.mk
+++ b/engines/sword25/module.mk
@@ -85,11 +85,6 @@ MODULE_OBJS := \
util/pluto/pluto.o \
util/pluto/plzio.o
-ifdef USE_THEORADEC
-MODULE_OBJS += \
- fmv/theora_decoder.o
-endif
-
# This module can be built as a plugin
ifeq ($(ENABLE_SWORD25), DYNAMIC_PLUGIN)
PLUGIN := 1
diff --git a/video/module.mk b/video/module.mk
index cebd403ca2..287e14ce18 100644
--- a/video/module.mk
+++ b/video/module.mk
@@ -26,5 +26,10 @@ MODULE_OBJS += \
bink_decoder.o
endif
+ifdef USE_THEORADEC
+MODULE_OBJS += \
+ theora_decoder.o
+endif
+
# Include common rules
include $(srcdir)/rules.mk
diff --git a/engines/sword25/fmv/theora_decoder.cpp b/video/theora_decoder.cpp
index d38f5a26cf..f3d9cad096 100644
--- a/engines/sword25/fmv/theora_decoder.cpp
+++ b/video/theora_decoder.cpp
@@ -34,17 +34,17 @@
*
*/
-#include "sword25/fmv/theora_decoder.h"
+#include "video/theora_decoder.h"
-#ifdef USE_THEORADEC
+#include "common/debug.h"
+#include "common/stream.h"
#include "common/system.h"
#include "common/textconsole.h"
#include "common/util.h"
#include "graphics/yuv_to_rgb.h"
#include "audio/decoders/raw.h"
-#include "sword25/kernel/common.h"
-namespace Sword25 {
+namespace Video {
#define AUDIOFD_FRAGSIZE 10240
@@ -560,6 +560,4 @@ void TheoraDecoder::updateBalance() {
g_system->getMixer()->setChannelBalance(*_audHandle, getBalance());
}
-} // End of namespace Sword25
-
-#endif
+} // End of namespace Video
diff --git a/engines/sword25/fmv/theora_decoder.h b/video/theora_decoder.h
index 739040024f..459fc064d3 100644
--- a/engines/sword25/fmv/theora_decoder.h
+++ b/video/theora_decoder.h
@@ -20,13 +20,13 @@
*
*/
-#ifndef SWORD25_THEORADECODER_H
-#define SWORD25_THEORADECODER_H
-
#include "common/scummsys.h" // for USE_THEORADEC
#ifdef USE_THEORADEC
+#ifndef VIDEO_THEORA_DECODER_H
+#define VIDEO_THEORA_DECODER_H
+
#include "common/rational.h"
#include "video/video_decoder.h"
#include "audio/audiostream.h"
@@ -41,7 +41,7 @@ namespace Common {
class SeekableReadStream;
}
-namespace Sword25 {
+namespace Video {
/**
*
@@ -49,7 +49,7 @@ namespace Sword25 {
* Video decoder used in engines:
* - sword25
*/
-class TheoraDecoder : public Video::VideoDecoder {
+class TheoraDecoder : public VideoDecoder {
public:
TheoraDecoder(Audio::Mixer::SoundType soundType = Audio::Mixer::kMusicSoundType);
virtual ~TheoraDecoder();
@@ -137,7 +137,7 @@ private:
ogg_int16_t *_audiobuf;
};
-} // End of namespace Sword25
+} // End of namespace Video
#endif