AVIStreamHeader
The AVIStreamHeader structure contains header information for a single
stream of a file. It is contained within an 'strh' chunk within a LIST 'strl'
chunk that is itself contained within the LIST 'hdrl' chunk at the beginning
of an AVI RIFF file.
typedef struct {
FOURCC fccType;
FOURCC fccHandler;
ULONG ulFlags;
ULONG ulReserved1;
ULONG ulInitialFrames;
ULONG ulScale;
ULONG ulRate;
ULONG ulStart;
ULONG ulLength;
ULONG ulSuggestedBufferSize;
ULONG ulQuality;
ULONG ulSampleSize;
ULONG Reserved[2];
} AVIStreamHeader;
The AVIStreamHeader structure has the following fields:
Field
fccType
Contains a four-character code which specifies
the type of data contained in the stream. The following values are currently
defined for AVI data:
- vids'
Indicates the stream contains video data.
The stream format chunk contains a BITMAPINFO structure which can
include palette information.
'auds'
Indicates
the stream contains video data. The stream format chunk contains a WAVEFORMAT
or PCMWAVEFORMAT structure.
Other four-character
codes can identify non-AVI data.
fccHandler
Optionally,
contains a four-character code that identifies a specific data handler.
The data handler is the preferred handler for the stream.
ulFlags
Specifies any applicable flags. The bits in
the high-order word of these flags are specific to the type of data contained
in the stream. The following flags are currently defined:
AVISF_DISABLED
Indicates this stream should not
be enabled by default.
AVISF_VIDEO_PALCHANGES
Indicates
this video stream contains palette changes. This flag warns the playback
software that it will need to animate the palette.
ulReserved1
Reserved. (Should be set to 0.)
ulInitialFrames
Specifies how far audio data is skewed ahead
of the video frames in interleaved files. Typically, this is about 0.75
seconds.
ulScale
This
field is used together with ulRate to specify the time scale that
this stream will use.
Dividing ulRate by ulScale gives the number of samples per
second.
For video streams, this rate should be the frame rate.
For audio streams, this rate should correspond to the time needed for nBlockAlign
bytes of audio, which for PCM audio simply reduces to the sample rate.
ulRate
ulStart
This field
is currently reserved and should be set to zero.
ulLength
Specifies the length of this stream. The units
are defined by the ulRate and ulScale fields of the stream's
header.
ulSuggestedBufferSize
Suggests
how large a buffer should be used to read this stream. Typically, this contains
a value corresponding to the largest chunk presented in the stream. Using
the correct buffer size makes playback more efficient. Use zero if you do
not know the correct buffer size.
ulQuality
Specifies
an indicator of the quality of the data in the stream. Quality is represented
as a number between 0 and 10000. For compressed data, this typically represent
the value of the quality parameter passed to the compression software. If
set to -1, drivers use the default quality value.
ulSampleSize
Specifies the size of a single sample of data.
This is set to zero if the samples can vary in size. If this number is non-zero,
then multiple samples of data can be grouped into a single chunk within
the file. If it is zero, each sample of data (such as a video frame) must
be in a separate chunk.
For video streams, this number is typically zero, although it can be non-zero
if all video frames are the same size.
For audio streams, this number should be the same as the nBlockAlign
field of the WAVEFORMAT structure describing the audio.
[Back: AVIINDEXENTRY]
[Next: MainAVIHeader]