aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/scalpel/3do/movie_decoder.h
diff options
context:
space:
mode:
authorMartin Kiewitz2015-06-04 15:53:54 +0200
committerMartin Kiewitz2015-06-04 15:53:54 +0200
commit4dec07bf2df4a15ef353ec95b72e76c3432751fb (patch)
tree233b3135ed3cbcc65038551864ef094e3efe55a4 /engines/sherlock/scalpel/3do/movie_decoder.h
parent9d67c9535940fb76b12b721325c92745611a4b96 (diff)
downloadscummvm-rg350-4dec07bf2df4a15ef353ec95b72e76c3432751fb.tar.gz
scummvm-rg350-4dec07bf2df4a15ef353ec95b72e76c3432751fb.tar.bz2
scummvm-rg350-4dec07bf2df4a15ef353ec95b72e76c3432751fb.zip
SHERLOCK: improve 3DO movie player, add SDX2 codec
- queue up to 0.5 seconds of audio to avoid buffer underruns - support for SDX2 codec - put both audio codecs into audio/decoders/3do.cpp - made movie player capable of playing EA logo movie
Diffstat (limited to 'engines/sherlock/scalpel/3do/movie_decoder.h')
-rw-r--r--engines/sherlock/scalpel/3do/movie_decoder.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/engines/sherlock/scalpel/3do/movie_decoder.h b/engines/sherlock/scalpel/3do/movie_decoder.h
index be5a834414..60e79fa238 100644
--- a/engines/sherlock/scalpel/3do/movie_decoder.h
+++ b/engines/sherlock/scalpel/3do/movie_decoder.h
@@ -24,6 +24,7 @@
#define SHERLOCK_SCALPEL_3DO_MOVIE_DECODER_H
#include "video/video_decoder.h"
+#include "audio/decoders/3do.h"
namespace Audio {
class QueuingAudioStream;
@@ -51,6 +52,10 @@ protected:
void readNextPacket();
private:
+ int32 _streamVideoOffset; /* current stream offset for video decoding */
+ int32 _streamAudioOffset; /* current stream offset for audio decoding */
+
+private:
class StreamVideoTrack : public VideoTrack {
public:
StreamVideoTrack(uint32 width, uint32 height, uint32 codecTag, uint32 frameCount);
@@ -63,6 +68,7 @@ private:
Graphics::PixelFormat getPixelFormat() const;
int getCurFrame() const { return _curFrame; }
int getFrameCount() const { return _frameCount; }
+ void setNextFrameStartTime(uint32 nextFrameStartTime) { _nextFrameStartTime = nextFrameStartTime; }
uint32 getNextFrameStartTime() const { return _nextFrameStartTime; }
const Graphics::Surface *decodeNextFrame() { return _surface; }
@@ -84,19 +90,27 @@ private:
StreamAudioTrack(uint32 codecTag, uint32 sampleRate, uint32 channels);
~StreamAudioTrack();
- void queueAudio(Common::SeekableReadStream *stream, uint32 length);
+ void queueAudio(Common::SeekableReadStream *stream, uint32 size);
protected:
Audio::AudioStream *getAudioStream() const;
private:
Audio::QueuingAudioStream *_audioStream;
+ uint32 _totalAudioQueued; /* total amount of milliseconds of audio, that we queued up already */
+
+ public:
+ uint32 getTotalAudioQueued() const { return _totalAudioQueued; }
private:
int16 decodeSample(uint8 dataNibble);
- int16 _lastSample;
- int16 _stepIndex;
+ uint32 _codecTag;
+ uint16 _sampleRate;
+ byte _audioFlags;
+
+ Audio::audio_3DO_ADP4_PersistentSpace _ADP4_PersistentSpace;
+ Audio::audio_3DO_SDX2_PersistentSpace _SDX2_PersistentSpace;
};
Common::SeekableReadStream *_stream;