Source code of Windows XP (NT5)
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.

184 lines
4.8 KiB

  1. /*
  2. * MEDDIBS.H
  3. *
  4. * This is the external definition of the video converter handlers.
  5. *
  6. * This file requires "windows.h", "mediaman.h"
  7. */
  8. #ifndef _MEDDIBS_H_
  9. #define _MEDDIBS_H_
  10. #define medtypeDIBS medFOURCC('D','I','B','S') // logical type
  11. #define medtypeIRLE medFOURCC('I','R','L','E') // 'rle' format
  12. #define medtypeRLE0 medFOURCC('R','L','E','0') // 'rle0' format
  13. #define medtypeMERI medFOURCC('M','E','R','I')
  14. #define medtypeFLI medFOURCC('F','L','I',' ') // Autodesk .fli
  15. #define medtypeDIBSEQ medFOURCC('D','S','E','Q') // DIB sequence
  16. #define medtypeAVID medFOURCC('A','V','I',' ') // AVI DIBS
  17. #define medtypeAVI0 medFOURCC('A','V','I','0') // Old AVI
  18. #define medtypeAVIW medFOURCC('A','V','I','W') // AVI WAVE
  19. #define medtypeAVIP medFOURCC('A','V','I','P') // AVI Palette
  20. #define medtypeAVIM medFOURCC('A','V','I','M') // AVI MIDI
  21. #define medtypeAVIMDIB medFOURCC('M','D','B','A') // AVI MDIB
  22. #ifndef mmioFOURCC
  23. #define mmioFOURCC( ch0, ch1, ch2, ch3 ) \
  24. ( (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ) | \
  25. ( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) )
  26. #endif
  27. #define DIBSF_NONINTERLEAVED 0x0001
  28. #define DIBSF_NOPADDING 0x0040
  29. #define DIBSF_VARIABLESIZEREC 0x0080
  30. #define DIBSC_RANDOMACCESS 0x00000001
  31. #define DIBSC_USEABLERANDOM 0x00000002
  32. #define DIBSC_FASTACCESS 0x00000004
  33. // The flag below is used if the handler supports quality, key frames, etc.
  34. #define DIBSC_EXTENDEDINFO 0x00000008
  35. #define DIBSC_KNOWSLENGTH 0x00000010
  36. #define DIBSC_RETURNSFULLFRAMES 0x00000020
  37. #define DIBS_GETINFO (MED_USER)
  38. typedef struct {
  39. DWORD dwFlags;
  40. DWORD dwCapabilities;
  41. DWORD dwWidth;
  42. DWORD dwHeight;
  43. DWORD dwBytesPerSec; /* if not zero. */
  44. DWORD dwMicroSecPerFrame;
  45. DWORD dwStreams;
  46. DWORD dwQuality;
  47. DWORD dwFoo;
  48. DWORD dwKeyFrameEvery;
  49. DWORD dwAudioEvery;
  50. } DIBSINFO;
  51. /* quality flags */
  52. #define ICQUALITY_LOW 0
  53. #define ICQUALITY_HIGH 10000
  54. #define ICQUALITY_DEFAULT -1
  55. typedef struct {
  56. DIBSINFO di;
  57. DWORD dwFrames;
  58. MEDTYPE medtypePhys;
  59. } DIBSCREATE;
  60. #define DIBS_GETSTREAMTYPE (MED_USER+1)
  61. /* Define stream types here.... */
  62. #define DIBS_STREAM_VIDEO medFOURCC('v', 'i', 'd', 's')
  63. #define DIBS_STREAM_AUDIO medFOURCC('a', 'u', 'd', 's')
  64. #define DIBS_STREAM_MIDI medFOURCC('m', 'i', 'd', 's')
  65. #define DIBS_STREAM_TEXT medFOURCC('t', 'x', 't', 's')
  66. #define DIBS_GETSTREAMFORMAT (MED_USER+2)
  67. #define DIBS_GETSTREAMHANDLER (MED_USER+3)
  68. #define DIBS_GETHANDLERDATA (MED_USER+4)
  69. #define DIBS_GETFRAMEDATA (MED_USER+5)
  70. #define DIBS_GETLENGTH (MED_USER+6)
  71. #define DIBS_GETKEYFRAMEINFO (MED_USER+7)
  72. #define DIBS_GETFILESIZE (MED_USER+8)
  73. #define DIBS_GETFRAMESIZE (MED_USER+9)
  74. #define DIBS_GETRAWDATA (MED_USER+10)
  75. #define DIBS_VID_KEYFRAME 0x01000000L
  76. #define DIBS_VID_PERCENT(dwRet) LOBYTE(HIWORD(dwRet))
  77. #define DIBS_VID_HDIB(dwRet) ((HANDLE) LOWORD(dwRet))
  78. #define MediaDibsSetError(ERR) medSetExtError(ERR, ghInst)
  79. /* lParam1 = buffer, lParam2 = buffer length. return = data size */
  80. #define MED_GETEXTRACHUNKS 0x0080
  81. /* Should the structure below even be public? */
  82. typedef struct {
  83. DIBSINFO di;
  84. DWORD dwFrames;
  85. HMED hMed;
  86. DWORD dwFileLength;
  87. DWORD dwFrame;
  88. MEDTYPE medTypeCurrent;
  89. MEDID medidOld;
  90. HANDLE hColors;
  91. BITMAPINFOHEADER bih;
  92. #if 0
  93. MEDID medidWAVE;
  94. MEDID medidMIDI;
  95. FOURCC fccVideoCompType;
  96. LPSTR lpVCParms;
  97. DWORD dwVCLen;
  98. FOURCC fccAudioCompType;
  99. LPSTR lpACParms;
  100. DWORD dwACLen;
  101. #endif
  102. DWORD dwPhysData;
  103. } MediaDibs, FAR * FPMediaDibs;
  104. #define DIBSF_NONINTERLEAVED 0x0001
  105. #define DIBSF_VARIABLESIZEREC 0x0080
  106. #define DIBSF_ALREADYCOMPRESSED 0x0100
  107. #define OLDRLEF_MERGECOLORS 0x0010
  108. #define OLDRLEF_SKIPSINGLE 0x0020
  109. #define OLDRLEF_ADAPTIVE 0x0040
  110. #define DIBSF_SPECIAL 0x1000
  111. #define DIBSF_SPECIAL2 0x2000
  112. /* ERROR MESSAGE DEFINITIONS, must be greater than 100 */
  113. #define ERRCNV_BAD_HEADER 101
  114. #define ERRCNV_MEMORY 102
  115. #define ERRCNV_EOF 103
  116. #define ERRCNV_NOVIDEO 104
  117. #define ERRCNV_NOAUDIO 105
  118. #define ERRCNV_NOT_FORM 120
  119. #define ERRCNV_OPEN_INPUT 121
  120. #define ERRCNV_OPEN_OUTPUT 122
  121. #define ERRCNV_WRITING 129
  122. #define ERRCNV_NOT_MERID 133
  123. #define ERRCNV_NOTWRITE 143
  124. #define ERRCNV_NOTREAD 144
  125. #define ERRCNV_UNKNOWN 145
  126. #define ERRCNV_SIZE 146
  127. #define ERRCNV_IMAGE 147
  128. #define ERRCNV_WAVEMEMORY 148
  129. #define ERRCNV_BADMEDWAVEVERSION 160
  130. #define ERRCNV_BADDSEQNAME 161
  131. #define ERRCNV_DSEQTOOLONG 162
  132. #define ERRCNV_CANTOPENCOMP 163
  133. #define ERRCNV_DATARATETOOLOW 164
  134. #define ERRCNV_CANTSTARTCOMP 165
  135. #define ERRCNV_NOVIDEOSTREAM 170
  136. #define ERRCNV_TWOVIDEOSTREAMS 171
  137. #define ERRCNV_TWOAUDIOSTREAMS 172
  138. #define ERRCNV_BADFORMAT 173
  139. #define ERRCNV_MEDBITSNOTRUECOLOR 174
  140. #define ERRCNV_ALPHAFORMAT 175
  141. #define ERRCNV_NOPALETTE 176
  142. #define ERRCNV_CHANGESEQNAME 177
  143. #endif /* _MEDDIBS_H_ */