92 AMovieSet(
const char *pszPath,
int bStreaming,
int *pnError);
Description of a pixel rectangle, its layout, and its palette.
Definition abitmap.h:95
Ring buffer the movie stream reads its file through.
Definition acircbuff.h:16
int ParseHeader(char *pBuffer, int nBytes)
Parse the MOVS and MOVT chunks at the start of a loaded buffer and set up the ring buffer.
static constexpr int kTrackCount
Tracks a file can describe, and so the handler slots.
Definition amovieset.h:27
unsigned char mReserved10[8]
Definition amovieset.h:164
char * mBuffer
Definition amovieset.h:162
int mLoaded
Definition amovieset.h:177
void AssignHandler(int nTrackId, ChunkHandler pfnHandler, void *pData)
Install the handler for one track.
ACircBuff * mCircBuff
Definition amovieset.h:161
int mStreaming
Definition amovieset.h:176
AMovieSet(const char *pszPath, int bStreaming, int *pnError)
Open a movie file and queue its first read.
void Update(int nTick, int nReadSize)
Consume every chunk due by nTick and top up a streaming buffer.
void(* ChunkHandler)(AMovieChunkHdr *pHeader, void *pPayload, void *pData)
Receiver of one track's chunks.
Definition amovieset.h:74
~AMovieSet()
Close the file, cancel an outstanding read, and destroy the ring buffer.
Track mTracks[kTrackCount]
Definition amovieset.h:165
int mFileLength
Definition amovieset.h:178
int mDataStart
Definition amovieset.h:174
unsigned char mReserved364[4]
Definition amovieset.h:175
int mLoopTicks
Tick offset the LOOP chunks have accumulated.
Definition amovieset.h:172
void * mHandlerData[kTrackCount]
Definition amovieset.h:167
ChunkHandler mHandlers[kTrackCount]
Definition amovieset.h:166
int mFileOffset
Definition amovieset.h:179
int mSoundHold
Definition amovieset.h:181
int mAsyncHandle
Definition amovieset.h:180
int mLastTick
Definition amovieset.h:173
int mBufferSize
Definition amovieset.h:163
int RequestRead(int nBytes)
Queue the next streaming read of up to nBytes, as Update() does inline.
int mFile
Definition amovieset.h:160
The rendering engine.
Definition animhelper.h:3
const unsigned int g_nSndpTag
const unsigned int g_nBlakTag
const unsigned int g_nMovsTag
Chunk type codes, four characters read as a word, built by the unit's static initialiser.
const unsigned int g_nSndhTag
const unsigned int g_nPallTag
const unsigned int g_nFramTag
const unsigned int g_nSndbTag
const unsigned int g_nLoopTag
const char *const g_apszMovieStreamErrors[]
Text for each error an AMovieSet reports, indexed by the negated error code.
const unsigned int g_nMovtTag
Header of every chunk in a movie file, followed by mSize payload bytes.
Definition amoviechunkhdr.h:10
Payload of a BLAK chunk.
Definition amovieset.h:63
unsigned int mColor
Definition amovieset.h:64
Payload of a FRAM chunk, followed by the frame's pixels.
Definition amovieset.h:54
short mX
Definition amovieset.h:55
short mY
Definition amovieset.h:56
ABitmap mBitmap
Definition amovieset.h:59
int mReserved04
Definition amovieset.h:57
int mFlags
Definition amovieset.h:58
Payload of a PALL chunk.
Definition amovieset.h:47
int mFlags
Definition amovieset.h:49
int mCount
Definition amovieset.h:48
unsigned int mEntries[1]
Definition amovieset.h:50
Track description a MOVT chunk supplies, 0x2c bytes.
Definition amovieset.h:36
unsigned char mReserved00[4]
Definition amovieset.h:40
Track()
Definition amovieset.h:37
short mWidth
Definition amovieset.h:41
short mHeight
Definition amovieset.h:42
unsigned char mReserved08[0x24]
Definition amovieset.h:43