KsMedia.h
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:205k
源码类别:

模拟服务器

开发平台:

C/C++

  1. // bit field definitions for MPEG2 VIDEO mode
  2. //
  3. #define KSMPEGVIDMODE_PANSCAN   0x0001
  4. #define KSMPEGVIDMODE_LTRBOX    0x0002
  5. #define KSMPEGVIDMODE_SCALE     0x0004
  6. //
  7. // rectangle definitions for the 4/3 and 16/9 cropping properties of
  8. // the MPEG2Video decoder
  9. //
  10. typedef struct _KSMPEGVID_RECT {
  11.     ULONG StartX;
  12.     ULONG StartY;
  13.     ULONG EndX;
  14.     ULONG EndY;
  15. } KSMPEGVID_RECT, *PKSMPEGVID_RECT;
  16. //
  17. // Params for pan / scan
  18. //
  19. //
  20. // MPEG2 Audio definition
  21. //
  22. #define STATIC_KSDATAFORMAT_SUBTYPE_MPEG2_AUDIO
  23.     0xe06d802bL, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
  24. DEFINE_GUIDSTRUCT("e06d802b-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SUBTYPE_MPEG2_AUDIO);
  25. #define KSDATAFORMAT_SUBTYPE_MPEG2_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MPEG2_AUDIO)
  26. #define STATIC_KSDATAFORMAT_SPECIFIER_MPEG2_AUDIO
  27.     0xe06d80e5L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
  28. DEFINE_GUIDSTRUCT("e06d80e5-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SPECIFIER_MPEG2_AUDIO);
  29. #define KSDATAFORMAT_SPECIFIER_MPEG2_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_MPEG2_AUDIO)
  30. //
  31. // DVD LPCM Audio definition
  32. //
  33. #define STATIC_KSDATAFORMAT_SUBTYPE_LPCM_AUDIO
  34.     0xe06d8032L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
  35. DEFINE_GUIDSTRUCT("e06d8032-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SUBTYPE_LPCM_AUDIO);
  36. #define KSDATAFORMAT_SUBTYPE_LPCM_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_LPCM_AUDIO)
  37. #define STATIC_KSDATAFORMAT_SPECIFIER_LPCM_AUDIO
  38.     0xe06d80e6L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
  39. DEFINE_GUIDSTRUCT("e06d80e6-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SPECIFIER_LPCM_AUDIO);
  40. #define KSDATAFORMAT_SPECIFIER_LPCM_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_LPCM_AUDIO)
  41. //
  42. // AC-3 definition
  43. //
  44. #define STATIC_KSDATAFORMAT_SUBTYPE_AC3_AUDIO
  45.     0xe06d802cL, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
  46. DEFINE_GUIDSTRUCT("e06d802c-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SUBTYPE_AC3_AUDIO);
  47. #define KSDATAFORMAT_SUBTYPE_AC3_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_AC3_AUDIO)
  48. #define STATIC_KSDATAFORMAT_SPECIFIER_AC3_AUDIO
  49.     0xe06d80e4L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
  50. DEFINE_GUIDSTRUCT("e06d80e4-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SPECIFIER_AC3_AUDIO);
  51. #define KSDATAFORMAT_SPECIFIER_AC3_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_AC3_AUDIO)
  52. #define STATIC_KSPROPSETID_AC3
  53.     0xBFABE720L, 0x6E1F, 0x11D0, 0xBC, 0xF2, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00
  54. DEFINE_GUIDSTRUCT("BFABE720-6E1F-11D0-BCF2-444553540000", KSPROPSETID_AC3);
  55. #define KSPROPSETID_AC3 DEFINE_GUIDNAMED(KSPROPSETID_AC3)
  56. typedef enum {
  57.     KSPROPERTY_AC3_ERROR_CONCEALMENT = 1,
  58.     KSPROPERTY_AC3_ALTERNATE_AUDIO,
  59.     KSPROPERTY_AC3_DOWNMIX,
  60.     KSPROPERTY_AC3_BIT_STREAM_MODE,
  61.     KSPROPERTY_AC3_DIALOGUE_LEVEL,
  62.     KSPROPERTY_AC3_LANGUAGE_CODE,
  63.     KSPROPERTY_AC3_ROOM_TYPE
  64. } KSPROPERTY_AC3;
  65. typedef struct  {
  66.     BOOL        fRepeatPreviousBlock;
  67.     BOOL        fErrorInCurrentBlock;
  68. } KSAC3_ERROR_CONCEALMENT, *PKSAC3_ERROR_CONCEALMENT;
  69. typedef struct {
  70.     BOOL    fStereo;
  71.     ULONG   DualMode;
  72. } KSAC3_ALTERNATE_AUDIO, *PKSAC3_ALTERNATE_AUDIO;
  73. #define KSAC3_ALTERNATE_AUDIO_1     1
  74. #define KSAC3_ALTERNATE_AUDIO_2     2
  75. #define KSAC3_ALTERNATE_AUDIO_BOTH  3
  76. typedef struct {
  77.     BOOL        fDownMix;
  78.     BOOL        fDolbySurround;
  79. } KSAC3_DOWNMIX, *PKSAC3_DOWNMIX;
  80. typedef struct {
  81.     LONG        BitStreamMode;
  82. } KSAC3_BIT_STREAM_MODE, *PKSAC3_BIT_STREAM_MODE;
  83. #define KSAC3_SERVICE_MAIN_AUDIO            0
  84. #define KSAC3_SERVICE_NO_DIALOG             1
  85. #define KSAC3_SERVICE_VISUALLY_IMPAIRED     2
  86. #define KSAC3_SERVICE_HEARING_IMPAIRED      3
  87. #define KSAC3_SERVICE_DIALOG_ONLY           4
  88. #define KSAC3_SERVICE_COMMENTARY            5
  89. #define KSAC3_SERVICE_EMERGENCY_FLASH       6
  90. #define KSAC3_SERVICE_VOICE_OVER            7
  91. typedef struct {
  92.     ULONG   DialogueLevel;
  93. } KSAC3_DIALOGUE_LEVEL, *PKSAC3_DIALOGUE_LEVEL;
  94. typedef struct {
  95.     BOOL    fLargeRoom;
  96. } KSAC3_ROOM_TYPE, *PKSAC3_ROOM_TYPE;
  97. //
  98. // DTS and SDDS definitions (media subtype GUIDs)
  99. //
  100. #define STATIC_KSDATAFORMAT_SUBTYPE_DTS_AUDIO
  101.     0xe06d8033L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
  102. DEFINE_GUIDSTRUCT("e06d8033-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SUBTYPE_DTS_AUDIO);
  103. #define KSDATAFORMAT_SUBTYPE_DTS_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_DTS_AUDIO)
  104. #define STATIC_KSDATAFORMAT_SUBTYPE_SDDS_AUDIO
  105.     0xe06d8034L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
  106. DEFINE_GUIDSTRUCT("e06d8034-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SUBTYPE_SDDS_AUDIO);
  107. #define KSDATAFORMAT_SUBTYPE_SDDS_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_SDDS_AUDIO)
  108. //
  109. // audio decoder output properties
  110. //
  111. #define STATIC_KSPROPSETID_AudioDecoderOut
  112.     0x6ca6e020L, 0x43bd, 0x11d0, 0xbd, 0x6a, 0x00, 0x35, 0x05, 0xc1, 0x03, 0xa9
  113. DEFINE_GUIDSTRUCT("6ca6e020-43bd-11d0-bd6a-003505c103a9", KSPROPSETID_AudioDecoderOut);
  114. #define KSPROPSETID_AudioDecoderOut DEFINE_GUIDNAMED(KSPROPSETID_AudioDecoderOut)
  115. typedef enum {
  116.     KSPROPERTY_AUDDECOUT_MODES,         // available output modes of decoder
  117.     KSPROPERTY_AUDDECOUT_CUR_MODE,      // current mode of the decoder
  118. } KSPROPERTY_AUDDECOUT;
  119. #define KSAUDDECOUTMODE_STEREO_ANALOG   0x0001
  120. #define KSAUDDECOUTMODE_PCM_51          0x0002
  121. #define KSAUDDECOUTMODE_SPDIFF          0x0004
  122. //
  123. // subpicture definition
  124. //
  125. #define STATIC_KSDATAFORMAT_SUBTYPE_SUBPICTURE
  126.     0xe06d802dL, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
  127. DEFINE_GUIDSTRUCT("e06d802d-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SUBTYPE_SUBPICTURE);
  128. #define KSDATAFORMAT_SUBTYPE_SUBPICTURE DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_SUBPICTURE)
  129. #define STATIC_KSPROPSETID_DvdSubPic
  130.     0xac390460L, 0x43af, 0x11d0, 0xbd, 0x6a, 0x00, 0x35, 0x05, 0xc1, 0x03, 0xa9
  131. DEFINE_GUIDSTRUCT("ac390460-43af-11d0-bd6a-003505c103a9", KSPROPSETID_DvdSubPic);
  132. #define KSPROPSETID_DvdSubPic DEFINE_GUIDNAMED(KSPROPSETID_DvdSubPic)
  133. typedef enum {
  134.     KSPROPERTY_DVDSUBPIC_PALETTE,
  135.     KSPROPERTY_DVDSUBPIC_HLI,
  136.     KSPROPERTY_DVDSUBPIC_COMPOSIT_ON,  // TRUE for subpicture is displayed
  137. } KSPROPERTY_DVDSUBPIC;
  138. typedef struct _KS_DVD_YCrCb {
  139.     UCHAR   Reserved;
  140.     UCHAR   Y;
  141.     UCHAR   Cr;
  142.     UCHAR   Cb;
  143. } KS_DVD_YCrCb, *PKS_DVD_YCrCb;
  144. /* The KS_DVD_YUV structure is now superseded by KS_DVD_YCrCb above and is
  145.    here for backward compatibility only */
  146. typedef struct _KS_DVD_YUV {
  147.     UCHAR   Reserved;
  148.     UCHAR   Y;
  149.     UCHAR   V;
  150.     UCHAR   U;
  151. } KS_DVD_YUV, *PKS_DVD_YUV;
  152. typedef struct _KSPROPERTY_SPPAL {
  153.     KS_DVD_YUV sppal[16];
  154. } KSPROPERTY_SPPAL, *PKSPROPERTY_SPPAL;
  155. typedef struct _KS_COLCON {
  156.     UCHAR emph1col:4;
  157.     UCHAR emph2col:4;
  158.     UCHAR backcol:4;
  159.     UCHAR patcol:4;
  160.     UCHAR emph1con:4;
  161.     UCHAR emph2con:4;
  162.     UCHAR backcon:4;
  163.     UCHAR patcon:4;
  164. } KS_COLCON, *PKS_COLCON;
  165. typedef struct _KSPROPERTY_SPHLI {
  166.     USHORT      HLISS;
  167.     USHORT      Reserved;
  168.     ULONG       StartPTM;   // start presentation time in x/90000
  169.     ULONG       EndPTM;     // end PTM in x/90000
  170.     USHORT      StartX;
  171.     USHORT      StartY;
  172.     USHORT      StopX;
  173.     USHORT      StopY;
  174.     KS_COLCON   ColCon;     // color contrast description (4 bytes as given in HLI)
  175. } KSPROPERTY_SPHLI, *PKSPROPERTY_SPHLI;
  176. typedef BOOL KSPROPERTY_COMPOSIT_ON, *PKSPROPERTY_COMPOSIT_ON;
  177. #define STATIC_KSPROPSETID_CopyProt 
  178.     0x0E8A0A40L, 0x6AEF, 0x11D0, 0x9E, 0xD0, 0x00, 0xA0, 0x24, 0xCA, 0x19, 0xB3
  179. DEFINE_GUIDSTRUCT("0E8A0A40-6AEF-11D0-9ED0-00A024CA19B3", KSPROPSETID_CopyProt);
  180. #define KSPROPSETID_CopyProt DEFINE_GUIDNAMED(KSPROPSETID_CopyProt)
  181. typedef enum {
  182.     KSPROPERTY_DVDCOPY_CHLG_KEY = 0x01,
  183.     KSPROPERTY_DVDCOPY_DVD_KEY1,
  184.     KSPROPERTY_DVDCOPY_DEC_KEY2,
  185.     KSPROPERTY_DVDCOPY_TITLE_KEY,
  186.     KSPROPERTY_COPY_MACROVISION,
  187.     KSPROPERTY_DVDCOPY_REGION,
  188.     KSPROPERTY_DVDCOPY_SET_COPY_STATE,
  189.     KSPROPERTY_DVDCOPY_DISC_KEY = 0x80
  190. } KSPROPERTY_COPYPROT;
  191. typedef struct _KS_DVDCOPY_CHLGKEY {
  192.     BYTE ChlgKey[10];
  193.     BYTE Reserved[2];
  194. } KS_DVDCOPY_CHLGKEY, *PKS_DVDCOPY_CHLGKEY;
  195. typedef struct _KS_DVDCOPY_BUSKEY {
  196.     BYTE BusKey[5];
  197.     BYTE Reserved[1];
  198. } KS_DVDCOPY_BUSKEY, *PKS_DVDCOPY_BUSKEY;
  199. typedef struct _KS_DVDCOPY_DISCKEY {
  200.     BYTE DiscKey[2048];
  201. } KS_DVDCOPY_DISCKEY, *PKS_DVDCOPY_DISCKEY;
  202. typedef struct _KS_DVDCOPY_REGION {
  203.     UCHAR   Reserved;
  204.     UCHAR   RegionData;
  205.     UCHAR   Reserved2[2];
  206. } KS_DVDCOPY_REGION, *PKS_DVDCOPY_REGION;
  207. typedef struct _KS_DVDCOPY_TITLEKEY {
  208.     ULONG KeyFlags;
  209.     ULONG ReservedNT[2];
  210.     UCHAR TitleKey[6];
  211.     UCHAR Reserved[2];
  212. } KS_DVDCOPY_TITLEKEY, *PKS_DVDCOPY_TITLEKEY;
  213. typedef struct _KS_COPY_MACROVISION {
  214.     ULONG MACROVISIONLevel;
  215. } KS_COPY_MACROVISION, *PKS_COPY_MACROVISION;
  216. typedef struct _KS_DVDCOPY_SET_COPY_STATE {
  217.     ULONG DVDCopyState;
  218. } KS_DVDCOPY_SET_COPY_STATE, *PKS_DVDCOPY_SET_COPY_STATE;
  219. typedef enum {
  220.     KS_DVDCOPYSTATE_INITIALIZE,         // indicates we are starting a full
  221.                                         // copy protection sequence.
  222.     KS_DVDCOPYSTATE_INITIALIZE_TITLE,   // indicates we are starting a title
  223.                                         // key copy protection sequence
  224.     KS_DVDCOPYSTATE_AUTHENTICATION_NOT_REQUIRED,
  225.     KS_DVDCOPYSTATE_AUTHENTICATION_REQUIRED,
  226.     KS_DVDCOPYSTATE_DONE,
  227. } KS_DVDCOPYSTATE;
  228. typedef enum {
  229.     KS_MACROVISION_DISABLED,
  230.     KS_MACROVISION_LEVEL1,
  231.     KS_MACROVISION_LEVEL2,
  232.     KS_MACROVISION_LEVEL3
  233. } KS_COPY_MACROVISION_LEVEL, *PKS_COPY_MACROVISION_LEVEL;
  234. //
  235. // CGMS Copy Protection Flags
  236. //
  237. #define KS_DVD_CGMS_RESERVED_MASK      0x00000078
  238. #define KS_DVD_CGMS_COPY_PROTECT_MASK  0x00000018
  239. #define KS_DVD_CGMS_COPY_PERMITTED     0x00000000
  240. #define KS_DVD_CGMS_COPY_ONCE          0x00000010
  241. #define KS_DVD_CGMS_NO_COPY            0x00000018
  242. #define KS_DVD_COPYRIGHT_MASK          0x00000040
  243. #define KS_DVD_NOT_COPYRIGHTED         0x00000000
  244. #define KS_DVD_COPYRIGHTED             0x00000040
  245. #define KS_DVD_SECTOR_PROTECT_MASK     0x00000020
  246. #define KS_DVD_SECTOR_NOT_PROTECTED    0x00000000
  247. #define KS_DVD_SECTOR_PROTECTED        0x00000020
  248. //===========================================================================
  249. // The following MUST match the structures in WinGDI.h and AMVideo.h
  250. //===========================================================================
  251. #define STATIC_KSCATEGORY_TVTUNER 
  252.     0xa799a800L, 0xa46d, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0x24, 0x01, 0xdc, 0xd4
  253. DEFINE_GUIDSTRUCT("a799a800-a46d-11d0-a18c-00a02401dcd4", KSCATEGORY_TVTUNER);
  254. #define KSCATEGORY_TVTUNER DEFINE_GUIDNAMED(KSCATEGORY_TVTUNER)
  255. #define STATIC_KSCATEGORY_CROSSBAR 
  256.     0xa799a801L, 0xa46d, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0x24, 0x01, 0xdc, 0xd4
  257. DEFINE_GUIDSTRUCT("a799a801-a46d-11d0-a18c-00a02401dcd4", KSCATEGORY_CROSSBAR);
  258. #define KSCATEGORY_CROSSBAR DEFINE_GUIDNAMED(KSCATEGORY_CROSSBAR)
  259. #define STATIC_KSCATEGORY_TVAUDIO 
  260.     0xa799a802L, 0xa46d, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0x24, 0x01, 0xdc, 0xd4
  261. DEFINE_GUIDSTRUCT("a799a802-a46d-11d0-a18c-00a02401dcd4", KSCATEGORY_TVAUDIO);
  262. #define KSCATEGORY_TVAUDIO DEFINE_GUIDNAMED(KSCATEGORY_TVAUDIO)
  263. #define STATIC_KSCATEGORY_VPMUX 
  264.     0xa799a803L, 0xa46d, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0x24, 0x01, 0xdc, 0xd4
  265. DEFINE_GUIDSTRUCT("a799a803-a46d-11d0-a18c-00a02401dcd4", KSCATEGORY_VPMUX);
  266. #define KSCATEGORY_VPMUX DEFINE_GUIDNAMED(KSCATEGORY_VPMUX)
  267. #define STATIC_KSCATEGORY_VBICODEC 
  268.     0x07dad660L, 0x22f1, 0x11d1, 0xa9, 0xf4, 0x00, 0xc0, 0x4f, 0xbb, 0xde, 0x8f
  269. DEFINE_GUIDSTRUCT("07dad660-22f1-11d1-a9f4-00c04fbbde8f", KSCATEGORY_VBICODEC);
  270. #define KSCATEGORY_VBICODEC DEFINE_GUIDNAMED(KSCATEGORY_VBICODEC)
  271. // SUBTYPE_VPVideo
  272. #define STATIC_KSDATAFORMAT_SUBTYPE_VPVideo
  273.     0x5a9b6a40L, 0x1a22, 0x11d1, 0xba, 0xd9, 0x0, 0x60, 0x97, 0x44, 0x11, 0x1a
  274. DEFINE_GUIDSTRUCT("5a9b6a40-1a22-11d1-bad9-00609744111a", KSDATAFORMAT_SUBTYPE_VPVideo);
  275. #define KSDATAFORMAT_SUBTYPE_VPVideo DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_VPVideo)
  276. // SUBTYPE_VPVBI
  277. #define STATIC_KSDATAFORMAT_SUBTYPE_VPVBI
  278.     0x5a9b6a41L, 0x1a22, 0x11d1, 0xba, 0xd9, 0x0, 0x60, 0x97, 0x44, 0x11, 0x1a
  279. DEFINE_GUIDSTRUCT("5a9b6a41-1a22-11d1-bad9-00609744111a", KSDATAFORMAT_SUBTYPE_VPVBI);
  280. #define KSDATAFORMAT_SUBTYPE_VPVBI DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_VPVBI)
  281. // FORMAT_VideoInfo
  282. #define STATIC_KSDATAFORMAT_SPECIFIER_VIDEOINFO
  283.     0x05589f80L, 0xc356, 0x11ce, 0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a
  284. DEFINE_GUIDSTRUCT("05589f80-c356-11ce-bf01-00aa0055595a", KSDATAFORMAT_SPECIFIER_VIDEOINFO);
  285. #define KSDATAFORMAT_SPECIFIER_VIDEOINFO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_VIDEOINFO)
  286. // FORMAT_VideoInfo2
  287. #define STATIC_KSDATAFORMAT_SPECIFIER_VIDEOINFO2
  288.     0xf72a76A0L, 0xeb0a, 0x11d0, 0xac, 0xe4, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba
  289. DEFINE_GUIDSTRUCT("f72a76A0-eb0a-11d0-ace4-0000c0cc16ba", KSDATAFORMAT_SPECIFIER_VIDEOINFO2);
  290. #define KSDATAFORMAT_SPECIFIER_VIDEOINFO2 DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_VIDEOINFO2)
  291. // MEDIATYPE_AnalogVideo
  292. #define STATIC_KSDATAFORMAT_TYPE_ANALOGVIDEO
  293.     0x0482dde1L, 0x7817, 0x11cf, 0x8a, 0x03, 0x00, 0xaa, 0x00, 0x6e, 0xcb, 0x65
  294. DEFINE_GUIDSTRUCT("0482dde1-7817-11cf-8a03-00aa006ecb65", KSDATAFORMAT_TYPE_ANALOGVIDEO);
  295. #define KSDATAFORMAT_TYPE_ANALOGVIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_ANALOGVIDEO)
  296. // FORMAT_AnalogVideo
  297. #define STATIC_KSDATAFORMAT_SPECIFIER_ANALOGVIDEO
  298.     0x0482dde0L, 0x7817, 0x11cf, 0x8a, 0x03, 0x00, 0xaa, 0x00, 0x6e, 0xcb, 0x65
  299. DEFINE_GUIDSTRUCT("0482dde0-7817-11cf-8a03-00aa006ecb65", KSDATAFORMAT_SPECIFIER_ANALOGVIDEO);
  300. #define KSDATAFORMAT_SPECIFIER_ANALOGVIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_ANALOGVIDEO)
  301. // FORMAT_VBI
  302. #define STATIC_KSDATAFORMAT_SPECIFIER_VBI
  303.     0xf72a76e0L, 0xeb0a, 0x11d0, 0xac, 0xe4, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba
  304. DEFINE_GUIDSTRUCT("f72a76e0-eb0a-11d0-ace4-0000c0cc16ba", KSDATAFORMAT_SPECIFIER_VBI);
  305. #define KSDATAFORMAT_SPECIFIER_VBI DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_VBI)
  306. // MEDIATYPE_VBI
  307. #define STATIC_KSDATAFORMAT_TYPE_VBI
  308.     0xf72a76e1L, 0xeb0a, 0x11d0, 0xac, 0xe4, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba
  309. DEFINE_GUIDSTRUCT("f72a76e1-eb0a-11d0-ace4-0000c0cc16ba", KSDATAFORMAT_TYPE_VBI);
  310. #define KSDATAFORMAT_TYPE_VBI DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_VBI)
  311. // SUBTYPE_RAW8
  312. #define STATIC_KSDATAFORMAT_SUBTYPE_RAW8
  313.     0xca20d9a0, 0x3e3e, 0x11d1, 0x9b, 0xf9, 0x0, 0xc0, 0x4f, 0xbb, 0xde, 0xbf
  314. DEFINE_GUIDSTRUCT("ca20d9a0-3e3e-11d1-9bf9-00c04fbbdebf", KSDATAFORMAT_SUBTYPE_RAW8);
  315. #define KSDATAFORMAT_SUBTYPE_RAW8 DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_RAW8)
  316. // MEDIASUBTYPE_CC
  317. #define STATIC_KSDATAFORMAT_SUBTYPE_CC
  318.     0x33214cc1, 0x11f, 0x11d2, 0xb4, 0xb1, 0x0, 0xa0, 0xd1, 0x2, 0xcf, 0xbe
  319. DEFINE_GUIDSTRUCT("33214CC1-011F-11D2-B4B1-00A0D102CFBE", KSDATAFORMAT_SUBTYPE_CC);
  320. #define KSDATAFORMAT_SUBTYPE_CC DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_CC)
  321. // MEDIASUBTYPE_NABTS
  322. #define STATIC_KSDATAFORMAT_SUBTYPE_NABTS
  323.     0xf72a76e2L, 0xeb0a, 0x11d0, 0xac, 0xe4, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba
  324. DEFINE_GUIDSTRUCT("f72a76e2-eb0a-11d0-ace4-0000c0cc16ba", KSDATAFORMAT_SUBTYPE_NABTS);
  325. #define KSDATAFORMAT_SUBTYPE_NABTS DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_NABTS)
  326. // MEDIASUBTYPE_TELETEXT
  327. #define STATIC_KSDATAFORMAT_SUBTYPE_TELETEXT
  328.     0xf72a76e3L, 0xeb0a, 0x11d0, 0xac, 0xe4, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba
  329. DEFINE_GUIDSTRUCT("f72a76e3-eb0a-11d0-ace4-0000c0cc16ba", KSDATAFORMAT_SUBTYPE_TELETEXT);
  330. #define KSDATAFORMAT_SUBTYPE_TELETEXT DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_TELETEXT)
  331. /* constants for the biCompression field */
  332. #define KS_BI_RGB        0L
  333. #define KS_BI_RLE8       1L
  334. #define KS_BI_RLE4       2L
  335. #define KS_BI_BITFIELDS  3L
  336. typedef struct tagKS_RGBQUAD { // rgbq
  337.     BYTE    rgbBlue;
  338.     BYTE    rgbGreen;
  339.     BYTE    rgbRed;
  340.     BYTE    rgbReserved;
  341. } KS_RGBQUAD, *PKS_RGBQUAD;
  342. /* constants for palettes */
  343. #define KS_iPALETTE_COLORS 256     // Maximum colours in palette
  344. #define KS_iEGA_COLORS 16          // Number colours in EGA palette
  345. #define KS_iMASK_COLORS 3          // Maximum three components
  346. #define KS_iTRUECOLOR 16           // Minimum true colour device
  347. #define KS_iRED 0                  // Index position for RED mask
  348. #define KS_iGREEN 1                // Index position for GREEN mask
  349. #define KS_iBLUE 2                 // Index position for BLUE mask
  350. #define KS_iPALETTE 8              // Maximum colour depth using a palette
  351. #define KS_iMAXBITS 8              // Maximum bits per colour component
  352. #define KS_SIZE_EGA_PALETTE (KS_iEGA_COLORS * sizeof(KS_RGBQUAD))
  353. #define KS_SIZE_PALETTE (KS_iPALETTE_COLORS * sizeof(KS_RGBQUAD))
  354. typedef struct tagKS_BITMAPINFOHEADER{
  355.         DWORD      biSize;
  356.         LONG       biWidth;
  357.         LONG       biHeight;
  358.         WORD       biPlanes;
  359.         WORD       biBitCount;
  360.         DWORD      biCompression;
  361.         DWORD      biSizeImage;
  362.         LONG       biXPelsPerMeter;
  363.         LONG       biYPelsPerMeter;
  364.         DWORD      biClrUsed;
  365.         DWORD      biClrImportant;
  366. } KS_BITMAPINFOHEADER, *PKS_BITMAPINFOHEADER;
  367. // Used for true colour images that also have a palette
  368. typedef struct tag_KS_TRUECOLORINFO {
  369.     DWORD   dwBitMasks[KS_iMASK_COLORS];
  370.     KS_RGBQUAD bmiColors[KS_iPALETTE_COLORS];
  371. } KS_TRUECOLORINFO, *PKS_TRUECOLORINFO;
  372. #define KS_WIDTHBYTES(bits) ((DWORD)(((bits)+31) & (~31)) / 8)
  373. #define KS_DIBWIDTHBYTES(bi) (DWORD)KS_WIDTHBYTES((DWORD)(bi).biWidth * (DWORD)(bi).biBitCount)
  374. #define KS__DIBSIZE(bi) (KS_DIBWIDTHBYTES(bi) * (DWORD)(bi).biHeight)
  375. #define KS_DIBSIZE(bi) ((bi).biHeight < 0 ? (-1)*(KS__DIBSIZE(bi)) : KS__DIBSIZE(bi))
  376. typedef LONGLONG REFERENCE_TIME;
  377. // The BITMAPINFOHEADER contains all the details about the video stream such
  378. // as the actual image dimensions and their pixel depth. A source filter may
  379. // also request that the sink take only a section of the video by providing a
  380. // clipping rectangle in rcSource. In the worst case where the sink filter
  381. // forgets to check this on connection it will simply render the whole thing
  382. // which isn't a disaster. Ideally a sink filter will check the rcSource and
  383. // if it doesn't support image extraction and the rectangle is not empty then
  384. // it will reject the connection. A filter should use SetRectEmpty to reset a
  385. // rectangle to all zeroes (and IsRectEmpty to later check the rectangle).
  386. // The rcTarget specifies the destination rectangle for the video, for most
  387. // source filters they will set this to all zeroes, a downstream filter may
  388. // request that the video be placed in a particular area of the buffers it
  389. // supplies in which case it will call QueryAccept with a non empty target
  390. typedef struct tagKS_VIDEOINFOHEADER {
  391.     RECT                rcSource;          // The bit we really want to use
  392.     RECT                rcTarget;          // Where the video should go
  393.     DWORD               dwBitRate;         // Approximate bit data rate
  394.     DWORD               dwBitErrorRate;    // Bit error rate for this stream
  395.     REFERENCE_TIME      AvgTimePerFrame;   // Average time per frame (100ns units)
  396.     KS_BITMAPINFOHEADER bmiHeader;
  397. } KS_VIDEOINFOHEADER, *PKS_VIDEOINFOHEADER;
  398. // !!! WARNING !!!
  399. // DO NOT use the following structure unless you are sure that the BITMAPINFOHEADER
  400. // has a normal biSize == sizeof(BITMAPINFOHEADER) !
  401. // !!! WARNING !!!
  402. typedef struct tagKS_VIDEOINFO {
  403.     RECT            rcSource;          // The bit we really want to use
  404.     RECT            rcTarget;          // Where the video should go
  405.     DWORD           dwBitRate;         // Approximate bit data rate
  406.     DWORD           dwBitErrorRate;    // Bit error rate for this stream
  407.     REFERENCE_TIME  AvgTimePerFrame;   // Average time per frame (100ns units)
  408.     KS_BITMAPINFOHEADER bmiHeader;
  409.     union {
  410.         KS_RGBQUAD          bmiColors[KS_iPALETTE_COLORS];     // Colour palette
  411.         DWORD               dwBitMasks[KS_iMASK_COLORS];       // True colour masks
  412.         KS_TRUECOLORINFO    TrueColorInfo;                     // Both of the above
  413.     };
  414. } KS_VIDEOINFO, *PKS_VIDEOINFO;
  415. #define KS_SIZE_MASKS (KS_iMASK_COLORS * sizeof(DWORD))
  416. #define KS_SIZE_PREHEADER (FIELD_OFFSET(KS_VIDEOINFOHEADER,bmiHeader))
  417. // For normal size
  418. // #define KS_SIZE_VIDEOHEADER (sizeof(KS_BITMAPINFOHEADER) + KS_SIZE_PREHEADER)
  419. // !!! for abnormal biSizes
  420. #define KS_SIZE_VIDEOHEADER(pbmi) ((pbmi)->bmiHeader.biSize + KS_SIZE_PREHEADER)
  421. // VBI
  422. // Used for NABTS, CC, Intercast, WST
  423. typedef struct tagKS_VBIINFOHEADER {
  424.     ULONG       StartLine;              // inclusive
  425.     ULONG       EndLine;                // inclusive
  426.     ULONG       SamplingFrequency;      // Hz.
  427.     ULONG       MinLineStartTime;       // microSec * 100 from HSync LE
  428.     ULONG       MaxLineStartTime;       // microSec * 100 from HSync LE
  429.     ULONG       ActualLineStartTime;    // microSec * 100 from HSync LE
  430.     ULONG       ActualLineEndTime;      // microSec * 100 from HSync LE
  431.     ULONG       VideoStandard;          // KS_AnalogVideoStandard*
  432.     ULONG       SamplesPerLine;
  433.     ULONG       StrideInBytes;          // May be > SamplesPerLine
  434.     ULONG       BufferSize;             // Bytes
  435. } KS_VBIINFOHEADER, *PKS_VBIINFOHEADER;
  436. // VBI Sampling Rates
  437. #define KS_VBIDATARATE_NABTS            (5727272L)
  438. #define KS_VBIDATARATE_CC               ( 503493L)    // ~= 1/1.986125e-6
  439. #define KS_VBISAMPLINGRATE_4X_NABTS     ((long)(4*KS_VBIDATARATE_NABTS))
  440. #define KS_VBISAMPLINGRATE_47X_NABTS    ((long)(27000000))
  441. #define KS_VBISAMPLINGRATE_5X_NABTS     ((long)(5*KS_VBIDATARATE_NABTS))
  442. #define KS_47NABTS_SCALER (KS_VBISAMPLINGRATE_47X_NABTS/(double)KS_VBIDATARATE_NABTS)
  443. // Analog video variant - Use this when the format is FORMAT_AnalogVideo
  444. //
  445. // rcSource defines the portion of the active video signal to use
  446. // rcTarget defines the destination rectangle
  447. //    both of the above are relative to the dwActiveWidth and dwActiveHeight fields
  448. // dwActiveWidth is currently set to 720 for all formats (but could change for HDTV)
  449. // dwActiveHeight is 483 for NTSC and 575 for PAL/SECAM  (but could change for HDTV)
  450. typedef struct tagKS_AnalogVideoInfo {
  451.     RECT            rcSource;           // Width max is 720, height varies w/ TransmissionStd
  452.     RECT            rcTarget;           // Where the video should go
  453.     DWORD           dwActiveWidth;      // Always 720 (CCIR-601 active samples per line)
  454.     DWORD           dwActiveHeight;     // 483 for NTSC, 575 for PAL/SECAM
  455.     REFERENCE_TIME  AvgTimePerFrame;    // Normal ActiveMovie units (100 nS)
  456. } KS_ANALOGVIDEOINFO, *PKS_ANALOGVIDEOINFO;
  457. //===========================================================================
  458. // Data packet passed on Analog video stream channel change
  459. //===========================================================================
  460. #define KS_TVTUNER_CHANGE_BEGIN_TUNE    0x0001L  // Starting a tuning operation
  461. #define KS_TVTUNER_CHANGE_END_TUNE      0x0002L  // Ending a tuning operation
  462. typedef struct tagKS_TVTUNER_CHANGE_INFO {
  463.    DWORD                    dwFlags;                // KS_TVTUNER_CHANGE_*
  464.    DWORD                    dwCountryCode;
  465.    DWORD                    dwAnalogVideoStandard;  // KS_AnalogVideoStandard
  466.    DWORD                    dwChannel;
  467. } KS_TVTUNER_CHANGE_INFO, *PKS_TVTUNER_CHANGE_INFO;
  468. //===========================================================================
  469. // Video format blocks
  470. //===========================================================================
  471. typedef enum {
  472.     KS_MPEG2Level_Low,
  473.     KS_MPEG2Level_Main,
  474.     KS_MPEG2Level_High1440,
  475.     KS_MPEG2Level_High
  476. } KS_MPEG2Level;
  477. typedef enum {
  478.     KS_MPEG2Profile_Simple,
  479.     KS_MPEG2Profile_Main,
  480.     KS_MPEG2Profile_SNRScalable,
  481.     KS_MPEG2Profile_SpatiallyScalable,
  482.     KS_MPEG2Profile_High
  483. } KS_MPEG2Profile;
  484. #define KS_INTERLACE_IsInterlaced            0x00000001  // if 0, other interlace bits are irrelevent
  485. #define KS_INTERLACE_1FieldPerSample         0x00000002  // else 2 fields per media sample
  486. #define KS_INTERLACE_Field1First             0x00000004  // else Field 2 is first;  top field in PAL is field 1, top field in NTSC is field 2?
  487. #define KS_INTERLACE_UNUSED                  0x00000008  //
  488. #define KS_INTERLACE_FieldPatternMask        0x00000030  // use this mask with AMINTERLACE_FieldPat*
  489. #define KS_INTERLACE_FieldPatField1Only      0x00000000  // Data never contains a Field2
  490. #define KS_INTERLACE_FieldPatField2Only      0x00000010  // Data never contains a Field1
  491. #define KS_INTERLACE_FieldPatBothRegular     0x00000020  // There will be a Field2 for every Field1 (required for Weave?)
  492. #define KS_INTERLACE_FieldPatBothIrregular   0x00000030  // Random pattern of Field1s and Field2s
  493. #define KS_INTERLACE_DisplayModeMask         0x000000c0
  494. #define KS_INTERLACE_DisplayModeBobOnly      0x00000000
  495. #define KS_INTERLACE_DisplayModeWeaveOnly    0x00000040
  496. #define KS_INTERLACE_DisplayModeBobOrWeave   0x00000080
  497. #define KS_MPEG2_DoPanScan           0x00000001  //if set, the MPEG-2 video decoder should crop output image
  498.                                                 //  based on pan-scan vectors in picture_display_extension
  499.                                                 //  and change the picture aspect ratio accordingly.
  500. #define KS_MPEG2_DVDLine21Field1     0x00000002  //if set, the MPEG-2 decoder must be able to produce an output
  501.                                                 //  pin for DVD style closed caption data found in GOP layer of field 1
  502. #define KS_MPEG2_DVDLine21Field2     0x00000004  //if set, the MPEG-2 decoder must be able to produce an output
  503.                                                 //  pin for DVD style closed caption data found in GOP layer of field 2
  504. #define KS_MPEG2_SourceIsLetterboxed 0x00000008  //if set, indicates that black bars have been encoded in the top
  505.                                                 //  and bottom of the video.
  506. #define KS_MPEG2_FilmCameraMode      0x00000010  //if set, indicates "film mode" used for 625/50 content.  If cleared,
  507.                                                 //  indicates that "camera mode" was used.
  508. #define KS_MPEG2_LetterboxAnalogOut  0x00000020  //if set and this stream is sent to an analog output, it should
  509.                         //  be letterboxed.  Streams sent to VGA should be letterboxed only by renderers.
  510. #define KS_MPEG2_DSS_UserData        0x00000040  //if set, the MPEG-2 decoder must process DSS style user data
  511. #define KS_MPEG2_DVB_UserData        0x00000080  //if set, the MPEG-2 decoder must process DVB style user data
  512. #define KS_MPEG2_27MhzTimebase       0x00000100  //if set, the PTS,DTS timestamps advance at 27MHz rather than 90KHz
  513. typedef struct tagKS_VIDEOINFOHEADER2 {
  514.     RECT                rcSource;
  515.     RECT                rcTarget;
  516.     DWORD               dwBitRate;
  517.     DWORD               dwBitErrorRate;
  518.     REFERENCE_TIME      AvgTimePerFrame;
  519.     DWORD               dwInterlaceFlags;   // use AMINTERLACE_* defines. Reject connection if undefined bits are not 0
  520.     DWORD               dwCopyProtectFlags; // use AMCOPYPROTECT_* defines. Reject connection if undefined bits are not 0
  521.     DWORD               dwPictAspectRatioX; // X dimension of picture aspect ratio, e.g. 16 for 16x9 display
  522.     DWORD               dwPictAspectRatioY; // Y dimension of picture aspect ratio, e.g.  9 for 16x9 display
  523.     DWORD               dwReserved1;        // must be 0; reject connection otherwise
  524.     DWORD               dwReserved2;        // must be 0; reject connection otherwise
  525.     KS_BITMAPINFOHEADER bmiHeader;
  526. } KS_VIDEOINFOHEADER2, *PKS_VIDEOINFOHEADER2;
  527. typedef struct tagKS_MPEG1VIDEOINFO {
  528.     KS_VIDEOINFOHEADER hdr; // Compatible with VIDEOINFO
  529.     DWORD dwStartTimeCode; // 25-bit Group of pictures time code at start of data
  530.     DWORD cbSequenceHeader; // Length in bytes of bSequenceHeader
  531.     BYTE bSequenceHeader[1]; // Sequence header including quantization matrices if any
  532. } KS_MPEG1VIDEOINFO, *PKS_MPEG1VIDEOINFO;
  533. #define KS_MAX_SIZE_MPEG1_SEQUENCE_INFO 140
  534. #define KS_SIZE_MPEG1VIDEOINFO(pv) (FIELD_OFFSET(KS_MPEG1VIDEOINFO, bSequenceHeader[0]) + (pv)->cbSequenceHeader)
  535. #define KS_MPEG1_SEQUENCE_INFO(pv) ((const BYTE *)(pv)->bSequenceHeader)
  536. typedef struct tagKS_MPEGVIDEOINFO2 {
  537.     KS_VIDEOINFOHEADER2 hdr;
  538.     DWORD               dwStartTimeCode;        //  ?? not used for DVD ??
  539.     DWORD               cbSequenceHeader;       // is 0 for DVD (no sequence header)
  540.     DWORD               dwProfile;              // use enum MPEG2Profile
  541.     DWORD               dwLevel;                // use enum MPEG2Level
  542.     DWORD               dwFlags;                // use AMMPEG2_* defines.  Reject connection if undefined bits are not 0
  543.     DWORD               bSequenceHeader[1];     // DWORD instead of Byte for alignment purposes
  544.                                                 //   For MPEG-2, if a sequence_header is included, the sequence_extension
  545.                                                 //   should also be included
  546. } KS_MPEGVIDEOINFO2, *PKS_MPEGVIDEOINFO2;
  547. #define KS_SIZE_MPEGVIDEOINFO2(pv) (FIELD_OFFSET(KS_MPEGVIDEOINFO2, bSequenceHeader[0]) + (pv)->cbSequenceHeader)
  548. #define KS_MPEG1_SEQUENCE_INFO(pv) ((const BYTE *)(pv)->bSequenceHeader)
  549. //===========================================================================
  550. // Audio format blocks
  551. //===========================================================================
  552. //if set, the PTS,DTS timestamps advance at 27MHz rather than 90KHz
  553. #define KS_MPEGAUDIOINFO_27MhzTimebase      0x00000001
  554. typedef struct tagKS_MPEAUDIOINFO {
  555.     DWORD               dwFlags;            // use KS_MPEGAUDIOINFO_* defines.  Reject connection if undefined bits are not 0
  556.     DWORD               dwReserved1;        // must be 0; reject connection otherwise
  557.     DWORD               dwReserved2;        // must be 0; reject connection otherwise
  558.     DWORD               dwReserved3;        // must be 0; reject connection otherwise
  559. } KS_MPEGAUDIOINFO, *PKS_MPEGAUDIOINFO;
  560. //===========================================================================
  561. // Video DATAFORMATs
  562. //===========================================================================
  563. typedef struct tagKS_DATAFORMAT_VIDEOINFOHEADER {
  564.     KSDATAFORMAT            DataFormat;
  565.     KS_VIDEOINFOHEADER      VideoInfoHeader;
  566. } KS_DATAFORMAT_VIDEOINFOHEADER, *PKS_DATAFORMAT_VIDEOINFOHEADER;
  567. typedef struct tagKS_DATAFORMAT_VIDEOINFOHEADER2 {
  568.     KSDATAFORMAT            DataFormat;
  569.     KS_VIDEOINFOHEADER2     VideoInfoHeader2;
  570. } KS_DATAFORMAT_VIDEOINFOHEADER2, *PKS_DATAFORMAT_VIDEOINFOHEADER2;
  571. typedef struct tagKS_DATAFORMAT_VIDEOINFO_PALETTE {
  572.     KSDATAFORMAT            DataFormat;
  573.     KS_VIDEOINFO            VideoInfo;
  574. } KS_DATAFORMAT_VIDEOINFO_PALETTE, *PKS_DATAFORMAT_VIDEOINFO_PALETTE;
  575. typedef struct tagKS_DATAFORMAT_VBIINFOHEADER {
  576.     KSDATAFORMAT            DataFormat;
  577.     KS_VBIINFOHEADER        VBIInfoHeader;
  578. } KS_DATAFORMAT_VBIINFOHEADER, *PKS_DATAFORMAT_VBIINFOHEADER;
  579. typedef struct  _KS_VIDEO_STREAM_CONFIG_CAPS  {
  580.     GUID guid;                  // will be MEDIATYPE_Video
  581.     ULONG VideoStandard;        // logical OR of all AnalogVideoStandards
  582.                                 // supported
  583.     SIZE InputSize;             // the inherent size of the incoming signal
  584.                                 // (every pixel unique)
  585.     SIZE MinCroppingSize;       // smallest rcSrc cropping rect allowed
  586.     SIZE MaxCroppingSize;       // largest rcSrc cropping rect allowed
  587.     int CropGranularityX;       // granularity of cropping size
  588.     int CropGranularityY;
  589.     int CropAlignX;             // alignment of cropping rect
  590.     int CropAlignY;
  591.     SIZE MinOutputSize;         // smallest bitmap stream can produce
  592.     SIZE MaxOutputSize;         // largest  bitmap stream can produce
  593.     int OutputGranularityX;     // granularity of output bitmap size
  594.     int OutputGranularityY;
  595.     int StretchTapsX;           // 0, no stretch, 1 pix dup, 2 interp, ...
  596.     int StretchTapsY;           //    Describes quality of hardware scaler
  597.     int ShrinkTapsX;            //
  598.     int ShrinkTapsY;            //
  599.     LONGLONG MinFrameInterval;  // 100 nS units
  600.     LONGLONG MaxFrameInterval;
  601.     LONG MinBitsPerSecond;
  602.     LONG MaxBitsPerSecond;
  603. } KS_VIDEO_STREAM_CONFIG_CAPS, *PKS_VIDEO_STREAM_CONFIG_CAPS;
  604. //===========================================================================
  605. // Video DATARANGEs
  606. //===========================================================================
  607. typedef struct tagKS_DATARANGE_VIDEO {
  608.    KSDATARANGE                  DataRange;
  609.    BOOL                         bFixedSizeSamples;      // all samples same size?
  610.    BOOL                         bTemporalCompression;   // all I frames?
  611.    DWORD                        StreamDescriptionFlags; // KS_VIDEO_DESC_*
  612.    DWORD                        MemoryAllocationFlags;  // KS_VIDEO_ALLOC_*
  613.    KS_VIDEO_STREAM_CONFIG_CAPS  ConfigCaps;
  614.    KS_VIDEOINFOHEADER           VideoInfoHeader;        // default format
  615. } KS_DATARANGE_VIDEO, *PKS_DATARANGE_VIDEO;
  616. typedef struct tagKS_DATARANGE_VIDEO2 {
  617.    KSDATARANGE                  DataRange;
  618.    BOOL                         bFixedSizeSamples;      // all samples same size?
  619.    BOOL                         bTemporalCompression;   // all I frames?
  620.    DWORD                        StreamDescriptionFlags; // KS_VIDEO_DESC_*
  621.    DWORD                        MemoryAllocationFlags;  // KS_VIDEO_ALLOC_*
  622.    KS_VIDEO_STREAM_CONFIG_CAPS  ConfigCaps;
  623.    KS_VIDEOINFOHEADER2          VideoInfoHeader;        // default format
  624. } KS_DATARANGE_VIDEO2, *PKS_DATARANGE_VIDEO2;
  625. typedef struct tagKS_DATARANGE_MPEG1_VIDEO {
  626.     KSDATARANGE DataRange;
  627.     BOOL bFixedSizeSamples; // all samples same size?
  628.     BOOL bTemporalCompression; // all I frames?
  629.     DWORD StreamDescriptionFlags; // KS_VIDEO_DESC_*
  630.     DWORD MemoryAllocationFlags; // KS_VIDEO_ALLOC_*
  631.     KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps;
  632.     KS_MPEG1VIDEOINFO VideoInfoHeader; // default format
  633. } KS_DATARANGE_MPEG1_VIDEO, *PKS_DATARANGE_MPEG1_VIDEO;
  634. typedef struct tagKS_DATARANGE_MPEG2_VIDEO {
  635.    KSDATARANGE                  DataRange;
  636.    BOOL                         bFixedSizeSamples;      // all samples same size?
  637.    BOOL                         bTemporalCompression;   // all I frames?
  638.    DWORD                        StreamDescriptionFlags; // KS_VIDEO_DESC_*
  639.    DWORD                        MemoryAllocationFlags;  // KS_VIDEO_ALLOC_*
  640.    KS_VIDEO_STREAM_CONFIG_CAPS  ConfigCaps;
  641.    KS_MPEGVIDEOINFO2            VideoInfoHeader;        // default format
  642. } KS_DATARANGE_MPEG2_VIDEO, *PKS_DATARANGE_MPEG2_VIDEO;
  643. typedef struct tagKS_DATARANGE_VIDEO_PALETTE {
  644.    KSDATARANGE                  DataRange;
  645.    BOOL                         bFixedSizeSamples;      // all samples same size?
  646.    BOOL                         bTemporalCompression;   // all I frames?
  647.    DWORD                        StreamDescriptionFlags; // KS_VIDEO_DESC_*
  648.    DWORD                        MemoryAllocationFlags;  // KS_VIDEO_ALLOC_*
  649.    KS_VIDEO_STREAM_CONFIG_CAPS  ConfigCaps;
  650.    KS_VIDEOINFO                 VideoInfo;              // default format
  651. } KS_DATARANGE_VIDEO_PALETTE, *PKS_DATARANGE_VIDEO_PALETTE;
  652. typedef struct tagKS_DATARANGE_VIDEO_VBI {
  653.    KSDATARANGE                  DataRange;
  654.    BOOL                         bFixedSizeSamples;      // all samples same size?
  655.    BOOL                         bTemporalCompression;   // all I frames?
  656.    DWORD                        StreamDescriptionFlags; // KS_VIDEO_DESC_*
  657.    DWORD                        MemoryAllocationFlags;  // KS_VIDEO_ALLOC_*
  658.    KS_VIDEO_STREAM_CONFIG_CAPS  ConfigCaps;
  659.    KS_VBIINFOHEADER             VBIInfoHeader;          // default format
  660. } KS_DATARANGE_VIDEO_VBI, *PKS_DATARANGE_VIDEO_VBI;
  661. typedef struct tagKS_DATARANGE_ANALOGVIDEO {
  662.    KSDATARANGE                  DataRange;
  663.    KS_ANALOGVIDEOINFO           AnalogVideoInfo;
  664. } KS_DATARANGE_ANALOGVIDEO, *PKS_DATARANGE_ANALOGVIDEO;
  665. //===========================================================================
  666. // StreamDescriptionFlags
  667. //
  668. // These define the "purpose" of each video stream
  669. //===========================================================================
  670. #define KS_VIDEOSTREAM_PREVIEW          0x0001  // Preview stream
  671. #define KS_VIDEOSTREAM_CAPTURE          0x0002  // Capture stream
  672. #define KS_VIDEOSTREAM_VBI              0x0010  // Field1 VBI
  673. #define KS_VIDEOSTREAM_NABTS            0x0020  // Field1 NABTS
  674. #define KS_VIDEOSTREAM_CC               0x0100  // Closed Captioning
  675. #define KS_VIDEOSTREAM_EDS              0x0200  // Extended Data Services
  676. #define KS_VIDEOSTREAM_TELETEXT         0x0400  // Field1 Teletext only
  677. #define KS_VIDEOSTREAM_STILL            0x1000  // Still image input
  678. #define KS_VIDEOSTREAM_IS_VPE           0x8000  // Is a VPE based stream?
  679. // MemoryAllocationFlags
  680. #define KS_VIDEO_ALLOC_VPE_SYSTEM       0x0001  // VPE surface in system memory
  681. #define KS_VIDEO_ALLOC_VPE_DISPLAY      0x0002  // VPE surface in display memory
  682. #define KS_VIDEO_ALLOC_VPE_AGP          0x0004  // VPE surface in AGP memory
  683. //////////////////////////////////////////////////////////////
  684. // Capture driver VBI property sets
  685. //////////////////////////////////////////////////////////////
  686. // {F162C607-7B35-496f-AD7F-2DCA3B46B718}
  687. #define STATIC_KSPROPSETID_VBICAP_PROPERTIES
  688.     0xf162c607, 0x7b35, 0x496f, 0xad, 0x7f, 0x2d, 0xca, 0x3b, 0x46, 0xb7, 0x18
  689. DEFINE_GUIDSTRUCT("F162C607-7B35-496f-AD7F-2DCA3B46B718", KSPROPSETID_VBICAP_PROPERTIES);
  690. #define KSPROPSETID_VBICAP_PROPERTIES DEFINE_GUIDNAMED(KSPROPSETID_VBICAP_PROPERTIES)
  691. typedef enum {
  692.     KSPROPERTY_VBICAP_PROPERTIES_PROTECTION = 0x01,
  693. } KSPROPERTY_VBICAP;
  694. typedef struct _VBICAP_PROPERTIES_PROTECTION_S {
  695.     KSPROPERTY Property;
  696.     ULONG      StreamIndex;                     // Index of stream
  697.     ULONG      Status;
  698. } VBICAP_PROPERTIES_PROTECTION_S, *PVBICAP_PROPERTIES_PROTECTION_S;
  699. #define KS_VBICAP_PROTECTION_MV_PRESENT     0x0001L
  700. #define KS_VBICAP_PROTECTION_MV_HARDWARE    0x0002L
  701. #define KS_VBICAP_PROTECTION_MV_DETECTED    0x0004L
  702. /***************************************************************************/
  703. /* VBI Related GUIDs, structs and properties for codecs(generic, cc, nabts)*/
  704. /***************************************************************************/
  705. ///////////////////////////////////////////////////////////////////////////////////////
  706. // IP/NABTS Protocol Reserved Group IDs - Overall Range 0x800-0x8FF [Decimal 2048-2079]
  707. // Intervening values(0-F) are used if there are multiple providers at a particular tier
  708. ///////////////////////////////////////////////////////////////////////////////////////
  709. // Used by individual content creators in show footage/data
  710. #define KS_NABTS_GROUPID_ORIGINAL_CONTENT_BASE                 0x800
  711. #define KS_NABTS_GROUPID_ORIGINAL_CONTENT_ADVERTISER_BASE      0x810
  712. // Used by production company in finished show data
  713. #define KS_NABTS_GROUPID_PRODUCTION_COMPANY_CONTENT_BASE       0x820
  714. #define KS_NABTS_GROUPID_PRODUCTION_COMPANY_ADVERTISER_BASE    0x830
  715. // Used by broadcast syndicates in syndicated show data
  716. #define KS_NABTS_GROUPID_SYNDICATED_SHOW_CONTENT_BASE          0x840
  717. #define KS_NABTS_GROUPID_SYNDICATED_SHOW_ADVERTISER_BASE       0x850
  718. // Used by tv networks in network television data
  719. #define KS_NABTS_GROUPID_NETWORK_WIDE_CONTENT_BASE             0x860
  720. #define KS_NABTS_GROUPID_NETWORK_WIDE_ADVERTISER_BASE          0x870
  721. // Used by telvision stations in local programming data
  722. #define KS_NABTS_GROUPID_TELEVISION_STATION_CONTENT_BASE       0x880
  723. #define KS_NABTS_GROUPID_TELEVISION_STATION_ADVERTISER_BASE    0x890
  724. // Used by cable system in cable head-end originated data
  725. #define KS_NABTS_GROUPID_LOCAL_CABLE_SYSTEM_CONTENT_BASE       0x8A0
  726. #define KS_NABTS_GROUPID_LOCAL_CABLE_SYSTEM_ADVERTISER_BASE    0x8B0
  727. // The values between 0x8C0 - 0x8EF are reserved for future expansion
  728. // Used by Microsoft for Testing purposes (0x8F0 - 0x8FF)
  729. #define KS_NABTS_GROUPID_MICROSOFT_RESERVED_TEST_DATA_BASE     0x8F0
  730. //////////////////////////////////////////////////////////////
  731. // Stream Format FEC-corrected NABTS bundles
  732. //////////////////////////////////////////////////////////////
  733. #define STATIC_KSDATAFORMAT_TYPE_NABTS 
  734.  0xe757bca0, 0x39ac, 0x11d1, 0xa9, 0xf5, 0x0, 0xc0, 0x4f, 0xbb, 0xde, 0x8f
  735. DEFINE_GUIDSTRUCT("E757BCA0-39AC-11d1-A9F5-00C04FBBDE8F", KSDATAFORMAT_TYPE_NABTS);
  736. #define KSDATAFORMAT_TYPE_NABTS DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_NABTS)
  737. #define STATIC_KSDATAFORMAT_SUBTYPE_NABTS_FEC 
  738.  0xe757bca1, 0x39ac, 0x11d1, 0xa9, 0xf5, 0x0, 0xc0, 0x4f, 0xbb, 0xde, 0x8f
  739. DEFINE_GUIDSTRUCT("E757BCA1-39AC-11d1-A9F5-00C04FBBDE8F", KSDATAFORMAT_SUBTYPE_NABTS_FEC);
  740. #define KSDATAFORMAT_SUBTYPE_NABTS_FEC DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_NABTS_FEC)
  741. //////////////////////////////////////////////////////////////
  742. // NABTS Bundle data structure definition
  743. //////////////////////////////////////////////////////////////
  744. #define MAX_NABTS_VBI_LINES_PER_FIELD   11
  745. #define NABTS_LINES_PER_BUNDLE          16
  746. #define NABTS_PAYLOAD_PER_LINE          28
  747. #define NABTS_BYTES_PER_LINE            36
  748. typedef struct _NABTSFEC_BUFFER {
  749.     ULONG       dataSize;
  750.     USHORT      groupID;
  751.     USHORT      Reserved;
  752.     UCHAR       data[NABTS_LINES_PER_BUNDLE * NABTS_PAYLOAD_PER_LINE];
  753. } NABTSFEC_BUFFER, *PNABTSFEC_BUFFER;
  754. //////////////////////////////////////////////////////////////
  755. // vbi codec filtering pin properties
  756. //////////////////////////////////////////////////////////////
  757. #define STATIC_KSPROPSETID_VBICodecFiltering 
  758.     0xcafeb0caL, 0x8715, 0x11d0, 0xbd, 0x6a, 0x00, 0x35, 0xc0, 0xed, 0xba, 0xbe
  759. DEFINE_GUIDSTRUCT("cafeb0ca-8715-11d0-bd6a-0035c0edbabe", KSPROPSETID_VBICodecFiltering);
  760. #define KSPROPSETID_VBICodecFiltering DEFINE_GUIDNAMED(KSPROPSETID_VBICodecFiltering)
  761. typedef enum {
  762.     KSPROPERTY_VBICODECFILTERING_SCANLINES_REQUESTED_BIT_ARRAY = 0x01,
  763.     KSPROPERTY_VBICODECFILTERING_SCANLINES_DISCOVERED_BIT_ARRAY,
  764.     KSPROPERTY_VBICODECFILTERING_SUBSTREAMS_REQUESTED_BIT_ARRAY,
  765.     KSPROPERTY_VBICODECFILTERING_SUBSTREAMS_DISCOVERED_BIT_ARRAY,
  766.     KSPROPERTY_VBICODECFILTERING_STATISTICS,
  767. } KSPROPERTY_VBICODECFILTERING;
  768. typedef struct _VBICODECFILTERING_SCANLINES {
  769.     DWORD   DwordBitArray[32];      // An array of scanline bits 0..1024(32*32)
  770. } VBICODECFILTERING_SCANLINES, *PVBICODECFILTERING_SCANLINES;
  771. typedef struct _VBICODECFILTERING_NABTS_SUBSTREAMS {
  772.     DWORD   SubstreamMask[128];   // An array of 4096 bits (one for each NABTS GroupID)
  773. } VBICODECFILTERING_NABTS_SUBSTREAMS, *PVBICODECFILTERING_NABTS_SUBSTREAMS;
  774. typedef struct _VBICODECFILTERING_CC_SUBSTREAMS {
  775.     DWORD   SubstreamMask;        // An array of 32 bits (see KS_CC_SUBSTREAM *)
  776. } VBICODECFILTERING_CC_SUBSTREAMS, *PVBICODECFILTERING_CC_SUBSTREAMS;
  777. // These KS_CC_SUBSTREAM_* bitmasks are used with VBICODECFILTERING_CC_SUBSTREAMS
  778. #define KS_CC_SUBSTREAM_ODD               0x0001L // Unfiltered Field 1 Data
  779. #define KS_CC_SUBSTREAM_EVEN              0x0002L // Unfiltered Field 2 Data
  780. // The following flags describe CC field 1 substreams: CC1,CC2,TT1,TT2
  781. #define KS_CC_SUBSTREAM_FIELD1_MASK       0x00F0L
  782. #define KS_CC_SUBSTREAM_SERVICE_CC1       0x0010L
  783. #define KS_CC_SUBSTREAM_SERVICE_CC2       0x0020L
  784. #define KS_CC_SUBSTREAM_SERVICE_T1        0x0040L
  785. #define KS_CC_SUBSTREAM_SERVICE_T2        0x0080L
  786. // The following flags describe CC field 2 substreams: CC3,CC4,TT3,TT4,XDS
  787. #define KS_CC_SUBSTREAM_FIELD2_MASK       0x1F00L
  788. #define KS_CC_SUBSTREAM_SERVICE_CC3       0x0100L
  789. #define KS_CC_SUBSTREAM_SERVICE_CC4       0x0200L
  790. #define KS_CC_SUBSTREAM_SERVICE_T3        0x0400L
  791. #define KS_CC_SUBSTREAM_SERVICE_T4        0x0800L
  792. #define KS_CC_SUBSTREAM_SERVICE_XDS       0x1000L
  793. // Special Note: field 1 or 2 substreams are usually on found on field 1 and 2 respectively
  794. // If the VBI odd/even polarity is reversed, the correct filtered data will still be found.
  795. ///////////////////////////////////////////////////////////////////
  796. // Hardware decoded CC stream format
  797. ///////////////////////////////////////////////////////////////////
  798. #define CC_MAX_HW_DECODE_LINES 12
  799. typedef struct _CC_BYTE_PAIR {
  800.     BYTE        Decoded[2];
  801.     USHORT      Reserved;
  802. } CC_BYTE_PAIR, *PCC_BYTE_PAIR;
  803. typedef struct _CC_HW_FIELD {
  804.     VBICODECFILTERING_SCANLINES  ScanlinesRequested;
  805.     ULONG                        fieldFlags;    // KS_VBI_FLAG_FIELD1,2
  806.     LONGLONG                     PictureNumber;
  807.     CC_BYTE_PAIR                 Lines[CC_MAX_HW_DECODE_LINES];
  808. } CC_HW_FIELD, *PCC_HW_FIELD;
  809. ///////////////////////////////////////////////////////////////////
  810. // Raw NABTS stream format (TYPE_NABTS, SUBTYPE_NABTS)
  811. ///////////////////////////////////////////////////////////////////
  812. // These low-level structures are byte packed( -Zp1 )
  813. #if !defined( PACK_PRAGMAS_NOT_SUPPORTED )
  814. #include <pshpack1.h>
  815. #endif
  816. typedef struct _NABTS_BUFFER_LINE {
  817.     BYTE                            Confidence;
  818.     BYTE                            Bytes[NABTS_BYTES_PER_LINE];
  819. } NABTS_BUFFER_LINE, *PNABTS_BUFFER_LINE;
  820. #define NABTS_BUFFER_PICTURENUMBER_SUPPORT 1
  821. typedef struct _NABTS_BUFFER {
  822.     VBICODECFILTERING_SCANLINES     ScanlinesRequested;
  823.     LONGLONG                        PictureNumber;
  824.     NABTS_BUFFER_LINE               NabtsLines[MAX_NABTS_VBI_LINES_PER_FIELD];
  825. } NABTS_BUFFER, *PNABTS_BUFFER;
  826. #if !defined( PACK_PRAGMAS_NOT_SUPPORTED )
  827. #include <poppack.h>
  828. #endif
  829. //////////////////////////////////////////////////////////////
  830. // WST Codec Teletext Media Sample Format
  831. //////////////////////////////////////////////////////////////
  832. #define WST_TVTUNER_CHANGE_BEGIN_TUNE    0x1000L  // Starting a tuning operation
  833. #define WST_TVTUNER_CHANGE_END_TUNE      0x2000L  // Ending a tuning operation
  834. #define MAX_WST_VBI_LINES_PER_FIELD   17
  835. #define WST_BYTES_PER_LINE            42
  836. typedef struct _WST_BUFFER_LINE {
  837.     BYTE                            Confidence;
  838.     BYTE                            Bytes[WST_BYTES_PER_LINE];
  839. } WST_BUFFER_LINE, *PWST_BUFFER_LINE;
  840. typedef struct _WST_BUFFER {
  841.     VBICODECFILTERING_SCANLINES        ScanlinesRequested;
  842.     WST_BUFFER_LINE                    WstLines[MAX_WST_VBI_LINES_PER_FIELD];
  843. } WST_BUFFER, *PWST_BUFFER;
  844. //
  845. // Common codec statistics
  846. //
  847. typedef struct _VBICODECFILTERING_STATISTICS_COMMON {
  848.     DWORD   InputSRBsProcessed;         // upstream SRBs received
  849.     DWORD   OutputSRBsProcessed;        // downstream SRBs sent
  850.     DWORD   SRBsIgnored;                // SRBs ignored due to no requests
  851.     DWORD   InputSRBsMissing;           // SRBs dropped upstream
  852.     DWORD   OutputSRBsMissing;          // Output dropped because no SRB pending
  853.     DWORD   OutputFailures;             // dropped because of other failure
  854.     DWORD   InternalErrors;             // could not process due to int. failure
  855.     DWORD   ExternalErrors;             // could not process due to ext. failure
  856.     DWORD   InputDiscontinuities;       // discontinuities received
  857.     DWORD   DSPFailures;                // DSP confidence failure
  858.     DWORD   TvTunerChanges;             // number of received KS_TVTUNER_CHANGE_BEGIN_TUNE and KS_TVTUNER_CHANGE_END_TUNE pairs.
  859.     DWORD   VBIHeaderChanges;           // number of received KS_VBI_FLAG_VBIINFOHEADER_CHANGE
  860.     DWORD   LineConfidenceAvg;          // Average of all DSP confidence results
  861.     DWORD   BytesOutput;                // Bytes sent downstream
  862. } VBICODECFILTERING_STATISTICS_COMMON, *PVBICODECFILTERING_STATISTICS_COMMON;
  863. typedef struct _VBICODECFILTERING_STATISTICS_COMMON_PIN {
  864.     DWORD   SRBsProcessed;              // SRBs sent/received
  865.     DWORD   SRBsIgnored;                // SRBs ignored due to filtering
  866.     DWORD   SRBsMissing;                // SRBs not sent/received
  867.     DWORD   InternalErrors;             // could not send/receive due to int. failure
  868.     DWORD   ExternalErrors;             // could not send/receive due to ext. failure
  869.     DWORD   Discontinuities;            // discontinuities received/sent
  870.     DWORD   LineConfidenceAvg;          // Average of all DSP confidence results for this pin
  871.     DWORD   BytesOutput;                // Bytes sent downstream
  872. } VBICODECFILTERING_STATISTICS_COMMON_PIN, *PVBICODECFILTERING_STATISTICS_COMMON_PIN;
  873. //
  874. // Codec-specific statistics - NABTS
  875. //
  876. typedef struct _VBICODECFILTERING_STATISTICS_NABTS {
  877.     VBICODECFILTERING_STATISTICS_COMMON Common; // Generic VBI statistics
  878.     DWORD   FECBundleBadLines;          // Un-FEC-correctable lines
  879.     DWORD   FECQueueOverflows;          // Number of times FEC queue overflowed
  880.     DWORD   FECCorrectedLines;          // Lines CSUM corrected by FEC
  881.     DWORD   FECUncorrectableLines;      // FEC input lines not CSUM correctable
  882.     DWORD   BundlesProcessed;           // Bundles received from FEC
  883.     DWORD   BundlesSent2IP;             // Bundles sent to IP driver
  884.     DWORD   FilteredLines;              // Lines processed and then dropped
  885.                                         // because no one was interested
  886. } VBICODECFILTERING_STATISTICS_NABTS, *PVBICODECFILTERING_STATISTICS_NABTS;
  887. typedef struct _VBICODECFILTERING_STATISTICS_NABTS_PIN {
  888.     VBICODECFILTERING_STATISTICS_COMMON_PIN Common;// Generic VBI pin statistics
  889. } VBICODECFILTERING_STATISTICS_NABTS_PIN, *PVBICODECFILTERING_STATISTICS_NABTS_PIN;
  890. //
  891. // Codec-specific statistics - Closed Caption
  892. //
  893. typedef struct _VBICODECFILTERING_STATISTICS_CC {
  894.     VBICODECFILTERING_STATISTICS_COMMON Common; // Generic VBI statistics
  895. } VBICODECFILTERING_STATISTICS_CC, *PVBICODECFILTERING_STATISTICS_CC;
  896. typedef struct _VBICODECFILTERING_STATISTICS_CC_PIN {
  897.     VBICODECFILTERING_STATISTICS_COMMON_PIN Common;// Generic VBI pin statistics
  898. } VBICODECFILTERING_STATISTICS_CC_PIN, *PVBICODECFILTERING_STATISTICS_CC_PIN;
  899. //
  900. // Codec-specific statistics - Closed Caption
  901. //
  902. typedef struct _VBICODECFILTERING_STATISTICS_TELETEXT {
  903.     VBICODECFILTERING_STATISTICS_COMMON Common; // Generic VBI statistics
  904. } VBICODECFILTERING_STATISTICS_TELETEXT, *PVBICODECFILTERING_STATISTICS_TELETEXT;
  905. typedef struct _VBICODECFILTERING_STATISTICS_TELETEXT_PIN {
  906.     VBICODECFILTERING_STATISTICS_COMMON_PIN Common;// Generic VBI pin statistics
  907. } VBICODECFILTERING_STATISTICS_TELETEXT_PIN, *PVBICODECFILTERING_STATISTICS_TELETEXT_PIN;
  908. ////////////////////////////////////////////////////////////////////////////
  909. // VBI codec property structures(based on KSPROPERTY_VBICODECFILTERING enum)
  910. ////////////////////////////////////////////////////////////////////////////
  911. // *** Most codecs support this property
  912. //    KSPROPERTY_VBICODECFILTERING_SCANLINES_REQUESTED_BIT_ARRAY
  913. //    KSPROPERTY_VBICODECFILTERING_SCANLINES_DISCOVERED_BIT_ARRAY,
  914. typedef struct {
  915.     KSPROPERTY                          Property;
  916.     VBICODECFILTERING_SCANLINES         Scanlines;
  917. } KSPROPERTY_VBICODECFILTERING_SCANLINES_S, *PKSPROPERTY_VBICODECFILTERING_SCANLINES_S;
  918. // *** NABTS codecs support this property
  919. //    KSPROPERTY_VBICODECFILTERING_SUBSTREAMS_REQUESTED_BIT_ARRAY,
  920. //    KSPROPERTY_VBICODECFILTERING_SUBSTREAMS_DISCOVERED_BIT_ARRAY,
  921. typedef struct {
  922.     KSPROPERTY                          Property;
  923.     VBICODECFILTERING_NABTS_SUBSTREAMS  Substreams;
  924. } KSPROPERTY_VBICODECFILTERING_NABTS_SUBSTREAMS_S, *PKSPROPERTY_VBICODECFILTERING_NABTS_SUBSTREAMS_S;
  925. // *** Closed captioning codecs support this property
  926. //    KSPROPERTY_VBICODECFILTERING_SUBSTREAMS_REQUESTED_BIT_ARRAY,
  927. //    KSPROPERTY_VBICODECFILTERING_SUBSTREAMS_DISCOVERED_BIT_ARRAY,
  928. typedef struct {
  929.     KSPROPERTY                              Property;
  930.     VBICODECFILTERING_CC_SUBSTREAMS         Substreams;
  931. } KSPROPERTY_VBICODECFILTERING_CC_SUBSTREAMS_S, *PKSPROPERTY_VBICODECFILTERING_CC_SUBSTREAMS_S;
  932. // *** Most codecs support these versions of the global and pin properties
  933. //    KSPROPERTY_VBICODECFILTERING_STATISTICS
  934. typedef struct {
  935.     KSPROPERTY                              Property;
  936.     VBICODECFILTERING_STATISTICS_COMMON     Statistics;
  937. } KSPROPERTY_VBICODECFILTERING_STATISTICS_COMMON_S, *PKSPROPERTY_VBICODECFILTERING_STATISTICS_COMMON_S;
  938. typedef struct {
  939.     KSPROPERTY                              Property;
  940.     VBICODECFILTERING_STATISTICS_COMMON_PIN Statistics;
  941. } KSPROPERTY_VBICODECFILTERING_STATISTICS_COMMON_PIN_S, *PKSPROPERTY_VBICODECFILTERING_STATISTICS_COMMON_PIN_S;
  942. // *** NABTS codecs support this version of the global and pin properties
  943. //    KSPROPERTY_VBICODECFILTERING_STATISTICS
  944. typedef struct {
  945.     KSPROPERTY                              Property;
  946.     VBICODECFILTERING_STATISTICS_NABTS      Statistics;
  947. } KSPROPERTY_VBICODECFILTERING_STATISTICS_NABTS_S, *PKSPROPERTY_VBICODECFILTERING_STATISTICS_NABTS_S;
  948. typedef struct {
  949.     KSPROPERTY                              Property;
  950.     VBICODECFILTERING_STATISTICS_NABTS_PIN  Statistics;
  951. } KSPROPERTY_VBICODECFILTERING_STATISTICS_NABTS_PIN_S, *PKSPROPERTY_VBICODECFILTERING_STATISTICS_NABTS_PIN_S;
  952. // *** Closed captioning codecs support this version of the global and pin properties
  953. //    KSPROPERTY_VBICODECFILTERING_STATISTICS
  954. typedef struct {
  955.     KSPROPERTY                              Property;
  956.     VBICODECFILTERING_STATISTICS_CC         Statistics;
  957. } KSPROPERTY_VBICODECFILTERING_STATISTICS_CC_S, *PKSPROPERTY_VBICODECFILTERING_STATISTICS_CC_S;
  958. typedef struct {
  959.     KSPROPERTY                              Property;
  960.     VBICODECFILTERING_STATISTICS_CC_PIN     Statistics;
  961. } KSPROPERTY_VBICODECFILTERING_STATISTICS_CC_PIN_S, *PKSPROPERTY_VBICODECFILTERING_STATISTICS_CC_PIN_S;
  962. // Standard Pin Names for the video capture filter
  963. //===========================================================================
  964. #define STATIC_PINNAME_VIDEO_CAPTURE 
  965.     0xfb6c4281, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
  966. #define STATIC_PINNAME_CAPTURE STATIC_PINNAME_VIDEO_CAPTURE
  967. DEFINE_GUIDSTRUCT("FB6C4281-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_CAPTURE);
  968. #define PINNAME_VIDEO_CAPTURE DEFINE_GUIDNAMED(PINNAME_VIDEO_CAPTURE)
  969. #define PINNAME_CAPTURE PINNAME_VIDEO_CAPTURE
  970. #define STATIC_PINNAME_VIDEO_CC_CAPTURE 
  971.     0x1aad8061, 0x12d, 0x11d2, 0xb4, 0xb1, 0x0, 0xa0, 0xd1, 0x2, 0xcf, 0xbe
  972. #define STATIC_PINNAME_CC_CAPTURE STATIC_PINNAME_VIDEO_CC_CAPTURE
  973. DEFINE_GUIDSTRUCT("1AAD8061-012D-11d2-B4B1-00A0D102CFBE", PINNAME_VIDEO_CC_CAPTURE);
  974. #define PINNAME_VIDEO_CC_CAPTURE DEFINE_GUIDNAMED(PINNAME_VIDEO_CC_CAPTURE)
  975. #define STATIC_PINNAME_VIDEO_NABTS_CAPTURE 
  976.     0x29703660, 0x498a, 0x11d2, 0xb4, 0xb1, 0x0, 0xa0, 0xd1, 0x2, 0xcf, 0xbe
  977. #define STATIC_PINNAME_NABTS_CAPTURE STATIC_PINNAME_VIDEO_NABTS_CAPTURE
  978. DEFINE_GUIDSTRUCT("29703660-498A-11d2-B4B1-00A0D102CFBE", PINNAME_VIDEO_NABTS_CAPTURE);
  979. #define PINNAME_VIDEO_NABTS_CAPTURE DEFINE_GUIDNAMED(PINNAME_VIDEO_NABTS_CAPTURE)
  980. #define STATIC_PINNAME_VIDEO_PREVIEW 
  981.     0xfb6c4282, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
  982. #define STATIC_PINNAME_PREVIEW STATIC_PINNAME_VIDEO_PREVIEW
  983. DEFINE_GUIDSTRUCT("FB6C4282-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_PREVIEW);
  984. #define PINNAME_VIDEO_PREVIEW DEFINE_GUIDNAMED(PINNAME_VIDEO_PREVIEW)
  985. #define PINNAME_PREVIEW PINNAME_VIDEO_PREVIEW
  986. #define STATIC_PINNAME_VIDEO_ANALOGVIDEOIN 
  987.     0xfb6c4283, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
  988. DEFINE_GUIDSTRUCT("FB6C4283-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_ANALOGVIDEOIN);
  989. #define PINNAME_VIDEO_ANALOGVIDEOIN DEFINE_GUIDNAMED(PINNAME_VIDEO_ANALOGVIDEOIN)
  990. #define STATIC_PINNAME_VIDEO_VBI 
  991.     0xfb6c4284, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
  992. DEFINE_GUIDSTRUCT("FB6C4284-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_VBI);
  993. #define PINNAME_VIDEO_VBI DEFINE_GUIDNAMED(PINNAME_VIDEO_VBI)
  994. #define STATIC_PINNAME_VIDEO_VIDEOPORT 
  995.     0xfb6c4285, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
  996. DEFINE_GUIDSTRUCT("FB6C4285-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_VIDEOPORT);
  997. #define PINNAME_VIDEO_VIDEOPORT DEFINE_GUIDNAMED(PINNAME_VIDEO_VIDEOPORT)
  998. #define STATIC_PINNAME_VIDEO_NABTS 
  999.     0xfb6c4286, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
  1000. DEFINE_GUIDSTRUCT("FB6C4286-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_NABTS);
  1001. #define PINNAME_VIDEO_NABTS DEFINE_GUIDNAMED(PINNAME_VIDEO_NABTS)
  1002. #define STATIC_PINNAME_VIDEO_EDS 
  1003.     0xfb6c4287, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
  1004. DEFINE_GUIDSTRUCT("FB6C4287-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_EDS);
  1005. #define PINNAME_VIDEO_EDS DEFINE_GUIDNAMED(PINNAME_VIDEO_EDS)
  1006. #define STATIC_PINNAME_VIDEO_TELETEXT 
  1007.     0xfb6c4288, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
  1008. DEFINE_GUIDSTRUCT("FB6C4288-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_TELETEXT);
  1009. #define PINNAME_VIDEO_TELETEXT DEFINE_GUIDNAMED(PINNAME_VIDEO_TELETEXT)
  1010. #define STATIC_PINNAME_VIDEO_CC 
  1011.     0xfb6c4289, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
  1012. DEFINE_GUIDSTRUCT("FB6C4289-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_CC);
  1013. #define PINNAME_VIDEO_CC DEFINE_GUIDNAMED(PINNAME_VIDEO_CC)
  1014. #define STATIC_PINNAME_VIDEO_STILL 
  1015.     0xfb6c428A, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
  1016. DEFINE_GUIDSTRUCT("FB6C428A-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_STILL);
  1017. #define PINNAME_VIDEO_STILL DEFINE_GUIDNAMED(PINNAME_VIDEO_STILL)
  1018. #define STATIC_PINNAME_VIDEO_TIMECODE 
  1019.     0xfb6c428B, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
  1020. DEFINE_GUIDSTRUCT("FB6C428B-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_TIMECODE);
  1021. #define PINNAME_VIDEO_TIMECODE DEFINE_GUIDNAMED(PINNAME_VIDEO_TIMECODE)
  1022. #define STATIC_PINNAME_VIDEO_VIDEOPORT_VBI 
  1023.     0xfb6c428C, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
  1024. DEFINE_GUIDSTRUCT("FB6C428C-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_VIDEOPORT_VBI);
  1025. #define PINNAME_VIDEO_VIDEOPORT_VBI DEFINE_GUIDNAMED(PINNAME_VIDEO_VIDEOPORT_VBI)
  1026. //===========================================================================
  1027. // KSSTREAM_HEADER extensions for digital video
  1028. //===========================================================================
  1029. #define KS_VIDEO_FLAG_FRAME      0x0000L        // Frame or Field (default is frame)
  1030. #define KS_VIDEO_FLAG_FIELD1     0x0001L
  1031. #define KS_VIDEO_FLAG_FIELD2     0x0002L
  1032. #define KS_VIDEO_FLAG_I_FRAME    0x0000L        // I, B, or P (default is I)
  1033. #define KS_VIDEO_FLAG_P_FRAME    0x0010L
  1034. #define KS_VIDEO_FLAG_B_FRAME    0x0020L
  1035. typedef struct tagKS_FRAME_INFO {
  1036.     ULONG                   ExtendedHeaderSize; // Size of this extended header
  1037.     DWORD                   dwFrameFlags;       // Field1, Field2, or Frame
  1038.     LONGLONG                PictureNumber;
  1039.     LONGLONG                DropCount;
  1040.     // The following are only set when using OverlayMixer
  1041.     HANDLE                  hDirectDraw;        // user mode DDraw handle
  1042.     HANDLE                  hSurfaceHandle;     // user mode surface handle
  1043.     RECT                    DirectDrawRect;     // portion of surface locked
  1044.     // Reserved fields, never reference these
  1045.     DWORD                   Reserved1;
  1046.     DWORD                   Reserved2;
  1047.     DWORD                   Reserved3;
  1048.     DWORD                   Reserved4;
  1049. } KS_FRAME_INFO, *PKS_FRAME_INFO;
  1050. //===========================================================================
  1051. // KSSTREAM_HEADER extensions for VBI
  1052. //===========================================================================
  1053. #define KS_VBI_FLAG_FIELD1               0x0001L
  1054. #define KS_VBI_FLAG_FIELD2               0x0002L
  1055. #define KS_VBI_FLAG_MV_PRESENT           0x0100L
  1056. #define KS_VBI_FLAG_MV_HARDWARE          0x0200L
  1057. #define KS_VBI_FLAG_MV_DETECTED          0x0400L
  1058. #define KS_VBI_FLAG_TVTUNER_CHANGE       0x0010L // TvTunerChangeInfo is valid
  1059. #define KS_VBI_FLAG_VBIINFOHEADER_CHANGE 0x0020L // VBIInfoHeader is valid
  1060. typedef struct tagKS_VBI_FRAME_INFO {
  1061.     ULONG                   ExtendedHeaderSize; // Size of this extended header
  1062.     DWORD                   dwFrameFlags;  // Field1, Field2, or Frame; & etc
  1063.     LONGLONG                PictureNumber; // Test only?
  1064.     LONGLONG                DropCount;     // Test only?
  1065.     DWORD                   dwSamplingFrequency;
  1066.     KS_TVTUNER_CHANGE_INFO  TvTunerChangeInfo;
  1067.     KS_VBIINFOHEADER        VBIInfoHeader;
  1068. } KS_VBI_FRAME_INFO, *PKS_VBI_FRAME_INFO;
  1069. //===========================================================================
  1070. // Analog video formats, used with:
  1071. //      Analog Video Decoders
  1072. //      TVTuners
  1073. //      Analog Video Encoders
  1074. //
  1075. // XXX_STANDARDS_SUPPORTED returns a bitmask
  1076. //===========================================================================
  1077. typedef enum
  1078. {
  1079.     KS_AnalogVideo_None     = 0x00000000,  // This is a digital sensor
  1080.     KS_AnalogVideo_NTSC_M   = 0x00000001,  //        75 IRE Setup
  1081.     KS_AnalogVideo_NTSC_M_J = 0x00000002,  // Japan,  0 IRE Setup
  1082.     KS_AnalogVideo_NTSC_433 = 0x00000004,
  1083.     KS_AnalogVideo_PAL_B    = 0x00000010,
  1084.     KS_AnalogVideo_PAL_D    = 0x00000020,
  1085.     KS_AnalogVideo_PAL_G    = 0x00000040,
  1086.     KS_AnalogVideo_PAL_H    = 0x00000080,
  1087.     KS_AnalogVideo_PAL_I    = 0x00000100,
  1088.     KS_AnalogVideo_PAL_M    = 0x00000200,
  1089.     KS_AnalogVideo_PAL_N    = 0x00000400,
  1090.     KS_AnalogVideo_PAL_60   = 0x00000800,
  1091.     KS_AnalogVideo_SECAM_B  = 0x00001000,
  1092.     KS_AnalogVideo_SECAM_D  = 0x00002000,
  1093.     KS_AnalogVideo_SECAM_G  = 0x00004000,
  1094.     KS_AnalogVideo_SECAM_H  = 0x00008000,
  1095.     KS_AnalogVideo_SECAM_K  = 0x00010000,
  1096.     KS_AnalogVideo_SECAM_K1 = 0x00020000,
  1097.     KS_AnalogVideo_SECAM_L  = 0x00040000,
  1098.     KS_AnalogVideo_SECAM_L1 = 0x00080000,
  1099.     KS_AnalogVideo_PAL_N_COMBO
  1100.                             = 0x00100000
  1101. } KS_AnalogVideoStandard;
  1102. #define KS_AnalogVideo_NTSC_Mask  0x00000007
  1103. #define KS_AnalogVideo_PAL_Mask   0x00100FF0
  1104. #define KS_AnalogVideo_SECAM_Mask 0x000FF000
  1105. //===========================================================================
  1106. // Property set definitions
  1107. // The comments show whether a given property is:
  1108. //      R  : READ only
  1109. //      w  : WRITE only
  1110. //      RW : READ / WRITE
  1111. //      O  : Optional (return E_UNSUPPORTED if you don't handle this)
  1112. //===========================================================================
  1113. #define STATIC_PROPSETID_ALLOCATOR_CONTROL
  1114.     0x53171960, 0x148e, 0x11d2, 0x99, 0x79, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
  1115. DEFINE_GUIDSTRUCT("53171960-148E-11d2-9979-0000C0CC16BA", PROPSETID_ALLOCATOR_CONTROL);
  1116. #define PROPSETID_ALLOCATOR_CONTROL DEFINE_GUIDNAMED(PROPSETID_ALLOCATOR_CONTROL)
  1117. typedef enum {
  1118.     KSPROPERTY_ALLOCATOR_CONTROL_HONOR_COUNT,      // R O (will allocate exactly this number of buffers)
  1119.     KSPROPERTY_ALLOCATOR_CONTROL_SURFACE_SIZE,     // R O (return 2 DWORDs specifying surface size)
  1120.     // W I (informn a capture driver whether interleave capture is possible or
  1121.     //      not - a value of 1 means that interleaved capture is supported)
  1122.     KSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_CAPS,
  1123.  
  1124.     // R O (if value == 1, then the ovmixer will turn on the DDVP_INTERLEAVE
  1125.     //      flag thus allowing interleaved capture of the video)
  1126.     KSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_INTERLEAVE,
  1127. } KSPROPERTY_ALLOCATOR_CONTROL;
  1128. typedef struct {
  1129.     //KSPROPERTY Property;
  1130.     ULONG CX;
  1131. ULONG CY;
  1132. } KSPROPERTY_ALLOCATOR_CONTROL_SURFACE_SIZE_S, *PKSPROPERTY_ALLOCATOR_CONTROL_SURFACE_SIZE_S; 
  1133.  
  1134. typedef struct {
  1135.     //KSPROPERTY Property;
  1136.     ULONG InterleavedCapSupported;
  1137. } KSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_CAPS_S, *PKSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_CAPS_S;
  1138.  
  1139. typedef struct {
  1140.     //KSPROPERTY Property;
  1141.     ULONG InterleavedCapPossible;
  1142. } KSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_INTERLEAVE_S, *PKSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_INTERLEAVE_S;
  1143. //===========================================================================
  1144. #define STATIC_PROPSETID_VIDCAP_VIDEOPROCAMP
  1145.     0xC6E13360L, 0x30AC, 0x11d0, 0xa1, 0x8c, 0x00, 0xA0, 0xC9, 0x11, 0x89, 0x56
  1146. DEFINE_GUIDSTRUCT("C6E13360-30AC-11d0-A18C-00A0C9118956", PROPSETID_VIDCAP_VIDEOPROCAMP);
  1147. #define PROPSETID_VIDCAP_VIDEOPROCAMP DEFINE_GUIDNAMED(PROPSETID_VIDCAP_VIDEOPROCAMP)
  1148. typedef enum {
  1149.     KSPROPERTY_VIDEOPROCAMP_BRIGHTNESS,            // RW O
  1150.     KSPROPERTY_VIDEOPROCAMP_CONTRAST,              // RW O
  1151.     KSPROPERTY_VIDEOPROCAMP_HUE,                   // RW O
  1152.     KSPROPERTY_VIDEOPROCAMP_SATURATION,            // RW O
  1153.     KSPROPERTY_VIDEOPROCAMP_SHARPNESS,             // RW O
  1154.     KSPROPERTY_VIDEOPROCAMP_GAMMA,                 // RW O
  1155.     KSPROPERTY_VIDEOPROCAMP_COLORENABLE,           // RW O
  1156.     KSPROPERTY_VIDEOPROCAMP_WHITEBALANCE,          // RW O
  1157.     KSPROPERTY_VIDEOPROCAMP_BACKLIGHT_COMPENSATION,// RW O
  1158.     KSPROPERTY_VIDEOPROCAMP_GAIN,                  // RW O
  1159. } KSPROPERTY_VIDCAP_VIDEOPROCAMP;
  1160. typedef struct {
  1161.     KSPROPERTY Property;
  1162.     LONG   Value;                       // Value to set or get
  1163.     ULONG  Flags;                       // KSPROPERTY_VIDEOPROCAMP_FLAGS_*
  1164.     ULONG  Capabilities;                // KSPROPERTY_VIDEOPROCAMP_FLAGS_*
  1165. } KSPROPERTY_VIDEOPROCAMP_S, *PKSPROPERTY_VIDEOPROCAMP_S;
  1166. #define KSPROPERTY_VIDEOPROCAMP_FLAGS_AUTO        0X0001L
  1167. #define KSPROPERTY_VIDEOPROCAMP_FLAGS_MANUAL      0X0002L
  1168. //===========================================================================
  1169. #define STATIC_PROPSETID_TUNER
  1170.     0x6a2e0605L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56
  1171. DEFINE_GUIDSTRUCT("6a2e0605-28e4-11d0-a18c-00a0c9118956", PROPSETID_TUNER);
  1172. #define PROPSETID_TUNER DEFINE_GUIDNAMED(PROPSETID_TUNER)
  1173. typedef enum {
  1174.     KSPROPERTY_TUNER_CAPS,              // R  -overall device capabilities
  1175.     KSPROPERTY_TUNER_MODE_CAPS,         // R  -capabilities in this mode
  1176.     KSPROPERTY_TUNER_MODE,              // RW -set a mode (TV, FM, AM, DSS)
  1177.     KSPROPERTY_TUNER_STANDARD,          // R  -get TV standard (only if TV mode)
  1178.     KSPROPERTY_TUNER_FREQUENCY,         // RW -set/get frequency
  1179.     KSPROPERTY_TUNER_INPUT,             // RW -select an input
  1180.     KSPROPERTY_TUNER_STATUS,            // R  -tuning status
  1181.     KSPROPERTY_TUNER_IF_MEDIUM          // R O-Medium for IF or Transport Pin
  1182. } KSPROPERTY_TUNER;
  1183. typedef enum {
  1184.     KSPROPERTY_TUNER_MODE_TV            = 0X0001,
  1185.     KSPROPERTY_TUNER_MODE_FM_RADIO      = 0X0002,
  1186.     KSPROPERTY_TUNER_MODE_AM_RADIO      = 0X0004,
  1187.     KSPROPERTY_TUNER_MODE_DSS           = 0X0008,
  1188.     KSPROPERTY_TUNER_MODE_ATSC          = 0X0010,  // also used for DVB-T, DVB-C
  1189. } KSPROPERTY_TUNER_MODES;
  1190. // Describes how the device tunes.  Only one of these flags may be set
  1191. // in KSPROPERTY_TUNER_MODE_CAPS_S.Strategy
  1192. // Describe how the driver should attempt to tune:
  1193. // EXACT:   just go to the frequency specified (no fine tuning)
  1194. // FINE:    (slow) do an exhaustive search for the best signal
  1195. // COARSE:  (fast) use larger frequency jumps to just determine if any signal
  1196. typedef enum {
  1197.     KS_TUNER_TUNING_EXACT = 1,        // No fine tuning
  1198.     KS_TUNER_TUNING_FINE,             // Fine grained search
  1199.     KS_TUNER_TUNING_COARSE,           // Coarse search
  1200. }KS_TUNER_TUNING_FLAGS;
  1201. typedef enum {
  1202.     KS_TUNER_STRATEGY_PLL             = 0X01, // Tune by PLL offset
  1203.     KS_TUNER_STRATEGY_SIGNAL_STRENGTH = 0X02, // Tune by signal strength
  1204.     KS_TUNER_STRATEGY_DRIVER_TUNES    = 0X04, // Driver does fine tuning
  1205. }KS_TUNER_STRATEGY;
  1206. typedef struct {
  1207.     KSPROPERTY Property;
  1208.     ULONG  ModesSupported;              // KS_PROPERTY_TUNER_MODES_*
  1209.     KSPIN_MEDIUM VideoMedium;           // GUID_NULL (no pin), or GUID
  1210.     KSPIN_MEDIUM TVAudioMedium;         // GUID_NULL (no pin), or GUID
  1211.     KSPIN_MEDIUM RadioAudioMedium;      // GUID_NULL (no pin), or GUID
  1212. } KSPROPERTY_TUNER_CAPS_S, *PKSPROPERTY_TUNER_CAPS_S;
  1213. typedef struct {
  1214.     KSPROPERTY Property;
  1215.     KSPIN_MEDIUM IFMedium;              // GUID_NULL (no pin), or GUID
  1216. } KSPROPERTY_TUNER_IF_MEDIUM_S, *PKSPROPERTY_TUNER_IF_MEDIUM_S;
  1217. typedef struct {
  1218.     KSPROPERTY Property;
  1219.     ULONG  Mode;                        // IN: KSPROPERTY_TUNER_MODE
  1220.     ULONG  StandardsSupported;          // KS_AnalogVideo_* (if TV or DSS)
  1221.     ULONG  MinFrequency;                // Hz
  1222.     ULONG  MaxFrequency;                // Hz
  1223.     ULONG  TuningGranularity;           // Hz
  1224.     ULONG  NumberOfInputs;              // count of inputs
  1225.     ULONG  SettlingTime;                // milliSeconds
  1226.     ULONG  Strategy;                    // KS_TUNER_STRATEGY
  1227. } KSPROPERTY_TUNER_MODE_CAPS_S, *PKSPROPERTY_TUNER_MODE_CAPS_S;
  1228. typedef struct {
  1229.     KSPROPERTY Property;
  1230.     ULONG  Mode;                        // IN: KSPROPERTY_TUNER_MODE
  1231. } KSPROPERTY_TUNER_MODE_S, *PKSPROPERTY_TUNER_MODE_S;
  1232. typedef struct {
  1233.     KSPROPERTY Property;
  1234.     ULONG  Frequency;                   // Hz
  1235.     ULONG  LastFrequency;               // Hz (last known good)
  1236.     ULONG  TuningFlags;                 // KS_TUNER_TUNING_FLAGS
  1237.     ULONG  VideoSubChannel;             // DSS
  1238.     ULONG  AudioSubChannel;             // DSS
  1239.     ULONG  Channel;                     // VBI decoders
  1240.     ULONG  Country;                     // VBI decoders
  1241. } KSPROPERTY_TUNER_FREQUENCY_S, *PKSPROPERTY_TUNER_FREQUENCY_S;
  1242. typedef struct {
  1243.     KSPROPERTY Property;
  1244.     ULONG  Standard;                    // KS_AnalogVideo_*
  1245. } KSPROPERTY_TUNER_STANDARD_S, *PKSPROPERTY_TUNER_STANDARD_S;
  1246. typedef struct {
  1247.     KSPROPERTY Property;
  1248.     ULONG  InputIndex;                  // 0 to (n-1) inputs
  1249. } KSPROPERTY_TUNER_INPUT_S, *PKSPROPERTY_TUNER_INPUT_S;
  1250. typedef struct {
  1251.     KSPROPERTY Property;
  1252.     ULONG  CurrentFrequency;            // Hz
  1253.     ULONG  PLLOffset;                   // if Strategy.KS_TUNER_STRATEGY_PLL
  1254.     ULONG  SignalStrength;              // if Stretegy.KS_TUNER_STRATEGY_SIGNAL_STRENGTH
  1255.     ULONG  Busy;                        // TRUE if in the process of tuning
  1256. } KSPROPERTY_TUNER_STATUS_S, *PKSPROPERTY_TUNER_STATUS_S;
  1257. #define STATIC_EVENTSETID_TUNER
  1258.     0x6a2e0606L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56
  1259. DEFINE_GUIDSTRUCT("6a2e0606-28e4-11d0-a18c-00a0c9118956", EVENTSETID_TUNER);
  1260. #define EVENTSETID_TUNER DEFINE_GUIDNAMED(EVENTSETID_TUNER)
  1261. typedef enum {
  1262.     KSEVENT_TUNER_CHANGED
  1263. } KSEVENT_TUNER;
  1264. //===========================================================================
  1265. #define STATIC_PROPSETID_VIDCAP_VIDEOENCODER
  1266.     0x6a2e0610L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56
  1267. DEFINE_GUIDSTRUCT("6a2e0610-28e4-11d0-a18c-00a0c9118956", PROPSETID_VIDCAP_VIDEOENCODER);
  1268. #define PROPSETID_VIDCAP_VIDEOENCODER DEFINE_GUIDNAMED(PROPSETID_VIDCAP_VIDEOENCODER)
  1269. typedef enum {
  1270.     KSPROPERTY_VIDEOENCODER_CAPS,                       // R
  1271.     KSPROPERTY_VIDEOENCODER_STANDARD,                   // RW
  1272.     KSPROPERTY_VIDEOENCODER_COPYPROTECTION,             // RW O
  1273.     KSPROPERTY_VIDEOENCODER_CC_ENABLE,                  // RW O
  1274. } KSPROPERTY_VIDCAP_VIDEOENCODER;
  1275. typedef struct {
  1276.     KSPROPERTY Property;
  1277.     LONG       Value;                   // value to get or set
  1278.     ULONG      Flags;                   //
  1279.     ULONG      Capabilities;            //
  1280. } KSPROPERTY_VIDEOENCODER_S, *PKSPROPERTY_VIDEOENCODER_S;
  1281. //===========================================================================
  1282. #define STATIC_PROPSETID_VIDCAP_VIDEODECODER
  1283.     0xC6E13350L, 0x30AC, 0x11d0, 0xA1, 0x8C, 0x00, 0xA0, 0xC9, 0x11, 0x89, 0x56
  1284. DEFINE_GUIDSTRUCT("C6E13350-30AC-11d0-A18C-00A0C9118956", PROPSETID_VIDCAP_VIDEODECODER);
  1285. #define PROPSETID_VIDCAP_VIDEODECODER DEFINE_GUIDNAMED(PROPSETID_VIDCAP_VIDEODECODER)
  1286. typedef enum {
  1287.     KSPROPERTY_VIDEODECODER_CAPS,                       // R
  1288.     KSPROPERTY_VIDEODECODER_STANDARD,                   // RW
  1289.     KSPROPERTY_VIDEODECODER_STATUS,                     // R
  1290.     KSPROPERTY_VIDEODECODER_OUTPUT_ENABLE,              // Rw O
  1291.     KSPROPERTY_VIDEODECODER_VCR_TIMING,                 // RW O
  1292. } KSPROPERTY_VIDCAP_VIDEODECODER;
  1293. typedef enum {
  1294.     KS_VIDEODECODER_FLAGS_CAN_DISABLE_OUTPUT  = 0X0001, // VP Output can tri-stae
  1295.     KS_VIDEODECODER_FLAGS_CAN_USE_VCR_LOCKING = 0X0002, // VCR PLL timings
  1296.     KS_VIDEODECODER_FLAGS_CAN_INDICATE_LOCKED = 0X0004, // Can indicate valid signal
  1297. }KS_VIDEODECODER_FLAGS;
  1298. typedef struct {
  1299.     KSPROPERTY Property;
  1300.     ULONG      StandardsSupported;      // KS_AnalogVideo_*
  1301.     ULONG      Capabilities;            // KS_VIDEODECODER_FLAGS_*
  1302.     ULONG      SettlingTime;            // milliseconds
  1303.     ULONG      HSyncPerVSync;           // Number of HSync Pulses per VSync
  1304. } KSPROPERTY_VIDEODECODER_CAPS_S, *PKSPROPERTY_VIDEODECODER_CAPS_S;
  1305. typedef struct {
  1306.     KSPROPERTY Property;
  1307.     ULONG      NumberOfLines;           // 525 or 625 lines detected
  1308.     ULONG      SignalLocked;            // TRUE if signal is locked
  1309. } KSPROPERTY_VIDEODECODER_STATUS_S, *PKSPROPERTY_VIDEODECODER_STATUS_S;
  1310. typedef struct {
  1311.     KSPROPERTY Property;
  1312.     ULONG      Value;                   // Get or set a value
  1313. } KSPROPERTY_VIDEODECODER_S, *PKSPROPERTY_VIDEODECODER_S;
  1314. #define STATIC_EVENTSETID_VIDEODECODER
  1315.     0x6a2e0621L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56
  1316. DEFINE_GUIDSTRUCT("6a2e0621-28e4-11d0-a18c-00a0c9118956", EVENTSETID_VIDEODECODER);
  1317. #define EVENTSETID_VIDEODECODER DEFINE_GUIDNAMED(EVENTSETID_VIDEODECODER)
  1318. typedef enum {
  1319.     KSEVENT_VIDEODECODER_CHANGED
  1320. } KSEVENT_VIDEODECODER;
  1321. //===========================================================================
  1322. #define STATIC_PROPSETID_VIDCAP_CAMERACONTROL
  1323.     0xC6E13370L, 0x30AC, 0x11d0, 0xa1, 0x8C, 0x00, 0xA0, 0xC9, 0x11, 0x89, 0x56
  1324. DEFINE_GUIDSTRUCT("C6E13370-30AC-11d0-A18C-00A0C9118956", PROPSETID_VIDCAP_CAMERACONTROL);
  1325. #define PROPSETID_VIDCAP_CAMERACONTROL DEFINE_GUIDNAMED(PROPSETID_VIDCAP_CAMERACONTROL)
  1326. typedef enum {
  1327.     KSPROPERTY_CAMERACONTROL_PAN,                       // RW O
  1328.     KSPROPERTY_CAMERACONTROL_TILT,                      // RW O
  1329.     KSPROPERTY_CAMERACONTROL_ROLL,                      // RW O
  1330.     KSPROPERTY_CAMERACONTROL_ZOOM,                      // RW O
  1331.     KSPROPERTY_CAMERACONTROL_EXPOSURE,                  // RW O
  1332.     KSPROPERTY_CAMERACONTROL_IRIS,                      // RW O
  1333.     KSPROPERTY_CAMERACONTROL_FOCUS,                     // RW O
  1334. } KSPROPERTY_VIDCAP_CAMERACONTROL;
  1335. typedef struct {
  1336.     KSPROPERTY Property;
  1337.     LONG       Value;                   // value to get or set
  1338.     ULONG      Flags;                   // KSPROPERTY_CAMERACONTROL_FLAGS_*
  1339.     ULONG      Capabilities;            // KSPROPERTY_CAMERACONTROL_FLAGS_*
  1340. } KSPROPERTY_CAMERACONTROL_S, *PKSPROPERTY_CAMERACONTROL_S;
  1341. #define KSPROPERTY_CAMERACONTROL_FLAGS_AUTO        0X0001L
  1342. #define KSPROPERTY_CAMERACONTROL_FLAGS_MANUAL      0X0002L
  1343. #define KSPROPERTY_CAMERACONTROL_FLAGS_ABSOLUTE    0X0000L
  1344. #define KSPROPERTY_CAMERACONTROL_FLAGS_RELATIVE    0X0010L
  1345. //===========================================================================
  1346. #define STATIC_PROPSETID_VIDCAP_CROSSBAR
  1347.     0x6a2e0640L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56
  1348. DEFINE_GUIDSTRUCT("6a2e0640-28e4-11d0-a18c-00a0c9118956", PROPSETID_VIDCAP_CROSSBAR);
  1349. #define PROPSETID_VIDCAP_CROSSBAR DEFINE_GUIDNAMED(PROPSETID_VIDCAP_CROSSBAR)
  1350. typedef enum {
  1351.     KSPROPERTY_CROSSBAR_CAPS,                     // R
  1352.     KSPROPERTY_CROSSBAR_PININFO,                  // R
  1353.     KSPROPERTY_CROSSBAR_CAN_ROUTE,                // R
  1354.     KSPROPERTY_CROSSBAR_ROUTE,                    // RW
  1355. } KSPROPERTY_VIDCAP_CROSSBAR;
  1356. typedef struct {
  1357.     KSPROPERTY Property;
  1358.     ULONG  NumberOfInputs;      // the number of audio and video input pins
  1359.     ULONG  NumberOfOutputs;     // the number of audio and video output pins
  1360. } KSPROPERTY_CROSSBAR_CAPS_S, *PKSPROPERTY_CROSSBAR_CAPS_S;
  1361. typedef struct {
  1362.     KSPROPERTY Property;
  1363.     KSPIN_DATAFLOW Direction;     // KSPIN_DATAFLOW_IN or KSPIN_DATAFLOW_OUT?
  1364.     ULONG  Index;                 // Which pin to return data for?
  1365.     ULONG  PinType;               // KS_PhysConn_Video_* or KS_PhysConn_Audio_*
  1366.     ULONG  RelatedPinIndex;       // For video pins, this is the related audio pin
  1367.     KSPIN_MEDIUM  Medium;         // Identifies the hardware connection
  1368. } KSPROPERTY_CROSSBAR_PININFO_S, *PKSPROPERTY_CROSSBAR_PININFO_S;
  1369. typedef struct {
  1370.     KSPROPERTY Property;
  1371.     ULONG  IndexInputPin;        // Zero based index of the input pin
  1372.     ULONG  IndexOutputPin;       // Zero based index of the output pin
  1373.     ULONG  CanRoute;             // returns non-zero on CAN_ROUTE if routing is possible
  1374. } KSPROPERTY_CROSSBAR_ROUTE_S, *PKSPROPERTY_CROSSBAR_ROUTE_S;
  1375. #define STATIC_EVENTSETID_CROSSBAR
  1376.     0x6a2e0641L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56
  1377. DEFINE_GUIDSTRUCT("6a2e0641-28e4-11d0-a18c-00a0c9118956", EVENTSETID_CROSSBAR);
  1378. #define EVENTSETID_CROSSBAR DEFINE_GUIDNAMED(EVENTSETID_CROSSBAR)
  1379. typedef enum {
  1380.     KSEVENT_CROSSBAR_CHANGED
  1381. } KSEVENT_CROSSBAR;
  1382. // The following IDs should match the AM equivalents
  1383. typedef enum {
  1384.     KS_PhysConn_Video_Tuner = 1,
  1385.     KS_PhysConn_Video_Composite,
  1386.     KS_PhysConn_Video_SVideo,
  1387.     KS_PhysConn_Video_RGB,
  1388.     KS_PhysConn_Video_YRYBY,
  1389.     KS_PhysConn_Video_SerialDigital,
  1390.     KS_PhysConn_Video_ParallelDigital,
  1391.     KS_PhysConn_Video_SCSI,
  1392.     KS_PhysConn_Video_AUX,
  1393.     KS_PhysConn_Video_1394,
  1394.     KS_PhysConn_Video_USB,
  1395.     KS_PhysConn_Video_VideoDecoder,
  1396.     KS_PhysConn_Video_VideoEncoder,
  1397.     KS_PhysConn_Video_SCART,
  1398.     KS_PhysConn_Audio_Tuner = 4096,
  1399.     KS_PhysConn_Audio_Line,
  1400.     KS_PhysConn_Audio_Mic,
  1401.     KS_PhysConn_Audio_AESDigital,
  1402.     KS_PhysConn_Audio_SPDIFDigital,
  1403.     KS_PhysConn_Audio_SCSI,
  1404.     KS_PhysConn_Audio_AUX,
  1405.     KS_PhysConn_Audio_1394,
  1406.     KS_PhysConn_Audio_USB,
  1407.     KS_PhysConn_Audio_AudioDecoder,
  1408. } KS_PhysicalConnectorType;
  1409. //===========================================================================
  1410. #define STATIC_PROPSETID_VIDCAP_TVAUDIO
  1411.     0x6a2e0650L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56
  1412. DEFINE_GUIDSTRUCT("6a2e0650-28e4-11d0-a18c-00a0c9118956", PROPSETID_VIDCAP_TVAUDIO);
  1413. #define PROPSETID_VIDCAP_TVAUDIO DEFINE_GUIDNAMED(PROPSETID_VIDCAP_TVAUDIO)
  1414. typedef enum {
  1415.     KSPROPERTY_TVAUDIO_CAPS,                            // R
  1416.     KSPROPERTY_TVAUDIO_MODE,                            // RW
  1417.     KSPROPERTY_TVAUDIO_CURRENTLY_AVAILABLE_MODES        // R
  1418. } KSPROPERTY_VIDCAP_TVAUDIO;
  1419. #define KS_TVAUDIO_MODE_MONO           0x0001          // Mono
  1420. #define KS_TVAUDIO_MODE_STEREO         0x0002          // Stereo
  1421. #define KS_TVAUDIO_MODE_LANG_A         0x0010          // Primary language
  1422. #define KS_TVAUDIO_MODE_LANG_B         0x0020          // 2nd avail language
  1423. #define KS_TVAUDIO_MODE_LANG_C         0x0040          // 3rd avail language
  1424. typedef struct {
  1425.     KSPROPERTY Property;
  1426.     ULONG      Capabilities;             // Bitmask of KS_TVAUDIO_MODE_*
  1427.     KSPIN_MEDIUM InputMedium;
  1428.     KSPIN_MEDIUM OutputMedium;
  1429. } KSPROPERTY_TVAUDIO_CAPS_S, *PKSPROPERTY_TVAUDIO_CAPS_S;
  1430. typedef struct {
  1431.     KSPROPERTY Property;
  1432.     ULONG      Mode;                     // KS_TVAUDIO_MODE_*
  1433. } KSPROPERTY_TVAUDIO_S, *PKSPROPERTY_TVAUDIO_S;
  1434. #define STATIC_KSEVENTSETID_VIDCAP_TVAUDIO
  1435.     0x6a2e0651L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56
  1436. DEFINE_GUIDSTRUCT("6a2e0651-28e4-11d0-a18c-00a0c9118956", KSEVENTSETID_VIDCAP_TVAUDIO);
  1437. #define KSEVENTSETID_VIDCAP_TVAUDIO DEFINE_GUIDNAMED(KSEVENTSETID_VIDCAP_TVAUDIO)
  1438. typedef enum {
  1439.     KSEVENT_TVAUDIO_CHANGED,
  1440. } KSEVENT_TVAUDIO;
  1441. //===========================================================================
  1442. #define STATIC_PROPSETID_VIDCAP_VIDEOCOMPRESSION
  1443.     0xC6E13343L, 0x30AC, 0x11d0, 0xA1, 0x8C, 0x00, 0xA0, 0xC9, 0x11, 0x89, 0x56
  1444. DEFINE_GUIDSTRUCT("C6E13343-30AC-11d0-A18C-00A0C9118956", PROPSETID_VIDCAP_VIDEOCOMPRESSION);
  1445. #define PROPSETID_VIDCAP_VIDEOCOMPRESSION DEFINE_GUIDNAMED(PROPSETID_VIDCAP_VIDEOCOMPRESSION)
  1446. typedef enum {
  1447.     KSPROPERTY_VIDEOCOMPRESSION_GETINFO,              // R
  1448.     KSPROPERTY_VIDEOCOMPRESSION_KEYFRAME_RATE,        // RW
  1449.     KSPROPERTY_VIDEOCOMPRESSION_PFRAMES_PER_KEYFRAME, // RW
  1450.     KSPROPERTY_VIDEOCOMPRESSION_QUALITY,              // RW
  1451.     KSPROPERTY_VIDEOCOMPRESSION_OVERRIDE_KEYFRAME,    // W
  1452.     KSPROPERTY_VIDEOCOMPRESSION_OVERRIDE_FRAME_SIZE,  // W
  1453.     KSPROPERTY_VIDEOCOMPRESSION_WINDOWSIZE,           // RW
  1454. } KSPROPERTY_VIDCAP_VIDEOCOMPRESSION;
  1455. typedef enum {
  1456.     KS_CompressionCaps_CanQuality = 1,
  1457.     KS_CompressionCaps_CanCrunch = 2,
  1458.     KS_CompressionCaps_CanKeyFrame = 4,
  1459.     KS_CompressionCaps_CanBFrame = 8,
  1460.     KS_CompressionCaps_CanWindow = 0x10,
  1461. } KS_CompressionCaps;
  1462. typedef struct {
  1463.     KSPROPERTY Property;
  1464.     // Note, no VersionString!
  1465.     // Note, no DescriptionString!
  1466.     ULONG      StreamIndex;             // zero based index of stream
  1467.     LONG       DefaultKeyFrameRate;     // Key frame rate
  1468.     LONG       DefaultPFrameRate;       // Predeicted frames per Key frame
  1469.     LONG       DefaultQuality;          // 0 to 10000
  1470.     LONG       NumberOfQualitySettings; // How many discreet quality settings?
  1471.     LONG       Capabilities;            // KS_CompressionCaps_*
  1472. } KSPROPERTY_VIDEOCOMPRESSION_GETINFO_S, *PKSPROPERTY_VIDEOCOMPRESSION_GETINFO_S;
  1473. typedef struct {
  1474.     KSPROPERTY Property;
  1475.     ULONG      StreamIndex;             // zero based index of stream
  1476.     LONG       Value;                   // value to get or set
  1477. } KSPROPERTY_VIDEOCOMPRESSION_S, *PKSPROPERTY_VIDEOCOMPRESSION_S;
  1478. //===========================================================================
  1479. // MEDIASUBTYPE_Overlay
  1480. #define STATIC_KSDATAFORMAT_SUBTYPE_OVERLAY
  1481.     0xe436eb7fL, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70
  1482. DEFINE_GUIDSTRUCT("e436eb7f-524f-11ce-9f53-0020af0ba770", KSDATAFORMAT_SUBTYPE_OVERLAY);
  1483. #define KSDATAFORMAT_SUBTYPE_OVERLAY DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_OVERLAY)
  1484. #define STATIC_KSPROPSETID_OverlayUpdate
  1485.     0x490EA5CFL, 0x7681, 0x11D1, 0xA2, 0x1C, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
  1486. DEFINE_GUIDSTRUCT("490EA5CF-7681-11D1-A21C-00A0C9223196", KSPROPSETID_OverlayUpdate);
  1487. #define KSPROPSETID_OverlayUpdate DEFINE_GUIDNAMED(KSPROPSETID_OverlayUpdate)
  1488. typedef enum {
  1489.     KSPROPERTY_OVERLAYUPDATE_INTERESTS,
  1490.     KSPROPERTY_OVERLAYUPDATE_CLIPLIST = 0x1,
  1491.     KSPROPERTY_OVERLAYUPDATE_PALETTE = 0x2,
  1492.     KSPROPERTY_OVERLAYUPDATE_COLORKEY = 0x4,
  1493.     KSPROPERTY_OVERLAYUPDATE_VIDEOPOSITION = 0x8,
  1494.     KSPROPERTY_OVERLAYUPDATE_DISPLAYCHANGE = 0x10,
  1495.     KSPROPERTY_OVERLAYUPDATE_COLORREF = 0x10000000
  1496. } KSPROPERTY_OVERLAYUPDATE;
  1497. typedef struct {
  1498.     ULONG   PelsWidth;
  1499.     ULONG   PelsHeight;
  1500.     ULONG   BitsPerPel;
  1501.     WCHAR   DeviceID[1];
  1502. } KSDISPLAYCHANGE, *PKSDISPLAYCHANGE;
  1503. #define DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_INTERESTS(Handler)
  1504.     DEFINE_KSPROPERTY_ITEM(
  1505.         KSPROPERTY_OVERLAYUPDATE_INTERESTS,
  1506.         (Handler),
  1507.         sizeof(KSPROPERTY),
  1508.         sizeof(ULONG),
  1509.         NULL, NULL, 0, NULL, NULL, 0)
  1510. #define DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_PALETTE(Handler)
  1511.     DEFINE_KSPROPERTY_ITEM(
  1512.         KSPROPERTY_OVERLAYUPDATE_PALETTE,
  1513.         NULL,
  1514.         sizeof(KSPROPERTY),
  1515.         0,
  1516.         (Handler),
  1517.         NULL, 0, NULL, NULL, 0)
  1518. #define DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_COLORKEY(Handler)
  1519.     DEFINE_KSPROPERTY_ITEM(
  1520.         KSPROPERTY_OVERLAYUPDATE_COLORKEY,
  1521.         NULL,
  1522.         sizeof(KSPROPERTY),
  1523.         sizeof(COLORKEY),
  1524.         (Handler),
  1525.         NULL, 0, NULL, NULL, 0)
  1526. #define DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_CLIPLIST(Handler)
  1527.     DEFINE_KSPROPERTY_ITEM(
  1528.         KSPROPERTY_OVERLAYUPDATE_CLIPLIST,
  1529.         NULL,
  1530.         sizeof(KSPROPERTY),
  1531.         2 * sizeof(RECT) + sizeof(RGNDATAHEADER),
  1532.         (Handler),
  1533.         NULL, 0, NULL, NULL, 0)
  1534. #define DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_VIDEOPOSITION(Handler)
  1535.     DEFINE_KSPROPERTY_ITEM(
  1536.         KSPROPERTY_OVERLAYUPDATE_VIDEOPOSITION,
  1537.         NULL,
  1538.         sizeof(KSPROPERTY),
  1539.         2 * sizeof(RECT),
  1540.         (Handler),
  1541.         NULL, 0, NULL, NULL, 0)
  1542. #define DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_DISPLAYCHANGE(Handler)
  1543.     DEFINE_KSPROPERTY_ITEM(
  1544.         KSPROPERTY_OVERLAYUPDATE_DISPLAYCHANGE,
  1545.         NULL,
  1546.         sizeof(KSPROPERTY),
  1547.         sizeof(KSDISPLAYCHANGE),
  1548.         (Handler),
  1549.         NULL, 0, NULL, NULL, 0)
  1550. #define DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_COLORREF(Handler)
  1551.     DEFINE_KSPROPERTY_ITEM(
  1552.         KSPROPERTY_OVERLAYUPDATE_COLORREF,
  1553.         (Handler),
  1554.         sizeof(KSPROPERTY),
  1555.         sizeof(COLORREF),
  1556.         NULL,
  1557.         NULL, 0, NULL, NULL, 0)
  1558. //===========================================================================
  1559. #define STATIC_PROPSETID_VIDCAP_VIDEOCONTROL
  1560.     0x6a2e0670L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56
  1561. DEFINE_GUIDSTRUCT("6a2e0670-28e4-11d0-a18c-00a0c9118956", PROPSETID_VIDCAP_VIDEOCONTROL);
  1562. #define PROPSETID_VIDCAP_VIDEOCONTROL DEFINE_GUIDNAMED(PROPSETID_VIDCAP_VIDEOCONTROL)
  1563. typedef enum {
  1564.     KSPROPERTY_VIDEOCONTROL_CAPS,               // R
  1565.     KSPROPERTY_VIDEOCONTROL_ACTUAL_FRAME_RATE,  // R O
  1566.     KSPROPERTY_VIDEOCONTROL_FRAME_RATES,        // R O
  1567.     KSPROPERTY_VIDEOCONTROL_MODE,               // RWO
  1568. } KSPROPERTY_VIDCAP_VIDEOCONTROL;
  1569. typedef enum {
  1570.     KS_VideoControlFlag_FlipHorizontal        = 0x0001,
  1571.     KS_VideoControlFlag_FlipVertical          = 0x0002,
  1572.     KS_Obsolete_VideoControlFlag_ExternalTriggerEnable = 0x0010,    // ***WARNING *** Flag msimatch with DSHOW.
  1573.     KS_Obsolete_VideoControlFlag_Trigger               = 0x0020,  // ***WARNING *** Flag msimatch with DSHOW.
  1574.     KS_VideoControlFlag_ExternalTriggerEnable = 0x0004,
  1575.     KS_VideoControlFlag_Trigger                      = 0x0008,
  1576. } KS_VideoControlFlags;
  1577. typedef struct {
  1578.     KSPROPERTY Property;
  1579.     ULONG      StreamIndex;
  1580.     ULONG      VideoControlCaps;                // KS_VideoControlFlags_*
  1581. } KSPROPERTY_VIDEOCONTROL_CAPS_S, *PKSPROPERTY_VIDEOCONTROL_CAPS_S;
  1582. typedef struct {
  1583.     KSPROPERTY Property;
  1584.     ULONG      StreamIndex;
  1585.     LONG       Mode;                            // KS_VideoControlFlags_*
  1586. } KSPROPERTY_VIDEOCONTROL_MODE_S, *PKSPROPERTY_VIDEOCONTROL_MODE_S;
  1587. typedef struct {
  1588.     KSPROPERTY Property;
  1589.     ULONG      StreamIndex;                     // Index of stream
  1590.     ULONG      RangeIndex;                      // Index of range
  1591.     SIZE       Dimensions;                      // Size of image
  1592.     LONGLONG   CurrentActualFrameRate;          // Only correct if pin is open
  1593.     LONGLONG   CurrentMaxAvailableFrameRate;    // Max Rate temporarily limited on USB or 1394?
  1594. } KSPROPERTY_VIDEOCONTROL_ACTUAL_FRAME_RATE_S, *PKSPROPERTY_VIDEOCONTROL_ACTUAL_FRAME_RATE_S;
  1595. // KSPROPERTY_VIDEOCONTROL_FRAME_RATES returns a list of available frame rates in 100 nS units
  1596. typedef struct {
  1597.     KSPROPERTY Property;
  1598.     ULONG      StreamIndex;                     // Index of stream
  1599.     ULONG      RangeIndex;                      // Index of range
  1600.     SIZE       Dimensions;                      // Size of image
  1601. } KSPROPERTY_VIDEOCONTROL_FRAME_RATES_S, *PKSPROPERTY_VIDEOCONTROL_FRAME_RATES_S;
  1602. //===========================================================================
  1603. #define STATIC_PROPSETID_VIDCAP_DROPPEDFRAMES
  1604.     0xC6E13344L, 0x30AC, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56
  1605. DEFINE_GUIDSTRUCT("C6E13344-30AC-11d0-A18C-00A0C9118956", PROPSETID_VIDCAP_DROPPEDFRAMES);
  1606. #define PROPSETID_VIDCAP_DROPPEDFRAMES DEFINE_GUIDNAMED(PROPSETID_VIDCAP_DROPPEDFRAMES)
  1607. typedef enum {
  1608.     KSPROPERTY_DROPPEDFRAMES_CURRENT            // R
  1609. } KSPROPERTY_VIDCAP_DROPPEDFRAMES;
  1610. typedef struct {
  1611.     KSPROPERTY Property;
  1612.     LONGLONG   PictureNumber;                   // Current Picture Number
  1613.     LONGLONG   DropCount;                       // Count of frames dropped
  1614.     ULONG      AverageFrameSize;                // Average size of frames captured
  1615. } KSPROPERTY_DROPPEDFRAMES_CURRENT_S, *PKSPROPERTY_DROPPEDFRAMES_CURRENT_S;
  1616. //===========================================================================
  1617. // VPE
  1618. #define STATIC_KSPROPSETID_VPConfig
  1619.     0xbc29a660L, 0x30e3, 0x11d0, 0x9e, 0x69, 0x00, 0xc0, 0x4f, 0xd7, 0xc1, 0x5b
  1620. DEFINE_GUIDSTRUCT("bc29a660-30e3-11d0-9e69-00c04fd7c15b", KSPROPSETID_VPConfig);
  1621. #define KSPROPSETID_VPConfig DEFINE_GUIDNAMED(KSPROPSETID_VPConfig)
  1622. #define STATIC_KSPROPSETID_VPVBIConfig
  1623.     0xec529b00L, 0x1a1f, 0x11d1, 0xba, 0xd9, 0x0, 0x60, 0x97, 0x44, 0x11, 0x1a
  1624. DEFINE_GUIDSTRUCT("ec529b00-1a1f-11d1-bad9-00609744111a", KSPROPSETID_VPVBIConfig);
  1625. #define KSPROPSETID_VPVBIConfig DEFINE_GUIDNAMED(KSPROPSETID_VPVBIConfig)
  1626. // Both of the above property sets use the same list of properties below
  1627. typedef enum {
  1628.     KSPROPERTY_VPCONFIG_NUMCONNECTINFO,
  1629.     KSPROPERTY_VPCONFIG_GETCONNECTINFO,
  1630.     KSPROPERTY_VPCONFIG_SETCONNECTINFO,
  1631.     KSPROPERTY_VPCONFIG_VPDATAINFO,
  1632.     KSPROPERTY_VPCONFIG_MAXPIXELRATE,
  1633.     KSPROPERTY_VPCONFIG_INFORMVPINPUT,
  1634.     KSPROPERTY_VPCONFIG_NUMVIDEOFORMAT,
  1635.     KSPROPERTY_VPCONFIG_GETVIDEOFORMAT,
  1636.     KSPROPERTY_VPCONFIG_SETVIDEOFORMAT,
  1637.     KSPROPERTY_VPCONFIG_INVERTPOLARITY,
  1638.     KSPROPERTY_VPCONFIG_DECIMATIONCAPABILITY,   // E_NOTIMPL for VBI
  1639.     KSPROPERTY_VPCONFIG_SCALEFACTOR,            // E_NOTIMPL for VBI
  1640.     KSPROPERTY_VPCONFIG_DDRAWHANDLE,
  1641.     KSPROPERTY_VPCONFIG_VIDEOPORTID,
  1642.     KSPROPERTY_VPCONFIG_DDRAWSURFACEHANDLE,
  1643.     KSPROPERTY_VPCONFIG_SURFACEPARAMS
  1644. } KSPROPERTY_VPCONFIG;
  1645. //=========================
  1646. // IBasicAudio
  1647. //
  1648. #define STATIC_CLSID_KsIBasicAudioInterfaceHandler
  1649.     0xb9f8ac3e, 0x0f71, 0x11d2, 0xb7, 0x2c, 0x00, 0xc0, 0x4f, 0xb6, 0xbd, 0x3d
  1650. DEFINE_GUIDSTRUCT("b9f8ac3e-0f71-11d2-b72c-00c04fb6bd3d", CLSID_KsIBasicAudioInterfaceHandler);
  1651. #define CLSID_KsIBasicAudioInterfaceHandler DEFINE_GUIDNAMED(CLSID_KsIBasicAudioInterfaceHandler)
  1652. #if defined(__IVPType__)
  1653. typedef struct {
  1654.     AMVPSIZE    Size;
  1655.     DWORD       MaxPixelsPerSecond;
  1656.     DWORD       Reserved;
  1657. } KSVPMAXPIXELRATE, *PKSVPMAXPIXELRATE;
  1658. typedef struct {
  1659.     KSPROPERTY      Property;
  1660.     AMVPSIZE        Size;
  1661. } KSVPSIZE_PROP, *PKSVPSIZE_PROP;
  1662. typedef struct {
  1663.     DWORD   dwPitch;
  1664.     DWORD   dwXOrigin;
  1665.     DWORD   dwYOrigin;
  1666. } KSVPSURFACEPARAMS, *PKSVPSURFACEPARAMS;
  1667. #else  // !defined(__IVPType__)
  1668. #if !defined(__DDRAW_INCLUDED__)
  1669. //==========================================================================
  1670. // The following definitions must be in sync with DDraw.h in DirectX SDK
  1671. //==========================================================================
  1672. /*
  1673.  * The FourCC code is valid.
  1674.  */
  1675. #define DDPF_FOURCC                             0x00000004l
  1676. typedef struct _DDPIXELFORMAT
  1677. {
  1678.     DWORD       dwSize;                 // size of structure
  1679.     DWORD       dwFlags;                // pixel format flags
  1680.     DWORD       dwFourCC;               // (FOURCC code)
  1681.     union
  1682.     {
  1683.     DWORD   dwRGBBitCount;          // how many bits per pixel (BD_1,2,4,8,16,24,32)
  1684.     DWORD   dwYUVBitCount;          // how many bits per pixel (BD_4,8,16,24,32)
  1685.     DWORD   dwZBufferBitDepth;      // how many bits for z buffers (BD_8,16,24,32)
  1686.     DWORD   dwAlphaBitDepth;        // how many bits for alpha channels (BD_1,2,4,8)
  1687.     };
  1688.     union
  1689.     {
  1690.     DWORD   dwRBitMask;             // mask for red bit
  1691.     DWORD   dwYBitMask;             // mask for Y bits
  1692.     };
  1693.     union
  1694.     {
  1695.     DWORD   dwGBitMask;             // mask for green bits
  1696.     DWORD   dwUBitMask;             // mask for U bits
  1697.     };
  1698.     union
  1699.     {
  1700.     DWORD   dwBBitMask;             // mask for blue bits
  1701.     DWORD   dwVBitMask;             // mask for V bits
  1702.     };
  1703.     union
  1704.     {
  1705.     DWORD   dwRGBAlphaBitMask;      // mask for alpha channel
  1706.     DWORD   dwYUVAlphaBitMask;      // mask for alpha channel
  1707.     DWORD   dwRGBZBitMask;          // mask for Z channel
  1708.     DWORD   dwYUVZBitMask;          // mask for Z channel
  1709.     };
  1710. } DDPIXELFORMAT, * LPDDPIXELFORMAT;
  1711. #endif // !defined(__DDRAW_INCLUDED__)
  1712. //==========================================================================
  1713. // End of DDraw.h header info
  1714. //==========================================================================
  1715. //==========================================================================
  1716. // The following definitions must be in sync with DVP.h in DirectX SDK
  1717. //==========================================================================
  1718. #if !defined(__DVP_INCLUDED__)
  1719. typedef struct _DDVIDEOPORTCONNECT {
  1720.     DWORD dwSize;           // size of the DDVIDEOPORTCONNECT structure
  1721.     DWORD dwPortWidth;      // Width of the video port
  1722.     GUID  guidTypeID;       // Description of video port connection
  1723.     DWORD dwFlags;          // Connection flags
  1724.     DWORD dwReserved1;      // Reserved, set to zero.
  1725. } DDVIDEOPORTCONNECT, * LPDDVIDEOPORTCONNECT;
  1726. #define DDVPTYPE_E_HREFH_VREFH  
  1727.     0x54F39980L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8
  1728. #define DDVPTYPE_E_HREFL_VREFL  
  1729.     0xE09C77E0L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8
  1730. #endif // !defined(__DVP_INCLUDED__)
  1731. //==========================================================================
  1732. // End of DVP.h header info
  1733. //==========================================================================
  1734. //==========================================================================
  1735. // The following definitions must be in sync with VPType.h in AM 2.0 SDK
  1736. //==========================================================================
  1737. // pixel aspect ratios corresponding to a 720x480 NTSC image or a 720x576 image
  1738. typedef enum // AMPixAspectRatio
  1739. {
  1740.     KS_PixAspectRatio_NTSC4x3,
  1741.     KS_PixAspectRatio_NTSC16x9,
  1742.     KS_PixAspectRatio_PAL4x3,
  1743.     KS_PixAspectRatio_PAL16x9,
  1744. } KS_AMPixAspectRatio ;
  1745. typedef enum // AMVP_SELECTFORMATBY
  1746. {
  1747.     KS_AMVP_DO_NOT_CARE,
  1748.     KS_AMVP_BEST_BANDWIDTH,
  1749.     KS_AMVP_INPUT_SAME_AS_OUTPUT
  1750. } KS_AMVP_SELECTFORMATBY;
  1751. typedef enum // AMVP_MODE
  1752. {
  1753.     KS_AMVP_MODE_WEAVE,
  1754.     KS_AMVP_MODE_BOBINTERLEAVED,
  1755.     KS_AMVP_MODE_BOBNONINTERLEAVED,
  1756.     KS_AMVP_MODE_SKIPEVEN,
  1757.     KS_AMVP_MODE_SKIPODD
  1758. } KS_AMVP_MODE ;
  1759. typedef struct tagKS_AMVPDIMINFO      // AMVPDIMINFO
  1760. {
  1761.     DWORD dwFieldWidth ;            // [out] field width
  1762.     DWORD dwFieldHeight ;           // [out] field height
  1763.     DWORD dwVBIWidth ;              // [out] VBI data width
  1764.     DWORD dwVBIHeight ;             // [out] VBI data height
  1765.     RECT  rcValidRegion ;           // [out] valid rect for data cropping
  1766. } KS_AMVPDIMINFO, *PKS_AMVPDIMINFO ;
  1767. typedef struct tagKS_AMVPDATAINFO   // AMVPDATAINFO
  1768. {
  1769.     DWORD           dwSize;                 // Size of the struct
  1770.     DWORD           dwMicrosecondsPerField; // Time taken by each field
  1771.     KS_AMVPDIMINFO  amvpDimInfo;            // Dimensional Information
  1772.     DWORD           dwPictAspectRatioX;     // Pict aspect ratio in X dimn
  1773.     DWORD           dwPictAspectRatioY;     // Pict aspect ratio in Y dimn
  1774.     BOOL            bEnableDoubleClock;     // Videoport should enable double clocking
  1775.     BOOL            bEnableVACT;            // Videoport should use an external VACT signal
  1776.     BOOL            bDataIsInterlaced;      // Indicates that the signal is interlaced
  1777.     LONG            lHalfLinesOdd;          // number of halflines in the odd field
  1778.     BOOL            bFieldPolarityInverted; // Device inverts the polarity by default
  1779.     DWORD           dwNumLinesInVREF;       // Number of lines of data in VREF
  1780.     LONG            lHalfLinesEven;         // number of halflines in the even field
  1781.     DWORD           dwReserved1;            // Reserved for future use
  1782. } KS_AMVPDATAINFO, *PKS_AMVPDATAINFO;
  1783. typedef struct tagKS_AMVPSIZE   // AMVPSIZE
  1784. {
  1785.     DWORD dwWidth ;                  // [in] width in pixels
  1786.     DWORD dwHeight ;                 // [in] height in pixels
  1787. } KS_AMVPSIZE, *PKS_AMVPSIZE ;
  1788. //==========================================================================
  1789. // End of VPType.h header info
  1790. //==========================================================================
  1791. typedef struct {
  1792.     KS_AMVPSIZE     Size;
  1793.     DWORD           MaxPixelsPerSecond;
  1794.     DWORD           Reserved;
  1795. } KSVPMAXPIXELRATE, *PKSVPMAXPIXELRATE;
  1796. typedef struct {
  1797.     KSPROPERTY      Property;
  1798.     KS_AMVPSIZE     Size;
  1799. } KSVPSIZE_PROP, *PKSVPSIZE_PROP;
  1800. typedef struct {
  1801.     DWORD   dwPitch;
  1802.     DWORD   dwXOrigin;
  1803.     DWORD   dwYOrigin;
  1804. } KSVPSURFACEPARAMS, *PKSVPSURFACEPARAMS;
  1805. #endif // !defined(__IVPType__)
  1806. //
  1807. //  IVPNotify event notification
  1808. //
  1809. #define STATIC_KSEVENTSETID_VPNotify
  1810.     0x20c5598eL, 0xd3c8, 0x11d0, 0x8d, 0xfc, 0x00, 0xc0, 0x4f, 0xd7, 0xc0, 0x8b
  1811. DEFINE_GUIDSTRUCT("20c5598e-d3c8-11d0-8dfc-00c04fd7c08b", KSEVENTSETID_VPNotify);
  1812. #define KSEVENTSETID_VPNotify DEFINE_GUIDNAMED(KSEVENTSETID_VPNotify)
  1813. typedef enum {
  1814.     KSEVENT_VPNOTIFY_FORMATCHANGE,
  1815. } KSEVENT_VPNOTIFY;
  1816. //
  1817. //  VIDCAPTOSTI event notification
  1818. //
  1819. #define STATIC_KSEVENTSETID_VIDCAPTOSTI
  1820.     0xdb47de20, 0xf628, 0x11d1, 0xba, 0x41, 0x0, 0xa0, 0xc9, 0xd, 0x2b, 0x5
  1821. DEFINE_GUIDSTRUCT("DB47DE20-F628-11d1-BA41-00A0C90D2B05", KSEVENTSETID_VIDCAPTOSTI);
  1822. #define KSEVENTSETID_VIDCAPNotify DEFINE_GUIDNAMED(KSEVENTSETID_VIDCAPTOSTI)
  1823. typedef enum {
  1824.     KSEVENT_VIDCAPTOSTI_EXT_TRIGGER,
  1825. } KSEVENT_VIDCAPTOSTI;
  1826. //
  1827. //  IVPVBINotify event notification
  1828. //
  1829. #define STATIC_KSEVENTSETID_VPVBINotify
  1830.     0xec529b01L, 0x1a1f, 0x11d1, 0xba, 0xd9, 0x0, 0x60, 0x97, 0x44, 0x11, 0x1a
  1831. DEFINE_GUIDSTRUCT("ec529b01-1a1f-11d1-bad9-00609744111a", KSEVENTSETID_VPVBINotify);
  1832. #define KSEVENTSETID_VPVBINotify DEFINE_GUIDNAMED(KSEVENTSETID_VPVBINotify)
  1833. typedef enum {
  1834.     KSEVENT_VPVBINOTIFY_FORMATCHANGE,
  1835. } KSEVENT_VPVBINOTIFY;
  1836. //
  1837. // closed caption information
  1838. //
  1839. #define STATIC_KSDATAFORMAT_TYPE_AUXLine21Data 
  1840. 0x670aea80L, 0x3a82, 0x11d0, 0xb7, 0x9b, 0x00, 0xaa, 0x00, 0x37, 0x67, 0xa7
  1841. DEFINE_GUIDSTRUCT("670aea80-3a82-11d0-b79b-00aa003767a7", KSDATAFORMAT_TYPE_AUXLine21Data);
  1842. #define KSDATAFORMAT_TYPE_AUXLine21Data DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_AUXLine21Data)
  1843. #define STATIC_KSDATAFORMAT_SUBTYPE_Line21_BytePair 
  1844. 0x6e8d4a22L, 0x310c, 0x11d0, 0xb7, 0x9a, 0x00, 0xaa, 0x00, 0x37, 0x67, 0xa7
  1845. DEFINE_GUIDSTRUCT("6e8d4a22-310c-11d0-b79a-00aa003767a7", KSDATAFORMAT_SUBTYPE_Line21_BytePair);
  1846. #define KSDATAFORMAT_SUBTYPE_Line21_BytePair DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_Line21_BytePair)
  1847. #define STATIC_KSDATAFORMAT_SUBTYPE_Line21_GOPPacket 
  1848. 0x6e8d4a23L, 0x310c, 0x11d0, 0xb7, 0x9a, 0x00, 0xaa, 0x00, 0x37, 0x67, 0xa7
  1849. DEFINE_GUIDSTRUCT("6e8d4a23-310c-11d0-b79a-00aa003767a7", KSDATAFORMAT_SUBTYPE_Line21_GOPPacket);
  1850. #define KSDATAFORMAT_SUBTYPE_Line21_GOPPacket DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_Line21_GOPPacket)
  1851. typedef struct _KSGOP_USERDATA {
  1852.     ULONG sc;
  1853.     ULONG reserved1;
  1854.     BYTE cFields;
  1855.     CHAR l21Data[3];
  1856. } KSGOP_USERDATA, *PKSGOP_USERDATA;
  1857. //
  1858. // DVD encrypted PACK format type definition
  1859. //
  1860. #define STATIC_KSDATAFORMAT_TYPE_DVD_ENCRYPTED_PACK
  1861.     0xed0b916a, 0x044d, 0x11d1, 0xaa, 0x78, 0x00, 0xc0, 0x4f, 0xc3, 0x1d, 0x60
  1862. DEFINE_GUIDSTRUCT("ed0b916a-044d-11d1-aa78-00c04fc31d60", KSDATAFORMAT_TYPE_DVD_ENCRYPTED_PACK);
  1863. #define KSDATAFORMAT_TYPE_DVD_ENCRYPTED_PACK DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_DVD_ENCRYPTED_PACK)
  1864. #define KS_AM_UseNewCSSKey    0x1
  1865. // -----------------------------------------------------------------------
  1866. // KS_AM_KSPROPSETID_TSRateChange property set definitions for time stamp
  1867. // rate changes.
  1868. // -----------------------------------------------------------------------
  1869. #define STATIC_KSPROPSETID_TSRateChange
  1870.     0xa503c5c0, 0x1d1d, 0x11d1, 0xad, 0x80, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0
  1871. DEFINE_GUIDSTRUCT("A503C5C0-1D1D-11D1-AD80-444553540000", KSPROPSETID_TSRateChange);
  1872. #define KSPROPSETID_TSRateChange DEFINE_GUIDNAMED(KSPROPSETID_TSRateChange)
  1873. typedef enum {
  1874.     KS_AM_RATE_SimpleRateChange=1,  // rw, use KS_AM_SimpleRateChange
  1875.     KS_AM_RATE_ExactRateChange=2,   // rw, use KS_AM_ExactRateChange
  1876.     KS_AM_RATE_MaxFullDataRate=3,   // r, use KS_AM_MaxFullDataRate
  1877.     KS_AM_RATE_Step=4               // w, use KS_AM_Step
  1878. } KS_AM_PROPERTY_TS_RATE_CHANGE;
  1879. typedef struct {
  1880.     // this is the simplest mechanism to set a time stamp rate change on
  1881.     // a filter (simplest for the person setting the rate change, harder
  1882.     // for the filter doing the rate change).
  1883.     REFERENCE_TIME  StartTime;  //stream time at which to start this rate
  1884.     LONG        Rate;       //new rate * 10000 (decimal)
  1885. } KS_AM_SimpleRateChange, *PKS_AM_SimpleRateChange;
  1886. typedef struct {
  1887.     REFERENCE_TIME  OutputZeroTime; //input TS that maps to zero output TS
  1888.     LONG        Rate;       //new rate * 10000 (decimal)
  1889. } KS_AM_ExactRateChange, *PKS_AM_ExactRateChange;
  1890. typedef LONG KS_AM_MaxFullDataRate; //rate * 10000 (decimal)
  1891. typedef DWORD KS_AM_Step; // number of frame to step
  1892. #endif // !defined(_KSMEDIA_)