Chunks and Lists

Chunks and Lists

Following the RIFF header, which identifies the file as containing AVI data, the file is broken into a series of data areas, known as chunks and lists. Within an AVI file, both chunks and lists can either occur sequentially (one after another), or nested (one within another). There s no practical limit to the number of chunks or lists in an AVI file although the maximum file size for AVI files is a whopping 48 terabytes. Chunks can be nested within chunks that are within lists that are within chunks, which might themselves be part of a series of sequential lists, and so forth. The structure of a typical AVI file might look something like Figure 14-2.

figure 14-2 nested and sequential lists and chunks within an avi file

Figure 14-2. Nested and sequential lists and chunks within an AVI file

Chunks and lists are distinguished between themselves by their formats. A chunk has a FOURCC header, identifying the chunk type, followed by a 32-bit value for the length of the chunk data, followed by the chunk data. Chunk data is always padded to the nearest 16-bit (word) boundary to maintain alignment with other chunks. A list has a FOURCC header of LIST , followed by a 32-bit value for the length of the list data, then another FOURCC code with the list type (in other words, what kind of list is it?), followed by the list data. Every AVI file contains at least two lists. The first of these defines the format of the streams contained in the file, and the second contains the actual stream data.



Programming Microsoft DirectShow for Digital Video and Television
Programming Microsoft DirectShow for Digital Video and Television (Pro-Developer)
ISBN: 0735618216
EAN: 2147483647
Year: 2002
Pages: 108
Authors: Mark D. Pesce

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net