diff options
author | Matthew Hoops | 2011-04-07 19:29:49 -0400 |
---|---|---|
committer | Matthew Hoops | 2011-04-07 19:40:07 -0400 |
commit | 8cf73e3fb4e44567a7afa527a0705acb90033a78 (patch) | |
tree | fa33a05454d837ebe357399071b10344608722d3 /video/qt_decoder.h | |
parent | d40874d6f4bce278b4ab3b0ef6fb34d35466b852 (diff) | |
download | scummvm-rg350-8cf73e3fb4e44567a7afa527a0705acb90033a78.tar.gz scummvm-rg350-8cf73e3fb4e44567a7afa527a0705acb90033a78.tar.bz2 scummvm-rg350-8cf73e3fb4e44567a7afa527a0705acb90033a78.zip |
AUDIO: Split QuickTime audio into a new class
Standalone QuickTime files can now be played as an AudioStream
Diffstat (limited to 'video/qt_decoder.h')
-rw-r--r-- | video/qt_decoder.h | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/video/qt_decoder.h b/video/qt_decoder.h index 65ade40c93..b9c4b9b41d 100644 --- a/video/qt_decoder.h +++ b/video/qt_decoder.h @@ -34,7 +34,6 @@ #ifndef VIDEO_QT_DECODER_H #define VIDEO_QT_DECODER_H -#include "common/quicktime.h" #include "common/scummsys.h" #include "video/video_decoder.h" @@ -42,6 +41,7 @@ #include "audio/audiostream.h" #include "audio/mixer.h" +#include "audio/decoders/quicktime.h" namespace Common { class MacResManager; @@ -56,7 +56,7 @@ namespace Video { * - mohawk * - sci */ -class QuickTimeDecoder : public SeekableVideoDecoder, public Common::QuickTimeParser { +class QuickTimeDecoder : public SeekableVideoDecoder, public Audio::QuickTimeAudioDecoder { public: QuickTimeDecoder(); virtual ~QuickTimeDecoder(); @@ -126,32 +126,17 @@ protected: Codec *videoCodec; }; - struct AudioSampleDesc : public Common::QuickTimeParser::SampleDesc { - AudioSampleDesc(); - - uint16 channels; - uint32 sampleRate; - uint32 samplesPerFrame; - uint32 bytesPerFrame; - }; - Common::QuickTimeParser::SampleDesc *readSampleDesc(MOVStreamContext *st, uint32 format); private: - Audio::AudioStream *createAudioStream(Common::SeekableReadStream *stream); - bool checkAudioCodecSupport(uint32 tag); Common::SeekableReadStream *getNextFramePacket(uint32 &descId); uint32 getFrameDuration(); void init(); - Audio::QueuingAudioStream *_audStream; void startAudio(); void stopAudio(); void updateAudioBuffer(); void readNextAudioChunk(); - uint32 getAudioChunkSampleCount(uint chunk); - int8 _audioStreamIndex; - uint _curAudioChunk; Audio::SoundHandle _audHandle; Audio::Timestamp _audioStartOffset; |