* AVIFMT - AVI file format definitions
*
****************************************************************************/
* AVIFMT - AVI file format definitions
*
****************************************************************************/
/* The following is a short description of the AVI file format. Please
* see the accompanying documentation for a full explanation.
*
* An AVI file is the following RIFF form:
*
/* The following is a short description of the AVI file format. Please
* see the accompanying documentation for a full explanation.
*
* An AVI file is the following RIFF form:
*
- * The main file header specifies how many streams are present. For
- * each one, there must be a stream header chunk and a stream format
- * chunk, enlosed in a 'strl' LIST chunk. The 'strf' chunk contains
- * type-specific format information; for a video stream, this should
- * be a BITMAPINFO structure, including palette. For an audio stream,
- * this should be a WAVEFORMAT (or PCMWAVEFORMAT) structure.
+ * The main file header specifies how many streams are present. For
+ * each one, there must be a stream header chunk and a stream format
+ * chunk, enlosed in a 'strl' LIST chunk. The 'strf' chunk contains
+ * type-specific format information; for a video stream, this should
+ * be a BITMAPINFO structure, including palette. For an audio stream,
+ * this should be a WAVEFORMAT (or PCMWAVEFORMAT) structure.
- * The actual data is contained in subchunks within the 'movi' LIST
- * chunk. The first two characters of each data chunk are the
- * stream number with which that data is associated.
+ * The actual data is contained in subchunks within the 'movi' LIST
+ * chunk. The first two characters of each data chunk are the
+ * stream number with which that data is associated.
*
* The grouping into LIST 'rec' chunks implies only that the contents of
* the chunk should be read into memory at the same time. This
*
* The grouping into LIST 'rec' chunks implies only that the contents of
* the chunk should be read into memory at the same time. This
- * Only one video stream and one audio stream are allowed.
- * The streams must start at the beginning of the file.
- *
+ * Only one video stream and one audio stream are allowed.
+ * The streams must start at the beginning of the file.
-#define mmioFOURCC( ch0, ch1, ch2, ch3 ) \
- ( (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ) | \
- ( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) )
+#define mmioFOURCC( ch0, ch1, ch2, ch3 ) \
+ ( (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ) | \
+ ( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) )
#define ckidSTREAMHEADER mmioFOURCC('s', 't', 'r', 'h')
#define ckidSTREAMFORMAT mmioFOURCC('s', 't', 'r', 'f')
#define ckidSTREAMHANDLERDATA mmioFOURCC('s', 't', 'r', 'd')
#define ckidSTREAMHEADER mmioFOURCC('s', 't', 'r', 'h')
#define ckidSTREAMFORMAT mmioFOURCC('s', 't', 'r', 'f')
#define ckidSTREAMHANDLERDATA mmioFOURCC('s', 't', 'r', 'd')
-#define ckidSTREAMNAME mmioFOURCC('s', 't', 'r', 'n')
+#define ckidSTREAMNAME mmioFOURCC('s', 't', 'r', 'n')
#define listtypeAVIMOVIE mmioFOURCC('m', 'o', 'v', 'i')
#define listtypeAVIRECORD mmioFOURCC('r', 'e', 'c', ' ')
#define listtypeAVIMOVIE mmioFOURCC('m', 'o', 'v', 'i')
#define listtypeAVIRECORD mmioFOURCC('r', 'e', 'c', ' ')
*/
#define streamtypeVIDEO mmioFOURCC('v', 'i', 'd', 's')
#define streamtypeAUDIO mmioFOURCC('a', 'u', 'd', 's')
*/
#define streamtypeVIDEO mmioFOURCC('v', 'i', 'd', 's')
#define streamtypeAUDIO mmioFOURCC('a', 'u', 'd', 's')
-#define streamtypeMIDI mmioFOURCC('m', 'i', 'd', 's')
+#define streamtypeMIDI mmioFOURCC('m', 'i', 'd', 's')
#define streamtypeTEXT mmioFOURCC('t', 'x', 't', 's')
/* Basic chunk types */
#define streamtypeTEXT mmioFOURCC('t', 'x', 't', 's')
/* Basic chunk types */
#define StreamFromFOURCC(fcc) ((WORD) ((FromHex(LOBYTE(LOWORD(fcc))) << 4) + \
(FromHex(HIBYTE(LOWORD(fcc))))))
#define StreamFromFOURCC(fcc) ((WORD) ((FromHex(LOBYTE(LOWORD(fcc))) << 4) + \
(FromHex(HIBYTE(LOWORD(fcc))))))
#define MAKEAVICKID(tcc, stream) \
MAKELONG((ToHex((stream) & 0x0f) << 8) | \
#define MAKEAVICKID(tcc, stream) \
MAKELONG((ToHex((stream) & 0x0f) << 8) | \
-#define AVIF_HASINDEX 0x00000010 // Index at end of file?
-#define AVIF_MUSTUSEINDEX 0x00000020
-#define AVIF_ISINTERLEAVED 0x00000100
-#define AVIF_TRUSTCKTYPE 0x00000800 // Use CKType to find key frames?
-#define AVIF_WASCAPTUREFILE 0x00010000
-#define AVIF_COPYRIGHTED 0x00020000
+#define AVIF_HASINDEX 0x00000010 // Index at end of file?
+#define AVIF_MUSTUSEINDEX 0x00000020
+#define AVIF_ISINTERLEAVED 0x00000100
+#define AVIF_TRUSTCKTYPE 0x00000800 // Use CKType to find key frames?
+#define AVIF_WASCAPTUREFILE 0x00010000
+#define AVIF_COPYRIGHTED 0x00020000
/* The AVI File Header LIST chunk should be padded to this size */
#define AVI_HEADERSIZE 2048 // size of AVI header list
typedef struct
{
/* The AVI File Header LIST chunk should be padded to this size */
#define AVI_HEADERSIZE 2048 // size of AVI header list
typedef struct
{
- DWORD dwMicroSecPerFrame; // frame display rate (or 0L)
- DWORD dwMaxBytesPerSec; // max. transfer rate
- DWORD dwPaddingGranularity; // pad to multiples of this
+ DWORD dwMicroSecPerFrame; // frame display rate (or 0L)
+ DWORD dwMaxBytesPerSec; // max. transfer rate
+ DWORD dwPaddingGranularity; // pad to multiples of this
- DWORD dwFlags; // the ever-present flags
- DWORD dwTotalFrames; // # frames in file
- DWORD dwInitialFrames;
- DWORD dwStreams;
- DWORD dwSuggestedBufferSize;
-
- DWORD dwWidth;
- DWORD dwHeight;
-
- DWORD dwReserved[4];
+ DWORD dwFlags; // the ever-present flags
+ DWORD dwTotalFrames; // # frames in file
+ DWORD dwInitialFrames;
+ DWORD dwStreams;
+ DWORD dwSuggestedBufferSize;
+
+ DWORD dwWidth;
+ DWORD dwHeight;
+
+ DWORD dwReserved[4];
- FOURCC fccType;
- FOURCC fccHandler;
- DWORD dwFlags; /* Contains AVITF_* flags */
- WORD wPriority;
- WORD wLanguage;
- DWORD dwInitialFrames;
- DWORD dwScale;
- DWORD dwRate; /* dwRate / dwScale == samples/second */
- DWORD dwStart;
- DWORD dwLength; /* In units above... */
- DWORD dwSuggestedBufferSize;
- DWORD dwQuality;
- DWORD dwSampleSize;
- RECT rcFrame;
+ FOURCC fccType;
+ FOURCC fccHandler;
+ DWORD dwFlags; /* Contains AVITF_* flags */
+ WORD wPriority;
+ WORD wLanguage;
+ DWORD dwInitialFrames;
+ DWORD dwScale;
+ DWORD dwRate; /* dwRate / dwScale == samples/second */
+ DWORD dwStart;
+ DWORD dwLength; /* In units above... */
+ DWORD dwSuggestedBufferSize;
+ DWORD dwQuality;
+ DWORD dwSampleSize;
+ RECT rcFrame;
} AVIStreamHeader;
/* Flags for index */
#define AVIIF_LIST 0x00000001L // chunk is a 'LIST'
#define AVIIF_KEYFRAME 0x00000010L // this frame is a key frame.
} AVIStreamHeader;
/* Flags for index */
#define AVIIF_LIST 0x00000001L // chunk is a 'LIST'
#define AVIIF_KEYFRAME 0x00000010L // this frame is a key frame.
#define AVIIF_COMPUSE 0x0FFF0000L // these bits are for compressor use
#define FOURCC_RIFF mmioFOURCC('R', 'I', 'F', 'F')
#define AVIIF_COMPUSE 0x0FFF0000L // these bits are for compressor use
#define FOURCC_RIFF mmioFOURCC('R', 'I', 'F', 'F')