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.

281 lines
12 KiB

  1. // $Header: G:/SwDev/WDM/Video/bt848/rcs/Rgb24fmt.h 1.5 1998/04/29 22:43:37 tomz Exp $
  2. #ifndef __RGB24FMT_H
  3. #define __RGB24FMT_H
  4. #ifndef __DEFAULTS_H
  5. #include "defaults.h"
  6. #endif
  7. KS_DATARANGE_VIDEO StreamFormatRGB24Bpp =
  8. {
  9. // KSDATARANGE
  10. {
  11. {
  12. sizeof( KS_DATARANGE_VIDEO ),
  13. 0,
  14. DefWidth * DefHeight * 3, // SampleSize
  15. 0, // Reserved
  16. { STATIC_KSDATAFORMAT_TYPE_VIDEO },
  17. { 0xe436eb7d, 0x524f, 0x11ce, { 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70 } }, //MEDIASUBTYPE_RGB24,
  18. { STATIC_KSDATAFORMAT_SPECIFIER_VIDEOINFO }
  19. }
  20. },
  21. true,
  22. true,
  23. KS_VIDEOSTREAM_PREVIEW, // StreamDescriptionFlags (KS_VIDEO_DESC_*)
  24. 0, // MemoryAllocationFlags (KS_VIDEO_ALLOC_*)
  25. // _KS_VIDEO_STREAM_CONFIG_CAPS
  26. {
  27. { STATIC_KSDATAFORMAT_SPECIFIER_VIDEOINFO }, // GUID
  28. KS_AnalogVideo_NTSC_M, // AnalogVideoStandard
  29. {
  30. MaxInWidth, MaxInHeight // SIZE InputSize
  31. },
  32. {
  33. MinInWidth, MinInHeight // SIZE MinCroppingSize; smallest rcSrc cropping rect allowed
  34. },
  35. {
  36. MaxInWidth, MaxInHeight // SIZE MaxCroppingSize; largest rcSrc cropping rect allowed
  37. },
  38. 2, // int CropGranularityX; // granularity of cropping size
  39. 2, // int CropGranularityY;
  40. 2, // int CropAlignX; // alignment of cropping rect
  41. 2, // int CropAlignY;
  42. {
  43. MinOutWidth, MinOutHeight // SIZE MinOutputSize; smallest bitmap stream can produce
  44. },
  45. {
  46. MaxOutWidth, MaxOutHeight // SIZE MaxOutputSize; largest bitmap stream can produce
  47. },
  48. 2, // int OutputGranularityX; // granularity of output bitmap size
  49. 2, // int OutputGranularityY;
  50. 0, // StretchTapsX (0 no stretch, 1 pix dup, 2 interp...)
  51. 0, // StretchTapsY
  52. 2, // ShrinkTapsX
  53. 2, // ShrinkTapsY
  54. 333667, // LONGLONG MinFrameInterval; // 100 nS units
  55. 333667, // LONGLONG MaxFrameInterval;
  56. 3 * 30 * MinOutWidth * MinOutHeight,// LONG MinBitsPerSecond;
  57. 3 * 30 * MaxOutWidth * MaxOutHeight //LONG MaxBitsPerSecond;
  58. },
  59. // KS_VIDEOINFOHEADER (default format)
  60. {
  61. { 0,0,0,0 }, // RECT rcSource; // The bit we really want to use
  62. { 0,0,0,0 }, // RECT rcTarget; // Where the video should go
  63. DefWidth * DefHeight * 3 * 30L, // DWORD dwBitRate; // Approximate bit data rate
  64. 0L, // DWORD dwBitErrorRate; // Bit error rate for this stream
  65. 333667, // REFERENCE_TIME AvgTimePerFrame; // Average time per frame (100ns units)
  66. {
  67. sizeof( KS_BITMAPINFOHEADER ), // DWORD biSize;
  68. DefWidth, // LONG biWidth;
  69. DefHeight, // LONG biHeight;
  70. 1, // WORD biPlanes;
  71. 24, // WORD biBitCount;
  72. KS_BI_RGB, // DWORD biCompression;
  73. DefWidth * DefHeight * 3, // DWORD biSizeImage;
  74. 0, // LONG biXPelsPerMeter;
  75. 0, // LONG biYPelsPerMeter;
  76. 0, // DWORD biClrUsed;
  77. 0 // DWORD biClrImportant;
  78. }
  79. }
  80. };
  81. KS_DATARANGE_VIDEO2 StreamFormat2RGB24Bpp =
  82. {
  83. // KSDATARANGE
  84. {
  85. {
  86. sizeof( KS_DATARANGE_VIDEO2 ),
  87. 0,
  88. DefWidth * DefHeight * 3, // SampleSize
  89. 0, // Reserved
  90. { STATIC_KSDATAFORMAT_TYPE_VIDEO },
  91. { 0xe436eb7d, 0x524f, 0x11ce, { 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70 } }, //MEDIASUBTYPE_RGB24,
  92. { STATIC_KSDATAFORMAT_SPECIFIER_VIDEOINFO2 }
  93. }
  94. },
  95. true,
  96. true,
  97. KS_VIDEOSTREAM_PREVIEW, // StreamDescriptionFlags (KS_VIDEO_DESC_*)
  98. 0, // MemoryAllocationFlags (KS_VIDEO_ALLOC_*)
  99. // _KS_VIDEO_STREAM_CONFIG_CAPS
  100. {
  101. { STATIC_KSDATAFORMAT_SPECIFIER_VIDEOINFO2 }, // GUID
  102. KS_AnalogVideo_NTSC_M, // AnalogVideoStandard
  103. {
  104. MaxInWidth, MaxInHeight // SIZE InputSize
  105. },
  106. {
  107. MinInWidth, MinInHeight // SIZE MinCroppingSize; smallest rcSrc cropping rect allowed
  108. },
  109. {
  110. MaxInWidth, MaxInHeight // SIZE MaxCroppingSize; largest rcSrc cropping rect allowed
  111. },
  112. 2, // int CropGranularityX; // granularity of cropping size
  113. 2, // int CropGranularityY;
  114. 2, // int CropAlignX; // alignment of cropping rect
  115. 2, // int CropAlignY;
  116. {
  117. MinOutWidth, MinOutHeight // SIZE MinOutputSize; smallest bitmap stream can produce
  118. },
  119. {
  120. MaxOutWidth, MaxOutHeight // SIZE MaxOutputSize; largest bitmap stream can produce
  121. },
  122. 2, // int OutputGranularityX; // granularity of output bitmap size
  123. 2, // int OutputGranularityY;
  124. 0, // StretchTapsX (0 no stretch, 1 pix dup, 2 interp...)
  125. 0, // StretchTapsY
  126. 2, // ShrinkTapsX
  127. 2, // ShrinkTapsY
  128. 333667, // LONGLONG MinFrameInterval; // 100 nS units
  129. 333667, // LONGLONG MaxFrameInterval;
  130. 3 * 30 * MinOutWidth * MinOutHeight,// LONG MinBitsPerSecond;
  131. 3 * 30 * MaxOutWidth * MaxOutHeight //LONG MaxBitsPerSecond;
  132. },
  133. // KS_VIDEOINFOHEADER2 (default format)
  134. {
  135. { 0,0,0,0 }, // RECT rcSource; // The bit we really want to use
  136. { 0,0,0,0 }, // RECT rcTarget; // Where the video should go
  137. DefWidth * DefHeight * 3 * 30L, // DWORD dwBitRate; // Approximate bit data rate
  138. 0L, // DWORD dwBitErrorRate; // Bit error rate for this stream
  139. 333667, // REFERENCE_TIME AvgTimePerFrame; // Average time per frame (100ns units)
  140. #if 0
  141. //TODO: video memory must be available for interlacing to work
  142. KS_INTERLACE_IsInterlaced | // DWORD dwInterlaceFlags
  143. #else
  144. KS_INTERLACE_1FieldPerSample
  145. //| KS_INTERLACE_Field1First
  146. //| KS_INTERLACE_FieldPatField1Only
  147. | KS_INTERLACE_FieldPatBothRegular
  148. | KS_INTERLACE_DisplayModeBobOnly,
  149. //| KS_INTERLACE_DisplayModeBobOrWeave,
  150. #endif
  151. // use AMINTERLACE_* defines. Reject connection if undefined bits are not 0
  152. // AMINTERLACE_IsInterlaced
  153. // AMINTERLACE_1FieldPerSample
  154. // AMINTERLACE_Field1First
  155. // AMINTERLACE_UNUSED
  156. // AMINTERLACE_FieldPatternMask
  157. // AMINTERLACE_FieldPatField1Only
  158. // AMINTERLACE_FieldPatField2Only
  159. // AMINTERLACE_FieldPatBothRegular
  160. // AMINTERLACE_FieldPatBothIrregular
  161. // AMINTERLACE_DisplayModeMask
  162. // AMINTERLACE_DisplayModeBobOnly
  163. // AMINTERLACE_DisplayModeWeaveOnly
  164. // AMINTERLACE_DisplayModeBobOrWeave
  165. //
  166. 0, // DWORD dwCopyProtectFlags
  167. // use AMCOPYPROTECT_* defines. Reject connection if undefined bits are not 0
  168. // AMCOPYPROTECT_RestrictDuplication
  169. //
  170. 4, // DWORD dwPictAspectRatioX
  171. // X dimension of picture aspect ratio, e.g. 16 for 16x9 display
  172. //
  173. 3, // DWORD dwPictAspectRatioY
  174. // Y dimension of picture aspect ratio, e.g. 9 for 16x9 display
  175. 0, // DWORD dwReserved1
  176. 0, // DWORD dwReserved2
  177. {
  178. sizeof( KS_BITMAPINFOHEADER ), // DWORD biSize;
  179. DefWidth, // LONG biWidth;
  180. DefHeight, // LONG biHeight;
  181. 1, // WORD biPlanes;
  182. 24, // WORD biBitCount;
  183. KS_BI_RGB, // DWORD biCompression;
  184. DefWidth * DefHeight * 3, // DWORD biSizeImage;
  185. 0, // LONG biXPelsPerMeter;
  186. 0, // LONG biYPelsPerMeter;
  187. 0, // DWORD biClrUsed;
  188. 0 // DWORD biClrImportant;
  189. }
  190. }
  191. };
  192. KS_DATARANGE_VIDEO StreamFormatRGB24Bpp_Capture =
  193. {
  194. // KSDATARANGE
  195. {
  196. {
  197. sizeof( KS_DATARANGE_VIDEO ),
  198. 0,
  199. DefWidth * DefHeight * 3, // SampleSize
  200. 0, // Reserved
  201. { STATIC_KSDATAFORMAT_TYPE_VIDEO },
  202. { 0xe436eb7d, 0x524f, 0x11ce, { 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70 } }, //MEDIASUBTYPE_RGB24,
  203. { STATIC_KSDATAFORMAT_SPECIFIER_VIDEOINFO }
  204. }
  205. },
  206. true,
  207. true,
  208. KS_VIDEOSTREAM_CAPTURE, // StreamDescriptionFlags (KS_VIDEO_DESC_*)
  209. 0, // MemoryAllocationFlags (KS_VIDEO_ALLOC_*)
  210. // _KS_VIDEO_STREAM_CONFIG_CAPS
  211. {
  212. { STATIC_KSDATAFORMAT_SPECIFIER_VIDEOINFO }, // GUID
  213. KS_AnalogVideo_NTSC_M, // AnalogVideoStandard
  214. {
  215. MaxInWidth, MaxInHeight // SIZE InputSize
  216. },
  217. {
  218. MinInWidth, MinInHeight // SIZE MinCroppingSize; smallest rcSrc cropping rect allowed
  219. },
  220. {
  221. MaxInWidth, MaxInHeight // SIZE MaxCroppingSize; largest rcSrc cropping rect allowed
  222. },
  223. 2, // int CropGranularityX; // granularity of cropping size
  224. 2, // int CropGranularityY;
  225. 2, // int CropAlignX; // alignment of cropping rect
  226. 2, // int CropAlignY;
  227. {
  228. MinOutWidth, MinOutHeight // SIZE MinOutputSize; smallest bitmap stream can produce
  229. },
  230. {
  231. MaxOutWidth, MaxOutHeight // SIZE MaxOutputSize; largest bitmap stream can produce
  232. },
  233. 2, // int OutputGranularityX; // granularity of output bitmap size
  234. 2, // int OutputGranularityY;
  235. 0, // StretchTapsX (0 no stretch, 1 pix dup, 2 interp...)
  236. 0, // StretchTapsY
  237. 2, // ShrinkTapsX
  238. 2, // ShrinkTapsY
  239. 333667, // LONGLONG MinFrameInterval; // 100 nS units
  240. 333667, // LONGLONG MaxFrameInterval;
  241. 3 * 30 * MinOutWidth * MinOutHeight,// LONG MinBitsPerSecond;
  242. 3 * 30 * MaxOutWidth * MaxOutHeight //LONG MaxBitsPerSecond;
  243. },
  244. // KS_VIDEOINFOHEADER (default format)
  245. {
  246. { 0,0,0,0 }, // RECT rcSource; // The bit we really want to use
  247. { 0,0,0,0 }, // RECT rcTarget; // Where the video should go
  248. DefWidth * DefHeight * 3 * 30L, // DWORD dwBitRate; // Approximate bit data rate
  249. 0L, // DWORD dwBitErrorRate; // Bit error rate for this stream
  250. 333667, // REFERENCE_TIME AvgTimePerFrame; // Average time per frame (100ns units)
  251. {
  252. sizeof( KS_BITMAPINFOHEADER ), // DWORD biSize;
  253. DefWidth, // LONG biWidth;
  254. DefHeight, // LONG biHeight;
  255. 1, // WORD biPlanes;
  256. 24, // WORD biBitCount;
  257. KS_BI_RGB, // DWORD biCompression;
  258. DefWidth * DefHeight * 3, // DWORD biSizeImage;
  259. 0, // LONG biXPelsPerMeter;
  260. 0, // LONG biYPelsPerMeter;
  261. 0, // DWORD biClrUsed;
  262. 0 // DWORD biClrImportant;
  263. }
  264. }
  265. };
  266. #endif