This section describes some of the movie-file data chunks listed in the previous section. It does not describe all the structures; instead, it describes those likely to be useful to a movie player application.
The “cftc” chunk identifies the contents and location of the other data chunks in the movie file. The CFTC chunk can be defined as follows (using RIFF notation):
<CFTC-ck> <189> cftc( <CFTC entry> . . . )
<CFTC entry> <189> struct {
FOURCC ckID;
DWORD dwSize;
DWORD dwResID;
DWORD dwOffset;
}
The <CFTC entry> fields are described in the following table:
Field | Description |
ckID | Chunk ID of the animation element stored in the file. |
dwSize | Size of the animation element. |
dwResID | Resource ID number of the animation element. |
dwOffset | Byte offset of animation element from start of file. |
All integer values in the CFTC chunk are in Intel format.
The “dib” chunk contains a Windows bitmap, minus the palette. The data portion of this chunk begins with a Windows BITMAPINFOHEADER structure, followed immediately by the bitmap data. When appropriate, the bitmap data is run-length encoded into Windows RLE format.
The following RIFF notation shows the format of the DIB chunk:
<DIB-ck> <189> dib( <dwResID:DWORD> <ResourceName:BSTR> <dibHeader:BITMAPINFOHEADER>
<BitmapData:BYTE> . . . )
All integer data in the “dib” chunk is in Intel format. The fields in the “dib” chunk are described in the following table:
Field | Description |
dwResID | Unique sequence number |
ResourceName | Resource name string |
dibHeader | Windows BITMAPINFOHEADER structure. |
BitmapData | Bitmap data |
The “vwlb” chunk contains the label list for the movie file. A label is a textual string assigned to a frame. The Movie Player provides two functions, mmpGetInfo and mmpSetInfo, that allow you to get and set the label-list information. See Chapter 3, “Function Directory,” for descriptions of these functions.
The following RIFF notation show the format of the “vwlb” chunk:
<VWLB-ck> <189> vwlb ( <dwResID:DWORD>
<ResourceName:BSTR>
<LabelCount:WORD>
<LabelRecord:LREC> . . .
<LabelText:CHAR> . . . )
<LREC> <189> struct {
WORD wFrameNumber;
WORD wTextOffset;
}
The fields of the “vwlb” chunk are described in the following. All integers, with the exception of the SeqID field, are in Motorola format.
Field | Description |
dwResID | Unique sequence number. |
ResourceName | Resource-name string. |
LabelCount | Count of labels stored in the file. |
LabelRecords | Series of LREC label records identifying the location of the label text and the associated frame number. The chunk contains LabelCount+1 label records; the last record in the array has wFrameNumber set to zero, and the wTextOffset value points beyond the end of the LabelText area. |
LabelText | Label text stored in packed format. Each label is terminated with a character value 0x0d. |
The fields of the LREC structure are described in the following. All integers are in Motorola format.
Field | Description |
wFrameNumber | Frame number associated with label |
wTextOffset | Offset of label text from start of the LabelText field. |
The “vwac” chunk contains the script-channel text (action entries) for the movie. The Movie Player provides two functions, mmpGetInfo and mmpSetInfo, that allow you to get and set the label-list information. See Chapter 3, “Function Directory,” for descriptions of these functions.
The following RIFF notation shows the format of the “vwac” chunk:
<VWLB-ck> <189> vwac ( <dwResID:DWORD>
<ResourceName:BSTR>
<ActionCount:WORD>
<ActionRecord:ACREC> . . .
<ActionText:CHAR> . . . )
<ACREC> <189> struct {
BYTE chMenuItem;
BYTE wActionCode;
WORD wTextOffset;
}
The fields of the “vwac” chunk are described in the following. All integers, with the exception of the SeqID field, are in Motorola format.
Field | Description |
dwResID | Unique sequence number. |
ResourceName | Resource-name string. |
ActionCount | Number of action codes stored in the chunk. |
ActionRecord | Series of ACREC action-code records. The chunk contains contains ActionCount+1 action-code records; the last record in the array has chMenuItem set to zero, and the wTextOffset value points beyond the end of the achText area. |
ActionText | Action-code text stored in packed format, without terminating characters between action-code strings. |
The fields of the ACREC structure are described in the following. Integers are in Motorola format.
Field | Description |
chMenuItem | Menu item number from script-channel window. |
wActionCode | Not used by Movie Player. |
wTextOffset | Offset of action-code text from start of ActionText field. |