Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

148 lines
4.9 KiB

  1. /*
  2. * @DEC_COPYRIGHT@
  3. */
  4. /*
  5. * HISTORY
  6. * $Log: avi.h,v $
  7. * Revision 1.1.2.4 1996/01/15 16:26:22 Hans_Graves
  8. * Added Wave stuff
  9. * [1996/01/15 15:43:39 Hans_Graves]
  10. *
  11. * Revision 1.1.2.3 1996/01/08 16:41:23 Hans_Graves
  12. * Renamed AVI header structures.
  13. * [1996/01/08 15:45:16 Hans_Graves]
  14. *
  15. * Revision 1.1.2.2 1995/12/07 19:31:26 Hans_Graves
  16. * Creation under SLIB
  17. * [1995/12/07 18:29:05 Hans_Graves]
  18. *
  19. * $EndLog$
  20. */
  21. /*****************************************************************************
  22. ** Copyright (c) Digital Equipment Corporation, 1995 **
  23. ** **
  24. ** All Rights Reserved. Unpublished rights reserved under the copyright **
  25. ** laws of the United States. **
  26. ** **
  27. ** The software contained on this media is proprietary to and embodies **
  28. ** the confidential technology of Digital Equipment Corporation. **
  29. ** Possession, use, duplication or dissemination of the software and **
  30. ** media is authorized only pursuant to a valid written license from **
  31. ** Digital Equipment Corporation. **
  32. ** **
  33. ** RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure by the U.S. **
  34. ** Government is subject to restrictions as set forth in Subparagraph **
  35. ** (c)(1)(ii) of DFARS 252.227-7013, or in FAR 52.227-19, as applicable. **
  36. ******************************************************************************/
  37. #ifndef _AVI_H_
  38. #define _AVI_H_
  39. /************** AVI parsing definitions **************/
  40. typedef unsigned short twocc_t;
  41. typedef unsigned int fourcc_t;
  42. #ifndef FOURCC
  43. #define FOURCC( ch0, ch1, ch2, ch3 ) \
  44. ( (fourcc_t)(char)(ch3) | ( (fourcc_t)(char)(ch2) << 8 ) | \
  45. ( (fourcc_t)(char)(ch1) << 16 ) | ( (fourcc_t)(char)(ch0) << 24 ) )
  46. #endif
  47. /* Macro to make a TWOCC out of two characters */
  48. #ifndef TWOCC
  49. #define TWOCC(ch0, ch1) ((twocc_t)(char)(ch1)|((twocc_t)(char)(ch0)<<8))
  50. #endif
  51. /* form types, list types, and chunk types */
  52. #define AVI_AVI FOURCC('A', 'V', 'I', ' ')
  53. #define AVI_AVIHEADERTYPE FOURCC('h', 'd', 'r', 'l')
  54. #define AVI_MAINHDR FOURCC('a', 'v', 'i', 'h')
  55. #define AVI_STREAMHEADERTYPE FOURCC('s', 't', 'r', 'l')
  56. #define AVI_STREAMHEADER FOURCC('s', 't', 'r', 'h')
  57. #define AVI_STREAMFORMAT FOURCC('s', 't', 'r', 'f')
  58. #define AVI_STREAMHANDLERDATA FOURCC('s', 't', 'r', 'd')
  59. #define AVI_MOVIETYPE FOURCC('m', 'o', 'v', 'i')
  60. #define AVI_RECORDTYPE FOURCC('r', 'e', 'c', ' ')
  61. #define AVI_NEWINDEX FOURCC('i', 'd', 'x', '1')
  62. /*
  63. ** Stream types for the <fccType> field of the stream header.
  64. */
  65. #define AVI_VIDEOSTREAM FOURCC('v', 'i', 'd', 's')
  66. #define AVI_AUDIOSTREAM FOURCC('a', 'u', 'd', 's')
  67. /* Basic chunk types */
  68. #define AVI_DIBbits TWOCC('d', 'b')
  69. #define AVI_DIBcompressed TWOCC('d', 'c')
  70. #define AVI_PALchange TWOCC('p', 'c')
  71. #define AVI_WAVEbytes TWOCC('w', 'b')
  72. #define AVI_Indeo TWOCC('i', 'v')
  73. /* Chunk id to use for extra chunks for padding. */
  74. #define AVI_PADDING FOURCC('J', 'U', 'N', 'K')
  75. typedef struct
  76. {
  77. dword dwMicroSecPerFrame; /* frame display rate */
  78. dword dwMaxBytesPerSec; /* max. transfer rate */
  79. dword dwPaddingGranularity; /* pad to multiples of this */
  80. /* size; normally 2K. */
  81. dword dwFlags; /* the ever-present flags */
  82. dword dwTotalFrames; /* # frames in file */
  83. dword dwInitialFrames;
  84. dword dwStreams;
  85. dword dwSuggestedBufferSize;
  86. dword dwWidth;
  87. dword dwHeight;
  88. dword dwReserved[4];
  89. } AVI_MainHeader;
  90. typedef struct {
  91. short left,top,right,bottom;
  92. } DUMMYRECT;
  93. typedef struct {
  94. fourcc_t fccType;
  95. fourcc_t fccHandler;
  96. dword dwFlags; /* Contains AVITF_* flags */
  97. dword dwPriority;
  98. dword dwInitialFrames;
  99. dword dwScale;
  100. dword dwRate; /* dwRate / dwScale == samples/second */
  101. dword dwStart;
  102. dword dwLength; /* In units above... */
  103. dword dwSuggestedBufferSize;
  104. dword dwQuality;
  105. dword dwSampleSize;
  106. DUMMYRECT rcFrame;
  107. } AVI_StreamHeader;
  108. typedef struct
  109. {
  110. dword ckid;
  111. dword dwFlags;
  112. dword dwChunkOffset; /* Position of chunk */
  113. dword dwChunkLength; /* Length of chunk */
  114. } AVI_INDEXENTRY;
  115. #define RIFF_WAVE FOURCC('W', 'A', 'V', 'E')
  116. #define RIFF_FORMAT FOURCC('f', 'm', 't', ' ')
  117. #define RIFF_DATA FOURCC('d', 'a', 't', 'a')
  118. typedef struct
  119. {
  120. word wFormatTag;
  121. word nChannels;
  122. dword nSamplesPerSec;
  123. dword nAvgBytesPerSec;
  124. word nBlockAlign;
  125. word wBitsPerSample;
  126. } WAVE_format;
  127. #endif _AVI_H_