VIDEO: Move TheoraDecoder to video/

This commit is contained in:
Matthew Hoops 2012-08-12 08:58:00 -04:00
parent 5db42076b8
commit 7831225b28
5 changed files with 18 additions and 20 deletions

View file

@ -39,7 +39,7 @@
#include "sword25/gfx/bitmap.h" #include "sword25/gfx/bitmap.h"
#ifdef USE_THEORADEC #ifdef USE_THEORADEC
#include "sword25/fmv/theora_decoder.h" #include "video/theora_decoder.h"
#endif #endif
#define THEORA_INDIRECT_RENDERING #define THEORA_INDIRECT_RENDERING
@ -141,7 +141,7 @@ private:
#ifdef USE_THEORADEC #ifdef USE_THEORADEC
TheoraDecoder _decoder; Video::TheoraDecoder _decoder;
Graphics::Surface *_backSurface; Graphics::Surface *_backSurface;
int _outX, _outY; int _outX, _outY;

View file

@ -85,11 +85,6 @@ MODULE_OBJS := \
util/pluto/pluto.o \ util/pluto/pluto.o \
util/pluto/plzio.o util/pluto/plzio.o
ifdef USE_THEORADEC
MODULE_OBJS += \
fmv/theora_decoder.o
endif
# This module can be built as a plugin # This module can be built as a plugin
ifeq ($(ENABLE_SWORD25), DYNAMIC_PLUGIN) ifeq ($(ENABLE_SWORD25), DYNAMIC_PLUGIN)
PLUGIN := 1 PLUGIN := 1

View file

@ -26,5 +26,10 @@ MODULE_OBJS += \
bink_decoder.o bink_decoder.o
endif endif
ifdef USE_THEORADEC
MODULE_OBJS += \
theora_decoder.o
endif
# Include common rules # Include common rules
include $(srcdir)/rules.mk include $(srcdir)/rules.mk

View file

@ -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/system.h"
#include "common/textconsole.h" #include "common/textconsole.h"
#include "common/util.h" #include "common/util.h"
#include "graphics/yuv_to_rgb.h" #include "graphics/yuv_to_rgb.h"
#include "audio/decoders/raw.h" #include "audio/decoders/raw.h"
#include "sword25/kernel/common.h"
namespace Sword25 { namespace Video {
#define AUDIOFD_FRAGSIZE 10240 #define AUDIOFD_FRAGSIZE 10240
@ -560,6 +560,4 @@ void TheoraDecoder::updateBalance() {
g_system->getMixer()->setChannelBalance(*_audHandle, getBalance()); g_system->getMixer()->setChannelBalance(*_audHandle, getBalance());
} }
} // End of namespace Sword25 } // End of namespace Video
#endif

View file

@ -20,13 +20,13 @@
* *
*/ */
#ifndef SWORD25_THEORADECODER_H
#define SWORD25_THEORADECODER_H
#include "common/scummsys.h" // for USE_THEORADEC #include "common/scummsys.h" // for USE_THEORADEC
#ifdef USE_THEORADEC #ifdef USE_THEORADEC
#ifndef VIDEO_THEORA_DECODER_H
#define VIDEO_THEORA_DECODER_H
#include "common/rational.h" #include "common/rational.h"
#include "video/video_decoder.h" #include "video/video_decoder.h"
#include "audio/audiostream.h" #include "audio/audiostream.h"
@ -41,7 +41,7 @@ namespace Common {
class SeekableReadStream; class SeekableReadStream;
} }
namespace Sword25 { namespace Video {
/** /**
* *
@ -49,7 +49,7 @@ namespace Sword25 {
* Video decoder used in engines: * Video decoder used in engines:
* - sword25 * - sword25
*/ */
class TheoraDecoder : public Video::VideoDecoder { class TheoraDecoder : public VideoDecoder {
public: public:
TheoraDecoder(Audio::Mixer::SoundType soundType = Audio::Mixer::kMusicSoundType); TheoraDecoder(Audio::Mixer::SoundType soundType = Audio::Mixer::kMusicSoundType);
virtual ~TheoraDecoder(); virtual ~TheoraDecoder();
@ -137,7 +137,7 @@ private:
ogg_int16_t *_audiobuf; ogg_int16_t *_audiobuf;
}; };
} // End of namespace Sword25 } // End of namespace Video
#endif #endif