Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

151 lines
4.3 KiB

  1. /******************************************************************************
  2. *
  3. * $RCSfile: AvKsProp.h $
  4. * $Source: u:/si/VXP/Wdm/Include/AvKsProp.h $
  5. * $Author: Max $
  6. * $Date: 1998/09/16 23:37:50 $
  7. * $Revision: 1.3 $
  8. *
  9. * Written by: Max Paklin
  10. * Purpose: Implementation of analog stream for WDM driver
  11. *
  12. *******************************************************************************
  13. *
  14. * Copyright 1996-97, AuraVision Corporation. All rights reserved.
  15. *
  16. * AuraVision Corporation makes no warranty of any kind, express or implied,
  17. * with regard to this software. In no event shall AuraVision Corporation
  18. * be liable for incidental or consequential damages in connection with or
  19. * arising from the furnishing, performance, or use of this software.
  20. *
  21. *******************************************************************************/
  22. #ifndef __AVKSPROP_H__
  23. #define __AVKSPROP_H__
  24. #define DEFINE_AV_PROPITEM_RANGE_STEP( name, step, min, max, def )\
  25. const ULONG c_n##name = def;\
  26. static KSPROPERTY_STEPPING_LONG ras##name[] = { step, 0, min, max };\
  27. static KSPROPERTY_MEMBERSLIST list##name[] =\
  28. {\
  29. {\
  30. {\
  31. KSPROPERTY_MEMBER_STEPPEDRANGES,\
  32. sizeof( ras##name ),\
  33. SIZEOF_ARRAY( ras##name ),\
  34. 0\
  35. },\
  36. (PVOID)ras##name\
  37. },\
  38. {\
  39. {\
  40. KSPROPERTY_MEMBER_VALUES,\
  41. sizeof( int ),\
  42. sizeof( int ),\
  43. KSPROPERTY_MEMBER_FLAG_DEFAULT\
  44. },\
  45. (PVOID) &c_n##name,\
  46. }\
  47. };\
  48. static KSPROPERTY_VALUES val##name =\
  49. {\
  50. {\
  51. STATICGUIDOF( KSPROPTYPESETID_General ),\
  52. VT_I4,\
  53. 0\
  54. },\
  55. SIZEOF_ARRAY( list##name ),\
  56. list##name\
  57. };
  58. #define DEFINE_AV_PROPITEM_RANGE( name, min, max, def )\
  59. DEFINE_AV_PROPITEM_RANGE_STEP( name, 1, min, max, def )
  60. #define _ADD_AV_PROPITEM_RANGE( name, property, type, read, write )\
  61. DEFINE_KSPROPERTY_ITEM\
  62. (\
  63. property,\
  64. read, /* GetSupported or Handler */\
  65. sizeof( type ), /* MinProperty */\
  66. sizeof( type ), /* MinData */\
  67. write, /* SetSupported or Handler */\
  68. &val##name, /* Values */\
  69. 0, /* RelationsCount */\
  70. NULL, /* Relations */\
  71. NULL, /* SupportHandler */\
  72. sizeof( ULONG ) /* SerializedSize */\
  73. )
  74. #define ADD_AV_PROPITEM_RANGE( name, property, type )\
  75. _ADD_AV_PROPITEM_RANGE( name, property, type, TRUE, TRUE )
  76. #define ADD_AV_PROPITEM_RANGE_READ( name, property, type )\
  77. _ADD_AV_PROPITEM_RANGE( name, property, type, TRUE, FALSE )
  78. #define ADD_AV_PROPITEM_RANGE_WRITE( name, property, type )\
  79. _ADD_AV_PROPITEM_RANGE( name, property, type, FALSE, TRUE )
  80. #define _ADD_AV_PROPITEM_TYPE( property, type, read, write )\
  81. DEFINE_KSPROPERTY_ITEM\
  82. (\
  83. property,\
  84. read, /* GetSupported or Handler */\
  85. sizeof( type ), /* MinProperty */\
  86. sizeof( type ), /* MinData */\
  87. write, /* SetSupported or Handler */\
  88. NULL, /* Values */\
  89. 0, /* RelationsCount */\
  90. NULL, /* Relations */\
  91. NULL, /* SupportHandler */\
  92. sizeof( ULONG ) /* SerializedSize */\
  93. )
  94. #define ADD_AV_PROPITEM_TYPE( property, type )\
  95. _ADD_AV_PROPITEM_TYPE( property, type, TRUE, TRUE )
  96. #define ADD_AV_PROPITEM_RANGE_VPA( name, property )\
  97. ADD_AV_PROPITEM_RANGE( name, property, KSPROPERTY_VIDEOPROCAMP_S )
  98. #define ADD_AV_PROPITEM_RANGE_U( name, property )\
  99. ADD_AV_PROPITEM_RANGE( name, property, ULONG )
  100. #define _ADD_AV_PROPITEM( property, read, write )\
  101. DEFINE_KSPROPERTY_ITEM\
  102. (\
  103. property,\
  104. read, /* GetSupported or Handler */\
  105. sizeof( ULONG ), /* MinProperty */\
  106. sizeof( ULONG ), /* MinData */\
  107. write, /* SetSupported or Handler */\
  108. NULL, /* Values */\
  109. 0, /* RelationsCount */\
  110. NULL, /* Relations */\
  111. NULL, /* SupportHandler */\
  112. sizeof( ULONG ) /* SerializedSize */\
  113. )
  114. #define ADD_AV_PROPITEM( property )\
  115. _ADD_AV_PROPITEM( property, TRUE, TRUE )
  116. #define ADD_AV_PROPITEM_READ( property )\
  117. _ADD_AV_PROPITEM( property, TRUE, FALSE )
  118. #define ADD_AV_PROPITEM_WRITE( property )\
  119. _ADD_AV_PROPITEM( property, FALSE, TRUE )
  120. #define DEFINE_AV_KSPROPERTY_TABLE( setname )\
  121. DEFINE_KSPROPERTY_TABLE( setname )
  122. #define DEFINE_AV_KSPROPERTY_SET( guid, propertyname )\
  123. DEFINE_KSPROPERTY_SET\
  124. (\
  125. &guid, /* Property set GUID */\
  126. SIZEOF_ARRAY( propertyname ), /* Size of array of supported properties */\
  127. propertyname, /* Array of supported properties */\
  128. 0,\
  129. NULL\
  130. )
  131. #endif // #ifndef __AVKSPROP_H__