SRiffFileI Class Reference

Reads RIFF file format. More...

#include <bsapi.h>

Inheritance diagram for SRiffFileI:

SUnknownI List of all members.

Public Member Functions

virtual bool BSAPI_METHOD Open (char *pFile, bool write=false, bool newFile=true, bool jumpToEnd=false)=0
virtual bool BSAPI_METHOD Close ()=0
virtual bool BSAPI_METHOD Rewind ()=0
virtual char *BSAPI_METHOD GetFormatId ()=0
virtual bool BSAPI_METHOD Eof ()=0
virtual bool BSAPI_METHOD Eol ()=0
virtual bool BSAPI_METHOD ReadChunkHeader (char *pChunkId=0, unsigned int *pChunkLength=0, char *pListName=0)=0
virtual bool BSAPI_METHOD ReadChunkData (void *pData, int requestedLength=0)=0
virtual bool BSAPI_METHOD SkipChunk ()=0
virtual bool BSAPI_METHOD FindChunk (char *pChunkId, char *pListName, bool *pFound=0, unsigned int *pLength=0)=0
virtual bool BSAPI_METHOD WriteChunk (char *pChunkId, char *pData, unsigned int length)=0
virtual bool BSAPI_METHOD OpenList ()=0
virtual bool BSAPI_METHOD CreateList (char *pName)=0
virtual bool BSAPI_METHOD CloseList ()=0
virtual bool BSAPI_METHOD DumpFileStructure ()=0

Detailed Description

Reads RIFF file format.

The Riff format is an universal binary format used mainly by Microsoft. The WAV, AVI and BMP formats are based on the RIFF format. Each file has a header consisted form 4 bytes 'RIFF' header and data length (4 bytes unsigned int). The format uses chunks to store data. Each chunk have a header consised from 4 bytes chunk ID (chars) and 4 bytes chunk length (unsigned int). There is a special chunk 'LIST' which can contain subchunks. The LIST chunk has an additonal 4 bytes list name. In additional if the chunk data does not have even length, there is an additional padding byte behind the chunk

'RIFF'(4B) file_len_in_bytes(unsigned int, - sizeof('RIFF') - sizeof(file_len_in_bytes)) chunk_id1(char, 4B) chunk_len_in_bytes1(unsigned int, -8B ID and len) chunk_data1 chuk_id2 chunk_len_in_bytes2 chunk_data2

chunk LIST 'LIST'(4B) list_len_in_bytes(unsigned int) chunk_id1(char, 4B) chunk_len1 chunk_data1 ...


The documentation for this class was generated from the following file:
Generated on Wed Jul 15 10:10:15 2009 for BSAPI by  doxygen 1.4.7