aboutsummaryrefslogtreecommitdiff
path: root/graphics/video/qt_decoder.h
diff options
context:
space:
mode:
authorMatthew Hoops2011-01-11 17:27:37 +0000
committerMatthew Hoops2011-01-11 17:27:37 +0000
commit3cb7224c108485fa5f1f3c6ff5257ab4c676b10c (patch)
tree321c6fcf14bbfe8673a13432f22319c95396cd68 /graphics/video/qt_decoder.h
parent3bb5a9fe719a666fe85300831e570e6b375d612e (diff)
downloadscummvm-rg350-3cb7224c108485fa5f1f3c6ff5257ab4c676b10c.tar.gz
scummvm-rg350-3cb7224c108485fa5f1f3c6ff5257ab4c676b10c.tar.bz2
scummvm-rg350-3cb7224c108485fa5f1f3c6ff5257ab4c676b10c.zip
VIDEO: Add seeking capability to QuickTimeDecoder
svn-id: r55203
Diffstat (limited to 'graphics/video/qt_decoder.h')
-rw-r--r--graphics/video/qt_decoder.h22
1 files changed, 8 insertions, 14 deletions
diff --git a/graphics/video/qt_decoder.h b/graphics/video/qt_decoder.h
index 8492d25d73..4eb2070b23 100644
--- a/graphics/video/qt_decoder.h
+++ b/graphics/video/qt_decoder.h
@@ -52,7 +52,7 @@ namespace Common {
namespace Graphics {
-class QuickTimeDecoder : public RewindableVideoDecoder {
+class QuickTimeDecoder : public SeekableVideoDecoder {
public:
QuickTimeDecoder();
virtual ~QuickTimeDecoder();
@@ -113,8 +113,9 @@ public:
uint32 getTimeToNextFrame() const;
PixelFormat getPixelFormat() const;
- // RewindableVideoDecoder API
- void rewind();
+ // SeekableVideoDecoder API
+ void seekToFrame(uint32 frame);
+ void seekToTime(VideoTimestamp time);
private:
// This is the file handle from which data is read from. It can be the actual file handle or a decompressed stream.
@@ -176,17 +177,9 @@ private:
uint32 *chunk_offsets;
int stts_count;
MOVstts *stts_data;
- int ctts_count;
- MOVstts *ctts_data;
int edit_count; /* number of 'edit' (elst atom) */
uint32 sample_to_chunk_sz;
MOVstsc *sample_to_chunk;
- int32 sample_to_chunk_index;
- int sample_to_time_index;
- uint32 sample_to_time_sample;
- uint32 sample_to_time_time;
- int sample_to_ctime_index;
- int sample_to_ctime_sample;
uint32 sample_size;
uint32 sample_count;
uint32 *sample_sizes;
@@ -197,7 +190,7 @@ private:
uint16 width;
uint16 height;
- int codec_type;
+ CodecType codec_type;
uint32 stsdEntryCount;
STSDEntry *stsdEntries;
@@ -215,9 +208,7 @@ private:
bool _foundMOOV;
uint32 _timeScale;
uint32 _duration;
- MOVStreamContext *_partial;
uint32 _numStreams;
- int _ni;
Common::Rational _scaleFactorX;
Common::Rational _scaleFactorY;
MOVStreamContext *_streams[20];
@@ -237,15 +228,18 @@ private:
void startAudio();
void stopAudio();
void updateAudioBuffer();
+ void readNextAudioChunk();
uint32 getAudioChunkSampleCount(uint chunk);
int8 _audioStreamIndex;
uint _curAudioChunk;
Audio::SoundHandle _audHandle;
+ VideoTimestamp _audioStartOffset;
Codec *createCodec(uint32 codecTag, byte bitsPerPixel);
Codec *findDefaultVideoCodec() const;
uint32 _nextFrameStartTime;
int8 _videoStreamIndex;
+ uint32 findKeyFrame(uint32 frame) const;
Surface *_scaledSurface;
const Surface *scaleSurface(const Surface *frame);