diff options
author | Paul Gilbert | 2010-08-30 07:48:27 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2010-10-12 23:20:33 +0000 |
commit | cb95db7cc04a5a3d14f408835cd371e0a0abd4ed (patch) | |
tree | 0022ad1ca99c0fb5b623d612285e12fde2bc2434 /engines/sword25/fmv/movieplayer.h | |
parent | ffce890f66bc34b356c8df89591bc4f56e5a9e4e (diff) | |
download | scummvm-rg350-cb95db7cc04a5a3d14f408835cd371e0a0abd4ed.tar.gz scummvm-rg350-cb95db7cc04a5a3d14f408835cd371e0a0abd4ed.tar.bz2 scummvm-rg350-cb95db7cc04a5a3d14f408835cd371e0a0abd4ed.zip |
SWORD25: Commit of in-progress MoviePlayer code
Frames aren't being corrected decoded yet; still trying to locate the cause
svn-id: r53295
Diffstat (limited to 'engines/sword25/fmv/movieplayer.h')
-rw-r--r-- | engines/sword25/fmv/movieplayer.h | 68 |
1 files changed, 65 insertions, 3 deletions
diff --git a/engines/sword25/fmv/movieplayer.h b/engines/sword25/fmv/movieplayer.h index 3404eaacd8..46890991d9 100644 --- a/engines/sword25/fmv/movieplayer.h +++ b/engines/sword25/fmv/movieplayer.h @@ -39,11 +39,38 @@ // Includes // ----------------------------------------------------------------------------- +#include "common/ptr.h" #include "sword25/kernel/common.h" #include "sword25/kernel/service.h" +#include "sword25/fmv/oggtheora/audiobuffer.h" +#include "sword25/fmv/oggtheora/moviefile.h" +#include "sword25/fmv/oggtheora/oggstreamstate.h" +#include "sword25/fmv/oggtheora/theorastate.h" +#include "sword25/fmv/oggtheora/vorbisstate.h" +#include "sword25/gfx/bitmap.h" namespace Sword25 { +/* FIXME: Audio stubs +class OggStreamState { +public: + OggStreamState(int v) {} + void PageIn(void *v) {} + bool PacketOut(void *v) { return true; } +}; +class VorbisState { +public: + void BlockInit() {} + void SynthesisInit() {} + bool SynthesisHeaderIn(void *v) { return false; } +}; +class OggState { +public: + bool SyncPageout(void *v) { return false; } + char *SyncBuffer(int v) { return NULL; } +}; +*/ + // ----------------------------------------------------------------------------- // Class definitions // ----------------------------------------------------------------------------- @@ -55,10 +82,10 @@ public: // ----------------------------------------------------------------------------- MoviePlayer(Kernel *pKernel); - ~MoviePlayer() {}; + ~MoviePlayer(); // ----------------------------------------------------------------------------- - // Abstract interface must be implemented by each Movie Player + // Player interface must be implemented by a Movie Player // ----------------------------------------------------------------------------- /** @@ -137,9 +164,44 @@ public: * @remark This method can only be called when IsMovieLoaded() returns true. */ double GetTime(); - private: + // ----------------------------------------------------------------------------- + // Internal support methods + // ----------------------------------------------------------------------------- bool _RegisterScriptBindings(); + bool DecodeTheora(); + void DecodeVorbis(); + void ReadData(); + static void DynamicSoundCallBack(void *UserData, void *Data, unsigned int DataLength); + +private: + bool m_MovieLoaded; + bool m_Paused; + + Common::SharedPtr<OggStreamState> m_VorbisStreamState; + bool m_VorbisPresent; + Common::SharedPtr<VorbisState> m_VorbisState; + unsigned int m_SoundHandle; + bool m_AudioEnded; + Common::SharedPtr<AudioBuffer> m_AudioBuffer; + + Common::SharedPtr<OggStreamState> m_TheoraStreamState; + bool m_TheoraPresent; + Common::SharedPtr<TheoraState> m_TheoraState; + bool m_VideoEnded; + + Common::SharedPtr<OggState> m_OggState; + + Common::SharedPtr<MovieFile> m_File; + + uint64_t m_StartTime; + double m_LastFrameTime; + + float m_Timer; + + byte * _pixels; + int _pixelsSize; + RenderObjectPtr<Bitmap> m_OutputBitmap; }; } // End of namespace Sword25 |