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

266 lines
8.5 KiB

  1. #ifndef __MPRPOBJ_H__
  2. #define __MPRPOBJ_H__
  3. /*++
  4. Copyright (c) 1997 1998 PHILIPS I&C
  5. Module Name: mprpobj.c
  6. Abstract: Property handling module
  7. Author: Michael Verberne
  8. Revision History:
  9. Date Reason
  10. Sept.22, 98 Optimized for NT5
  11. Nov. 30, 98 PID, VID and pushbutton flag added as custom properties
  12. --*/
  13. /*
  14. * This file defines custom properties for the
  15. * camera. These properties are additional to the
  16. * property sets VideoProcAmp and CameraControl as
  17. * defined in ksmedia.h
  18. *
  19. * The set of properties that is currently supported
  20. * by the minidriver is a subset of the properties
  21. * defined in the CRS (VGAUSB13.DOC)
  22. *
  23. * Note 1: Most of the ranges in the table(s) above
  24. * follow from the SSI Lionsoft Philips Desktop Video
  25. * Camera
  26. *
  27. * Note 2: The Pan and Tilt properties (in SQ-CIF) are
  28. * part of PROPSETID_VIDCAP_CAMERACONTROL. These
  29. * properties must be added at a later stage.
  30. *
  31. * Note 3: Color Saturation is part of
  32. * PROPSETID_VIDCAP_VIDEOPROCAMP. This must be added
  33. * at a later stage.
  34. *
  35. *-------------------------------------------------------
  36. * Properties defined in PROPSETID_VIDCAP_VIDEOPROCAMP
  37. *
  38. * PROPERTY RANGE ACTIVE STATE
  39. *
  40. * Contrast -32..31 Always
  41. *
  42. * Brightness ?? 0..31 Always
  43. *
  44. * Back_Light_Compensation 0 = Off Always
  45. * 1 = On
  46. *
  47. * Color Enable 0 = Off Always
  48. * 1 = On
  49. *
  50. * Gamma 0..100 Always
  51. *
  52. *-------------------------------------------------------
  53. * Properties defined in PROPSETID_PHILIPS_CUSTOM_PROP
  54. *
  55. * PROPERTY RANGE ACTIVE STATE
  56. *
  57. * White Balance 0 = Indoor | Always
  58. * 1 = Outdoor |
  59. * 2 = FL |
  60. * 3 = Auto |
  61. * 4 = Manual
  62. *
  63. * White Balance Speed 1..32 In WB_Auto
  64. *
  65. * White Balance Delay 1..63 In WB_Auto
  66. *
  67. * White Balance Red Gain 0..255 In WB_Manual
  68. *
  69. * White Balance Blue_Gain 0..255 In WB_Manual
  70. *
  71. * Auto exposure 8..255
  72. * speed control
  73. *
  74. * Shutterspeed 0 = 1/25, In Shutter Fixed
  75. * 1 = 1/33,
  76. * 2 = 1/50,
  77. * 3 = 1/100,
  78. * 4 = 1/250,
  79. * 5 = 1/500,
  80. * 6 = 1/1000
  81. * 7 = 1/1500
  82. * 8 = 1/2500
  83. * 9 = 1/5000
  84. * a = 1/10000
  85. *
  86. * Shutter Mode 0 Auto Mode
  87. * 0xff Fixed Mode
  88. *
  89. * Shutter Status 0 Smaller
  90. * 1 Equal
  91. * 2 Greater
  92. *
  93. * AGC Mode 0 Auto Mode
  94. * 0xff Fixed Mode
  95. *
  96. * AGC Speed 0..0x9f In AGC Mode Auto
  97. *
  98. * Framerate ff = VGA, still image for VGA
  99. * 1 = 3.75 CIF
  100. * 2 = 5, Always
  101. * 3 = 7,5 Always
  102. * 4 = 10, Always
  103. * 5 = 12, Not for VGA
  104. * 6 = 15, Always
  105. * 7 = 20, Q-CIF/SQ-CIF
  106. * 8 = 24 Q-CIF/SQ-CIF
  107. *
  108. * Framerate supported returns a long representing
  109. * the currently available
  110. * framerates
  111. * b0 VGA
  112. * b1 3_75
  113. * b2 5
  114. * b3 7.5
  115. * b4 10
  116. * b5 12
  117. * b6 15
  118. * b7 20
  119. * b8 24
  120. * b9...b31 not used
  121. *
  122. * Video format 3 = SQ-CIF Always
  123. * 2 = Q-CIF
  124. * 1 = CIF
  125. * 4 = VGA
  126. *
  127. * Exposure Control 0 = Auto Always
  128. * ff= Shutter Fixed
  129. *
  130. *
  131. */
  132. #include "windef.h"
  133. #include "mmsystem.h"
  134. #include "ks.h"
  135. // Whitebalance mode values
  136. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_WB_MODE_INDOOR 0
  137. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_WB_MODE_OUTDOOR 1
  138. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_WB_MODE_TL 2
  139. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_WB_MODE_MANUAL 3
  140. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_WB_MODE_AUTO 4
  141. // Auto Exposure shutter mode values
  142. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_AE_SHUTTER_MODE_AUTO 0
  143. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_AE_SHUTTER_MODE_FIXED 0xff
  144. // Auto Exposure agc mode values
  145. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_AE_AGC_MODE_AUTO 0
  146. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_AE_AGC_MODE_FIXED 0xff
  147. // Auto Exposure flickerless values
  148. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_AE_FLICKERLESS_ON 0xff
  149. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_AE_FLICKERLESS_OFF 0x0
  150. // Auto Exposure shutterspeed values (1/xx s)
  151. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_AE_SHUTTER_SPEED_25 0x0
  152. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_AE_SHUTTER_SPEED_33 0x1
  153. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_AE_SHUTTER_SPEED_50 0x2
  154. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_AE_SHUTTER_SPEED_100 0x3
  155. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_AE_SHUTTER_SPEED_250 0x4
  156. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_AE_SHUTTER_SPEED_500 0x5
  157. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_AE_SHUTTER_SPEED_1000 0x6
  158. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_AE_SHUTTER_SPEED_1500 0x7
  159. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_AE_SHUTTER_SPEED_2500 0x8
  160. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_AE_SHUTTER_SPEED_5000 0x9
  161. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_AE_SHUTTER_SPEED_10000 0xa
  162. // Auto Exposure shutterspeed status values
  163. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_AE_SHUTTER_STATUS_SMALLER 0x0
  164. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_AE_SHUTTER_STATUS_EQUAL 0x1
  165. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_AE_SHUTTER_STATUS_GREATER 0x2
  166. // Framerate values
  167. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_FRAMERATE_VGA 0xff
  168. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_FRAMERATE_375 0x4
  169. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_FRAMERATE_5 0x5
  170. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_FRAMERATE_75 0x8
  171. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_FRAMERATE_10 0xa
  172. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_FRAMERATE_12 0xc
  173. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_FRAMERATE_15 0xf
  174. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_FRAMERATE_20 0x14
  175. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_FRAMERATE_24 0x18
  176. // Video format values
  177. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_VIDEOFORMAT_CIF 0x1
  178. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_VIDEOFORMAT_QCIF 0x2
  179. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_VIDEOFORMAT_SQCIF 0x3
  180. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_VIDEOFORMAT_VGA 0x4
  181. // Video compression values
  182. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_VIDEOCOMPRESSION_UNCOMPRESSED 0x1
  183. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_VIDEOCOMPRESSION_COMPRESSED3X 0x3
  184. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_VIDEOCOMPRESSION_COMPRESSED4X 0x4
  185. // Sensortype values
  186. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_SENSORTYPE_PAL_MR 0x1
  187. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_SENSORTYPE_VGA 0x0
  188. // Commands for camera default
  189. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_DEFAULTS_RESTORE_USER 0x0
  190. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_DEFAULTS_SAVE_USER 0x1
  191. #define KSPROPERTY_PHILIPS_CUSTOM_PROP_DEFAULTS_RESTORE_FACTORY 0x2
  192. // define the GUID of the custom propertyset
  193. #define STATIC_PROPSETID_PHILIPS_CUSTOM_PROP \
  194. 0xb5ca8702, 0xc487, 0x11d1, 0xb3, 0xd, 0x0, 0x60, 0x97, 0xd1, 0xcd, 0x79
  195. DEFINE_GUIDEX(PROPSETID_PHILIPS_CUSTOM_PROP);
  196. // define property id's for the custom property set
  197. typedef enum {
  198. KSPROPERTY_PHILIPS_CUSTOM_PROP_WB_MODE,
  199. KSPROPERTY_PHILIPS_CUSTOM_PROP_WB_SPEED,
  200. KSPROPERTY_PHILIPS_CUSTOM_PROP_WB_DELAY,
  201. KSPROPERTY_PHILIPS_CUSTOM_PROP_WB_RED_GAIN,
  202. KSPROPERTY_PHILIPS_CUSTOM_PROP_WB_BLUE_GAIN,
  203. KSPROPERTY_PHILIPS_CUSTOM_PROP_AE_CONTROL_SPEED,
  204. KSPROPERTY_PHILIPS_CUSTOM_PROP_AE_FLICKERLESS,
  205. KSPROPERTY_PHILIPS_CUSTOM_PROP_AE_SHUTTER_MODE,
  206. KSPROPERTY_PHILIPS_CUSTOM_PROP_AE_SHUTTER_SPEED,
  207. KSPROPERTY_PHILIPS_CUSTOM_PROP_AE_SHUTTER_STATUS,
  208. KSPROPERTY_PHILIPS_CUSTOM_PROP_AE_AGC_MODE,
  209. KSPROPERTY_PHILIPS_CUSTOM_PROP_AE_AGC,
  210. KSPROPERTY_PHILIPS_CUSTOM_PROP_DRIVERVERSION,
  211. KSPROPERTY_PHILIPS_CUSTOM_PROP_FRAMERATE,
  212. KSPROPERTY_PHILIPS_CUSTOM_PROP_FRAMERATES_SUPPORTED,
  213. KSPROPERTY_PHILIPS_CUSTOM_PROP_VIDEOFORMAT,
  214. KSPROPERTY_PHILIPS_CUSTOM_PROP_SENSORTYPE,
  215. KSPROPERTY_PHILIPS_CUSTOM_PROP_VIDEOCOMPRESSION,
  216. KSPROPERTY_PHILIPS_CUSTOM_PROP_DEFAULTS,
  217. KSPROPERTY_PHILIPS_CUSTOM_PROP_RELEASE_NUMBER,
  218. KSPROPERTY_PHILIPS_CUSTOM_PROP_PUSHBUTTON_FLAG,
  219. KSPROPERTY_PHILIPS_CUSTOM_PROP_VENDOR_ID,
  220. KSPROPERTY_PHILIPS_CUSTOM_PROP_PRODUCT_ID
  221. } KSPROPERTY_PHILIPS_CUSTOM_PROP;
  222. // define a generic structure which will be used to pass
  223. // the properties Currently, this is the same as for
  224. // KSPROPERTY_PROCAMP_S.
  225. //
  226. // Note: There are currently no
  227. // KSPROPERTY_PHILIPS_CUSTOM_PROP_FLAGS defined
  228. typedef struct {
  229. KSPROPERTY Property;
  230. ULONG Instance;
  231. LONG Value; // Value to set or get
  232. ULONG Flags; // KSPROPERTY_PHILIPS_CUSTOM_PROP_FLAGS_
  233. ULONG Capabilities; // KSPROPERTY_PHILIPS_CUSTOM_PROP_FLAGS_
  234. } KSPROPERTY_PHILIPS_CUSTOM_PROP_S, *PKSPROPERTY_PHILIPS_CUSTOM_PROP_S;
  235. #endif /* __MPRPOBJ_H__ */