The Stream Data List

The Stream Data List

Immediately following the header list comes another list, the stream data list with the FOURCC code movi. This list is then followed by a series of chunks that is, the audio and video samples which compose the stream. Each chunk in the stream is identified by a FOURCC code. The FOURCC value comprises a stream number, plus one of the two-character codes shown in Table 14-3.

Table 14-3. Stream Data Chunk Identifiers

Two-Character Code

Description

db

Uncompressed video

dc

Compressed video

pc

Palette change

wb

Audio data

The stream number and the code are concatenated to create a FOURCC value. For example, the video in stream 0 would be identified as either 00db or 00dc, and the audio track on stream 1 would be identified as 01wb. The internal structure of each sample, beyond the FOURCC code that identifies it as a stream sample, varies widely, depending on the compression techniques used for the sample. In general, samples from different streams are interleaved in the stream data list. Consider a typical video capture, with both video and audio components. Each video sample is the equivalent of one frame (or one thirtieth of a second) of video and needs to be associated with an audio sample. Audio samples can be longer (or shorter) than video samples, but they are interleaved to maintain synchronization between the streams, generally as shown in Figure 14-4.

figure 14-4 the stream data list, which is interleaved to keep video and audio in sync

Figure 14-4. The stream data list, which is interleaved to keep video and audio in sync

Alternately, the movi list can contain within it a list of rec chunks. The rec FOURCC code identifies stream data chunks that are meant to be read as a unit at the same time, which is useful when reading tightly interleaved data from a CD-ROM, when any delay in reading the next chunk could cause frames to drop in the playback.



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