diff options
author | Bastien Bouclet | 2012-01-05 09:53:06 +0100 |
---|---|---|
committer | Bastien Bouclet | 2012-01-09 08:52:08 +0100 |
commit | 1432011fdc885849e60ffa2161e378a00ceb6176 (patch) | |
tree | a2eb6054fd7638ad9e6847cb7e14ce67718f5433 /video/bink_decoder.h | |
parent | e72201c6ccc94545d818b29b6da4d34b32fb40f8 (diff) | |
download | scummvm-rg350-1432011fdc885849e60ffa2161e378a00ceb6176.tar.gz scummvm-rg350-1432011fdc885849e60ffa2161e378a00ceb6176.tar.bz2 scummvm-rg350-1432011fdc885849e60ffa2161e378a00ceb6176.zip |
VIDEO: Small refactoring of the Bink Decoder
This allows subclassing the Bink decoder to add seeking support
Diffstat (limited to 'video/bink_decoder.h')
-rw-r--r-- | video/bink_decoder.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/video/bink_decoder.h b/video/bink_decoder.h index dd1b7ca67d..3d5e882dd7 100644 --- a/video/bink_decoder.h +++ b/video/bink_decoder.h @@ -76,7 +76,9 @@ public: // FixedRateVideoDecoder Common::Rational getFrameRate() const { return _frameRate; } -private: + // Bink specific + bool loadStream(Common::SeekableReadStream *stream, const Graphics::PixelFormat &format); +protected: static const int kAudioChannelsMax = 2; static const int kAudioBlockSizeMax = (kAudioChannelsMax << 11); @@ -221,15 +223,13 @@ private: Audio::SoundHandle _audioHandle; Audio::QueuingAudioStream *_audioStream; - bool _audioStarted; + int32 _audioStartOffset; uint32 _videoFlags; ///< Video frame features. bool _hasAlpha; ///< Do video frames have alpha? bool _swapPlanes; ///< Are the planes ordered (A)YVU instead of (A)YUV? - uint32 _audioFrame; - Common::Array<AudioTrack> _audioTracks; ///< All audio tracks. Common::Array<VideoFrame> _frames; ///< All video frames. @@ -259,7 +259,7 @@ private: /** Decode an audio packet. */ void audioPacket(AudioTrack &audio); /** Decode a video packet. */ - void videoPacket(VideoFrame &video); + virtual void videoPacket(VideoFrame &video); /** Decode a plane. */ void decodePlane(VideoFrame &video, int planeIdx, bool isChroma); @@ -327,6 +327,11 @@ private: void IDCT(int16 *block); void IDCTPut(DecodeContext &ctx, int16 *block); void IDCTAdd(DecodeContext &ctx, int16 *block); + + /** Start playing the audio track */ + void startAudio(); + /** Stop playing the audio track */ + void stopAudio(); }; } // End of namespace Video |