AVIFMT.H 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. #ifndef _AVIFMT_H_
  2. #define _AVIFMT_H_
  3. //////////////////////////////////////////////////////////////////////////////
  4. //////////////////////////////////////////////////////////////////////////////
  5. //////////////////////////////////////////////////////////////////////////////
  6. #ifndef DWORD
  7. #define DWORD unsigned long
  8. #endif
  9. #ifndef WORD
  10. #define WORD unsigned short
  11. #endif
  12. #ifndef FOURCC
  13. #define FOURCC unsigned long
  14. #endif
  15. //////////////////////////////////////////////////////////////////////////////
  16. //////////////////////////////////////////////////////////////////////////////
  17. //////////////////////////////////////////////////////////////////////////////
  18. //
  19. // Flags for "avih" chunk
  20. //
  21. #define AVIF_HASINDEX 0x00000010 // Index at end of file
  22. #define AVIF_MUSTUSEINDEX 0x00000020
  23. #define AVIF_ISINTERLEAVED 0x00000100
  24. #define AVIF_TRUSTCKTYPE 0x00000800 // Use CKType to find key frames
  25. #define AVIF_WASCAPTUREFILE 0x00010000
  26. #define AVIF_COPYRIGHTED 0x00020000
  27. //
  28. // Flags for "strh" chunk
  29. //
  30. #define AVISF_DISABLED 0x00000001
  31. #define AVISF_VIDEO_PALCHANGES 0x00010000
  32. //
  33. // Flags for "idx1" chunk
  34. //
  35. #define AVIIF_LIST 0x00000001L // chunk is a 'LIST'
  36. #define AVIIF_KEYFRAME 0x00000010L // this frame is a key frame.
  37. #define AVIIF_NOTIME 0x00000100L // this frame doesn't take any time
  38. #define AVIIF_COMPUSE 0x0FFF0000L // these bits are for compressor use
  39. //////////////////////////////////////////////////////////////////////////////
  40. //////////////////////////////////////////////////////////////////////////////
  41. //////////////////////////////////////////////////////////////////////////////
  42. typedef struct
  43. {
  44. DWORD dwMicroSecPerFrame; // frame display rate (or 0L)
  45. DWORD dwMaxBytesPerSec; // max. transfer rate
  46. DWORD dwPaddingGranularity; // pad to multiples of this
  47. // size; normally 2K.
  48. DWORD dwFlags; // the ever-present flags
  49. DWORD dwTotalFrames; // # frames in file
  50. DWORD dwInitialFrames;
  51. DWORD dwStreams;
  52. DWORD dwSuggestedBufferSize;
  53. DWORD dwWidth;
  54. DWORD dwHeight;
  55. DWORD dwReserved[4];
  56. } MainAVIHeader;
  57. typedef struct {
  58. FOURCC fccType;
  59. FOURCC fccHandler;
  60. DWORD dwFlags; // Contains AVITF_* flags
  61. WORD wPriority;
  62. WORD wLanguage;
  63. DWORD dwInitialFrames;
  64. DWORD dwScale;
  65. DWORD dwRate; // dwRate / dwScale == samples/second
  66. DWORD dwStart;
  67. DWORD dwLength; // In units above...
  68. DWORD dwSuggestedBufferSize;
  69. DWORD dwQuality;
  70. DWORD dwSampleSize;
  71. DWORD dwTop;
  72. DWORD dwLeft;
  73. DWORD dwRight;
  74. DWORD dwBottom;
  75. } AVIStreamHeader;
  76. typedef struct
  77. {
  78. DWORD ckid;
  79. DWORD dwFlags;
  80. DWORD dwChunkOffset; // Position of chunk
  81. DWORD dwChunkLength; // Length of chunk
  82. } AVIINDEXENTRY;
  83. //////////////////////////////////////////////////////////////////////////////
  84. //////////////////////////////////////////////////////////////////////////////
  85. //////////////////////////////////////////////////////////////////////////////
  86. #endif _AVIFMT_H_