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.

505 lines
15 KiB

  1. //===========================================================================
  2. //
  3. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  4. // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  5. // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  6. // PURPOSE.
  7. //
  8. // Copyright (c) 1996 - 2000 Microsoft Corporation. All Rights Reserved.
  9. //
  10. //===========================================================================
  11. //
  12. // Video and camera properties of a 1394 desktop digital camera
  13. //
  14. #ifndef _PROPDATA_H
  15. #define _PROPDATA_H
  16. // ------------------------------------------------------------------------
  17. // S O N Y D i g i t a l C a m e r a
  18. // ------------------------------------------------------------------------
  19. // ------------------------------------------------------------------------
  20. // Property set for VideoProcAmp
  21. // ------------------------------------------------------------------------
  22. // Default values for some of the properties
  23. #define SONYDCAM_DEF_BRIGHTNESS 12
  24. #define SONYDCAM_DEF_HUE 128
  25. #define SONYDCAM_DEF_SATURATION 25
  26. #define SONYDCAM_DEF_SHARPNESS 15
  27. #define SONYDCAM_DEF_WHITEBALANCE 160
  28. #define SONYDCAM_DEF_ZOOM 640
  29. #define SONYDCAM_DEF_FOCUS 1600
  30. //
  31. // First define all of the ranges and stepping values
  32. //
  33. // ------------------------------------------------------------------------
  34. static KSPROPERTY_STEPPING_LONG BrightnessRangeAndStep [] =
  35. {
  36. {
  37. 1, // SteppingDelta (range / steps)
  38. 0, // Reserved
  39. 0, // Minimum in (IRE * 100) units
  40. 15 // Maximum in (IRE * 100) units
  41. }
  42. };
  43. const static LONG BrightnessDefault = SONYDCAM_DEF_BRIGHTNESS;
  44. static KSPROPERTY_MEMBERSLIST BrightnessMembersList [] =
  45. {
  46. {
  47. {
  48. KSPROPERTY_MEMBER_RANGES,
  49. sizeof (BrightnessRangeAndStep),
  50. SIZEOF_ARRAY (BrightnessRangeAndStep),
  51. 0
  52. },
  53. (PVOID) BrightnessRangeAndStep,
  54. },
  55. {
  56. {
  57. KSPROPERTY_MEMBER_VALUES,
  58. sizeof (BrightnessDefault),
  59. sizeof (BrightnessDefault),
  60. KSPROPERTY_MEMBER_FLAG_DEFAULT
  61. },
  62. (PVOID) &BrightnessDefault,
  63. }
  64. };
  65. static KSPROPERTY_VALUES BrightnessValues =
  66. {
  67. {
  68. STATICGUIDOF (KSPROPTYPESETID_General),
  69. VT_I4,
  70. 0
  71. },
  72. SIZEOF_ARRAY (BrightnessMembersList),
  73. BrightnessMembersList
  74. };
  75. // ------------------------------------------------------------------------
  76. static KSPROPERTY_STEPPING_LONG SharpnessRangeAndStep [] =
  77. {
  78. {
  79. 1, // SteppingDelta (range / steps)
  80. 0, // Reserved
  81. 0, // Minimum in (gain * 100) units
  82. 15 // Maximum in (gain * 100) units
  83. }
  84. };
  85. const static LONG SharpnessDefault = SONYDCAM_DEF_SHARPNESS;
  86. static KSPROPERTY_MEMBERSLIST SharpnessMembersList [] =
  87. {
  88. {
  89. {
  90. KSPROPERTY_MEMBER_RANGES,
  91. sizeof (SharpnessRangeAndStep),
  92. SIZEOF_ARRAY (SharpnessRangeAndStep),
  93. 0
  94. },
  95. (PVOID) SharpnessRangeAndStep
  96. },
  97. {
  98. {
  99. KSPROPERTY_MEMBER_VALUES,
  100. sizeof (SharpnessDefault),
  101. sizeof (SharpnessDefault),
  102. KSPROPERTY_MEMBER_FLAG_DEFAULT
  103. },
  104. (PVOID) &SharpnessDefault,
  105. }
  106. };
  107. static KSPROPERTY_VALUES SharpnessValues =
  108. {
  109. {
  110. STATICGUIDOF (KSPROPTYPESETID_General),
  111. VT_I4,
  112. 0
  113. },
  114. SIZEOF_ARRAY (SharpnessMembersList),
  115. SharpnessMembersList
  116. };
  117. // ------------------------------------------------------------------------
  118. static KSPROPERTY_STEPPING_LONG HueRangeAndStep [] =
  119. {
  120. {
  121. 1, // SteppingDelta (range / steps)
  122. 0, // Reserved
  123. 96, // Minimum in (gain * 100) units
  124. 160 // Maximum in (gain * 100) units
  125. }
  126. };
  127. const static LONG HueDefault = SONYDCAM_DEF_HUE;
  128. static KSPROPERTY_MEMBERSLIST HueMembersList [] =
  129. {
  130. {
  131. {
  132. KSPROPERTY_MEMBER_RANGES,
  133. sizeof (HueRangeAndStep),
  134. SIZEOF_ARRAY (HueRangeAndStep),
  135. 0
  136. },
  137. (PVOID) HueRangeAndStep
  138. },
  139. {
  140. {
  141. KSPROPERTY_MEMBER_VALUES,
  142. sizeof (HueDefault),
  143. sizeof (HueDefault),
  144. KSPROPERTY_MEMBER_FLAG_DEFAULT
  145. },
  146. (PVOID) &HueDefault,
  147. }
  148. };
  149. static KSPROPERTY_VALUES HueValues =
  150. {
  151. {
  152. STATICGUIDOF (KSPROPTYPESETID_General),
  153. VT_I4,
  154. 0
  155. },
  156. SIZEOF_ARRAY (HueMembersList),
  157. HueMembersList
  158. };
  159. // ------------------------------------------------------------------------
  160. static KSPROPERTY_STEPPING_LONG SaturationRangeAndStep [] =
  161. {
  162. {
  163. 1, // SteppingDelta (range / steps)
  164. 0, // Reserved
  165. 0, // Minimum in (gain * 100) units
  166. 199 // Maximum in (gain * 100) units
  167. }
  168. };
  169. const static LONG SaturationDefault = SONYDCAM_DEF_SATURATION;
  170. static KSPROPERTY_MEMBERSLIST SaturationMembersList [] =
  171. {
  172. {
  173. {
  174. KSPROPERTY_MEMBER_RANGES,
  175. sizeof (SaturationRangeAndStep),
  176. SIZEOF_ARRAY (SaturationRangeAndStep),
  177. 0
  178. },
  179. (PVOID) SaturationRangeAndStep
  180. },
  181. {
  182. {
  183. KSPROPERTY_MEMBER_VALUES,
  184. sizeof (SaturationDefault),
  185. sizeof (SaturationDefault),
  186. KSPROPERTY_MEMBER_FLAG_DEFAULT
  187. },
  188. (PVOID) &SaturationDefault,
  189. }
  190. };
  191. static KSPROPERTY_VALUES SaturationValues =
  192. {
  193. {
  194. STATICGUIDOF (KSPROPTYPESETID_General),
  195. VT_I4,
  196. 0
  197. },
  198. SIZEOF_ARRAY (SaturationMembersList),
  199. SaturationMembersList
  200. };
  201. // ------------------------------------------------------------------------
  202. static KSPROPERTY_STEPPING_LONG WhiteBalanceRangeAndStep [] =
  203. {
  204. {
  205. 1, // SteppingDelta (range / steps)
  206. 0, // Reserved
  207. 32, // Minimum in (gain * 100) units
  208. 224 // Maximum in (gain * 100) units
  209. }
  210. };
  211. const static LONG WhiteBalanceDefault = SONYDCAM_DEF_WHITEBALANCE;
  212. static KSPROPERTY_MEMBERSLIST WhiteBalanceMembersList [] =
  213. {
  214. {
  215. {
  216. KSPROPERTY_MEMBER_RANGES,
  217. sizeof (WhiteBalanceRangeAndStep),
  218. SIZEOF_ARRAY (WhiteBalanceRangeAndStep),
  219. 0
  220. },
  221. (PVOID) WhiteBalanceRangeAndStep
  222. },
  223. {
  224. {
  225. KSPROPERTY_MEMBER_VALUES,
  226. sizeof (WhiteBalanceDefault),
  227. sizeof (WhiteBalanceDefault),
  228. KSPROPERTY_MEMBER_FLAG_DEFAULT
  229. },
  230. (PVOID) &WhiteBalanceDefault,
  231. }
  232. };
  233. static KSPROPERTY_VALUES WhiteBalanceValues =
  234. {
  235. {
  236. STATICGUIDOF (KSPROPTYPESETID_General),
  237. VT_I4,
  238. 0
  239. },
  240. SIZEOF_ARRAY (WhiteBalanceMembersList),
  241. WhiteBalanceMembersList
  242. };
  243. // ------------------------------------------------------------------------
  244. static KSPROPERTY_STEPPING_LONG FocusRangeAndStep [] =
  245. {
  246. {
  247. 1, // SteppingDelta (range / steps)
  248. 0, // Reserved
  249. 0, // Minimum in (IRE * 100) units
  250. 3456 // Maximum in (IRE * 100) units
  251. }
  252. };
  253. const static LONG FocusDefault = SONYDCAM_DEF_FOCUS;
  254. static KSPROPERTY_MEMBERSLIST FocusMembersList [] =
  255. {
  256. {
  257. {
  258. KSPROPERTY_MEMBER_RANGES,
  259. sizeof (FocusRangeAndStep),
  260. SIZEOF_ARRAY (FocusRangeAndStep),
  261. 0
  262. },
  263. (PVOID) FocusRangeAndStep,
  264. },
  265. {
  266. {
  267. KSPROPERTY_MEMBER_VALUES,
  268. sizeof (FocusDefault),
  269. sizeof (FocusDefault),
  270. KSPROPERTY_MEMBER_FLAG_DEFAULT
  271. },
  272. (PVOID) &FocusDefault,
  273. }
  274. };
  275. static KSPROPERTY_VALUES FocusValues =
  276. {
  277. {
  278. STATICGUIDOF (KSPROPTYPESETID_General),
  279. VT_I4,
  280. 0
  281. },
  282. SIZEOF_ARRAY (FocusMembersList),
  283. FocusMembersList
  284. };
  285. // ------------------------------------------------------------------------
  286. static KSPROPERTY_STEPPING_LONG ZoomRangeAndStep [] =
  287. {
  288. {
  289. 1, // SteppingDelta (range / steps)
  290. 0, // Reserved
  291. 64, // Minimum in (IRE * 100) units
  292. 1855 // Maximum in (IRE * 100) units
  293. }
  294. };
  295. const static LONG ZoomDefault = SONYDCAM_DEF_ZOOM;
  296. static KSPROPERTY_MEMBERSLIST ZoomMembersList [] =
  297. {
  298. {
  299. {
  300. KSPROPERTY_MEMBER_RANGES,
  301. sizeof (ZoomRangeAndStep),
  302. SIZEOF_ARRAY (ZoomRangeAndStep),
  303. 0
  304. },
  305. (PVOID) ZoomRangeAndStep,
  306. },
  307. {
  308. {
  309. KSPROPERTY_MEMBER_VALUES,
  310. sizeof (ZoomDefault),
  311. sizeof (ZoomDefault),
  312. KSPROPERTY_MEMBER_FLAG_DEFAULT
  313. },
  314. (PVOID) &ZoomDefault,
  315. }
  316. };
  317. static KSPROPERTY_VALUES ZoomValues =
  318. {
  319. {
  320. STATICGUIDOF (KSPROPTYPESETID_General),
  321. VT_I4,
  322. 0
  323. },
  324. SIZEOF_ARRAY (ZoomMembersList),
  325. ZoomMembersList
  326. };
  327. // ------------------------------------------------------------------------
  328. DEFINE_KSPROPERTY_TABLE(VideoProcAmpProperties)
  329. {
  330. DEFINE_KSPROPERTY_ITEM
  331. (
  332. KSPROPERTY_VIDEOPROCAMP_BRIGHTNESS,
  333. TRUE, // GetSupported or Handler
  334. sizeof(KSPROPERTY_VIDEOPROCAMP_S), // MinProperty
  335. sizeof(KSPROPERTY_VIDEOPROCAMP_S), // MinData
  336. TRUE, // SetSupported or Handler
  337. &BrightnessValues, // Values
  338. 0, // RelationsCount
  339. NULL, // Relations
  340. NULL, // SupportHandler
  341. sizeof(ULONG) // SerializedSize
  342. ),
  343. DEFINE_KSPROPERTY_ITEM
  344. (
  345. KSPROPERTY_VIDEOPROCAMP_SHARPNESS,
  346. TRUE, // GetSupported or Handler
  347. sizeof(KSPROPERTY_VIDEOPROCAMP_S), // MinProperty
  348. sizeof(KSPROPERTY_VIDEOPROCAMP_S), // MinData
  349. TRUE, // SetSupported or Handler
  350. &SharpnessValues, // Values
  351. 0, // RelationsCount
  352. NULL, // Relations
  353. NULL, // SupportHandler
  354. sizeof(ULONG) // SerializedSize
  355. ),
  356. DEFINE_KSPROPERTY_ITEM
  357. (
  358. KSPROPERTY_VIDEOPROCAMP_HUE,
  359. TRUE, // GetSupported or Handler
  360. sizeof(KSPROPERTY_VIDEOPROCAMP_S), // MinProperty
  361. sizeof(KSPROPERTY_VIDEOPROCAMP_S), // MinData
  362. TRUE, // SetSupported or Handler
  363. &HueValues, // Values
  364. 0, // RelationsCount
  365. NULL, // Relations
  366. NULL, // SupportHandler
  367. sizeof(ULONG) // SerializedSize
  368. ),
  369. DEFINE_KSPROPERTY_ITEM
  370. (
  371. KSPROPERTY_VIDEOPROCAMP_SATURATION,
  372. TRUE, // GetSupported or Handler
  373. sizeof(KSPROPERTY_VIDEOPROCAMP_S), // MinProperty
  374. sizeof(KSPROPERTY_VIDEOPROCAMP_S), // MinData
  375. TRUE, // SetSupported or Handler
  376. &SaturationValues, // Values
  377. 0, // RelationsCount
  378. NULL, // Relations
  379. NULL, // SupportHandler
  380. sizeof(ULONG) // SerializedSize
  381. ),
  382. DEFINE_KSPROPERTY_ITEM
  383. (
  384. KSPROPERTY_VIDEOPROCAMP_WHITEBALANCE,
  385. TRUE, // GetSupported or Handler
  386. sizeof(KSPROPERTY_VIDEOPROCAMP_S), // MinProperty
  387. sizeof(KSPROPERTY_VIDEOPROCAMP_S), // MinData
  388. TRUE, // SetSupported or Handler
  389. &WhiteBalanceValues, // Values
  390. 0, // RelationsCount
  391. NULL, // Relations
  392. NULL, // SupportHandler
  393. sizeof(ULONG) // SerializedSize
  394. ),
  395. };
  396. DEFINE_KSPROPERTY_TABLE(CameraControlProperties)
  397. {
  398. DEFINE_KSPROPERTY_ITEM
  399. (
  400. KSPROPERTY_CAMERACONTROL_FOCUS,
  401. TRUE, // GetSupported or Handler
  402. sizeof(KSPROPERTY_CAMERACONTROL_S), // MinProperty
  403. sizeof(KSPROPERTY_CAMERACONTROL_S), // MinData
  404. TRUE, // SetSupported or Handler
  405. &FocusValues, // Values
  406. 0, // RelationsCount
  407. NULL, // Relations
  408. NULL, // SupportHandler
  409. sizeof(ULONG) // SerializedSize
  410. ),
  411. DEFINE_KSPROPERTY_ITEM
  412. (
  413. KSPROPERTY_CAMERACONTROL_ZOOM,
  414. TRUE, // GetSupported or Handler
  415. sizeof(KSPROPERTY_CAMERACONTROL_S), // MinProperty
  416. sizeof(KSPROPERTY_CAMERACONTROL_S), // MinData
  417. TRUE, // SetSupported or Handler
  418. &ZoomValues, // Values
  419. 0, // RelationsCount
  420. NULL, // Relations
  421. NULL, // SupportHandler
  422. sizeof(ULONG) // SerializedSize
  423. ),
  424. };
  425. // ------------------------------------------------------------------------
  426. // Array of all of the property sets supported by the adapter
  427. // ------------------------------------------------------------------------
  428. DEFINE_KSPROPERTY_SET_TABLE(AdapterPropertyTable)
  429. {
  430. DEFINE_KSPROPERTY_SET
  431. (
  432. &PROPSETID_VIDCAP_VIDEOPROCAMP,
  433. SIZEOF_ARRAY(VideoProcAmpProperties),
  434. VideoProcAmpProperties,
  435. 0,
  436. NULL
  437. ),
  438. DEFINE_KSPROPERTY_SET
  439. (
  440. &PROPSETID_VIDCAP_CAMERACONTROL,
  441. SIZEOF_ARRAY(CameraControlProperties),
  442. CameraControlProperties,
  443. 0,
  444. NULL
  445. )
  446. };
  447. #define NUMBER_OF_ADAPTER_PROPERTY_SETS (SIZEOF_ARRAY (AdapterPropertyTable))
  448. #endif