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.

594 lines
21 KiB

  1. // $Header: G:/SwDev/WDM/Video/bt848/rcs/Capprop.h 1.5 1998/04/29 22:43:29 tomz Exp $
  2. //==========================================================================;
  3. //
  4. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  5. // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  6. // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  7. // PURPOSE.
  8. //
  9. // Copyright (c) 1992 - 1996 Microsoft Corporation. All Rights Reserved.
  10. //
  11. //==========================================================================;
  12. //
  13. // Property set for the Video Crossbar
  14. //
  15. #include "mytypes.h"
  16. DEFINE_KSPROPERTY_TABLE(XBarProperties)
  17. {
  18. DEFINE_KSPROPERTY_ITEM
  19. (
  20. KSPROPERTY_CROSSBAR_CAPS, // PropertyId
  21. TRUE, // GetSupported or Handler
  22. sizeof(KSPROPERTY_CROSSBAR_CAPS_S), // MinProperty
  23. sizeof(KSPROPERTY_CROSSBAR_CAPS_S), // MinData
  24. FALSE, // SetSupported or Handler
  25. NULL, // Values
  26. 0, // RelationsCount
  27. NULL, // Relations
  28. NULL, // SupportHandler
  29. sizeof(ULONG) // SerializedSize
  30. ),
  31. DEFINE_KSPROPERTY_ITEM
  32. (
  33. KSPROPERTY_CROSSBAR_CAN_ROUTE,
  34. TRUE, // GetSupported or Handler
  35. sizeof(KSPROPERTY_CROSSBAR_ROUTE_S), // MinProperty
  36. sizeof(KSPROPERTY_CROSSBAR_ROUTE_S), // MinData
  37. FALSE, // SetSupported or Handler
  38. NULL, // Values
  39. 0, // RelationsCount
  40. NULL, // Relations
  41. NULL, // SupportHandler
  42. sizeof(ULONG) // SerializedSize
  43. ),
  44. DEFINE_KSPROPERTY_ITEM
  45. (
  46. KSPROPERTY_CROSSBAR_ROUTE,
  47. true, // GetSupported or Handler
  48. sizeof(KSPROPERTY_CROSSBAR_ROUTE_S), // MinProperty
  49. sizeof(KSPROPERTY_CROSSBAR_ROUTE_S), // MinData
  50. true, // SetSupported or Handler
  51. NULL, // Values
  52. 0, // RelationsCount
  53. NULL, // Relations
  54. NULL, // SupportHandler
  55. sizeof(ULONG) // SerializedSize
  56. ),
  57. DEFINE_KSPROPERTY_ITEM
  58. (
  59. KSPROPERTY_CROSSBAR_PININFO,
  60. TRUE, // GetSupported or Handler
  61. sizeof(KSPROPERTY_CROSSBAR_PININFO_S), // MinProperty
  62. sizeof(KSPROPERTY_CROSSBAR_PININFO_S), // MinData
  63. FALSE, // SetSupported or Handler
  64. NULL, // Values
  65. 0, // RelationsCount
  66. NULL, // Relations
  67. NULL, // SupportHandler
  68. 0 // SerializedSize
  69. )
  70. };
  71. #if 1
  72. //
  73. // Property set for the TVTuner
  74. //
  75. DEFINE_KSPROPERTY_TABLE(TVTunerProperties)
  76. {
  77. DEFINE_KSPROPERTY_ITEM
  78. (
  79. KSPROPERTY_TUNER_CAPS,
  80. TRUE, // GetSupported or Handler
  81. sizeof(KSPROPERTY_TUNER_CAPS_S), // MinProperty
  82. sizeof(KSPROPERTY_TUNER_CAPS_S), // MinData
  83. FALSE, // SetSupported or Handler
  84. NULL, // Values
  85. 0, // RelationsCount
  86. NULL, // Relations
  87. NULL, // SupportHandler
  88. 0 // SerializedSize
  89. ),
  90. DEFINE_KSPROPERTY_ITEM
  91. (
  92. KSPROPERTY_TUNER_MODE,
  93. TRUE, // GetSupported or Handler
  94. sizeof(KSPROPERTY_TUNER_MODE_S), // MinProperty
  95. sizeof(KSPROPERTY_TUNER_MODE_S), // MinData
  96. TRUE, // SetSupported or Handler
  97. NULL, // Values
  98. 0, // RelationsCount
  99. NULL, // Relations
  100. NULL, // SupportHandler
  101. 0 // SerializedSize
  102. ),
  103. DEFINE_KSPROPERTY_ITEM
  104. (
  105. KSPROPERTY_TUNER_MODE_CAPS,
  106. TRUE, // GetSupported or Handler
  107. sizeof(KSPROPERTY_TUNER_MODE_CAPS_S), // MinProperty
  108. sizeof(KSPROPERTY_TUNER_MODE_CAPS_S), // MinData
  109. FALSE, // SetSupported or Handler
  110. NULL, // Values
  111. 0, // RelationsCount
  112. NULL, // Relations
  113. NULL, // SupportHandler
  114. 0 // SerializedSize
  115. ),
  116. DEFINE_KSPROPERTY_ITEM
  117. (
  118. KSPROPERTY_TUNER_STANDARD,
  119. TRUE, // GetSupported or Handler
  120. sizeof(KSPROPERTY_TUNER_STANDARD_S), // MinProperty
  121. sizeof(KSPROPERTY_TUNER_STANDARD_S), // MinData
  122. FALSE, // SetSupported or Handler
  123. NULL, // Values
  124. 0, // RelationsCount
  125. NULL, // Relations
  126. NULL, // SupportHandler
  127. 0 // SerializedSize
  128. ),
  129. DEFINE_KSPROPERTY_ITEM
  130. (
  131. KSPROPERTY_TUNER_FREQUENCY,
  132. FALSE, // GetSupported or Handler
  133. sizeof(KSPROPERTY_TUNER_FREQUENCY_S), // MinProperty
  134. sizeof(KSPROPERTY_TUNER_FREQUENCY_S), // MinData
  135. TRUE, // SetSupported or Handler
  136. NULL, // Values
  137. 0, // RelationsCount
  138. NULL, // Relations
  139. NULL, // SupportHandler
  140. 0 // SerializedSize
  141. ),
  142. DEFINE_KSPROPERTY_ITEM
  143. (
  144. KSPROPERTY_TUNER_INPUT,
  145. TRUE, // GetSupported or Handler
  146. sizeof(KSPROPERTY_TUNER_INPUT_S), // MinProperty
  147. sizeof(KSPROPERTY_TUNER_INPUT_S), // MinData
  148. TRUE, // SetSupported or Handler
  149. NULL, // Values
  150. 0, // RelationsCount
  151. NULL, // Relations
  152. NULL, // SupportHandler
  153. 0 // SerializedSize
  154. ),
  155. DEFINE_KSPROPERTY_ITEM
  156. (
  157. KSPROPERTY_TUNER_STATUS,
  158. TRUE, // GetSupported or Handler
  159. sizeof(KSPROPERTY_TUNER_STATUS_S), // MinProperty
  160. sizeof(KSPROPERTY_TUNER_STATUS_S), // MinData
  161. FALSE, // SetSupported or Handler
  162. NULL, // Values
  163. 0, // RelationsCount
  164. NULL, // Relations
  165. NULL, // SupportHandler
  166. 0 // SerializedSize
  167. )
  168. };
  169. #endif
  170. // ------------------------------------------------------------------------
  171. // Property set for the TVAudio
  172. // ------------------------------------------------------------------------
  173. DEFINE_KSPROPERTY_TABLE(TVAudioProperties)
  174. {
  175. DEFINE_KSPROPERTY_ITEM
  176. (
  177. KSPROPERTY_TVAUDIO_CAPS,
  178. TRUE, // GetSupported or Handler
  179. sizeof(KSPROPERTY_TVAUDIO_CAPS_S), // MinProperty
  180. sizeof(KSPROPERTY_TVAUDIO_CAPS_S), // MinData
  181. FALSE, // SetSupported or Handler
  182. NULL, // Values
  183. 0, // RelationsCount
  184. NULL, // Relations
  185. NULL, // SupportHandler
  186. 0 // SerializedSize
  187. ),
  188. DEFINE_KSPROPERTY_ITEM
  189. (
  190. KSPROPERTY_TVAUDIO_MODE,
  191. TRUE, // GetSupported or Handler
  192. sizeof(KSPROPERTY_TVAUDIO_S), // MinProperty
  193. sizeof(KSPROPERTY_TVAUDIO_S), // MinData
  194. TRUE, // SetSupported or Handler
  195. NULL, // Values
  196. 0, // RelationsCount
  197. NULL, // Relations
  198. NULL, // SupportHandler
  199. 0 // SerializedSize
  200. ),
  201. DEFINE_KSPROPERTY_ITEM
  202. (
  203. KSPROPERTY_TVAUDIO_CURRENTLY_AVAILABLE_MODES,
  204. TRUE, // GetSupported or Handler
  205. sizeof(KSPROPERTY_TVAUDIO_S), // MinProperty
  206. sizeof(KSPROPERTY_TVAUDIO_S), // MinData
  207. FALSE, // SetSupported or Handler
  208. NULL, // Values
  209. 0, // RelationsCount
  210. NULL, // Relations
  211. NULL, // SupportHandler
  212. 0 // SerializedSize
  213. ),
  214. };
  215. // ------------------------------------------------------------------------
  216. // Property set for VideoProcAmp
  217. // ------------------------------------------------------------------------
  218. //
  219. // First define all of the ranges and stepping values
  220. //
  221. // ------------------------------------------------------------------------
  222. static KSPROPERTY_STEPPING_LONG BrightnessRangeAndStep [] =
  223. {
  224. {
  225. 10000 / 10, // SteppingDelta (range / steps)
  226. 0, // Reserved
  227. {
  228. {
  229. 0, // Minimum in (IRE * 100) units
  230. 10000 // Maximum in (IRE * 100) units
  231. }
  232. }
  233. }
  234. };
  235. static const ULONG BrightnessDefault = 5000;
  236. static KSPROPERTY_MEMBERSLIST BrightnessMembersList [] =
  237. {
  238. {
  239. {
  240. KSPROPERTY_MEMBER_RANGES,
  241. sizeof (BrightnessRangeAndStep),
  242. SIZEOF_ARRAY (BrightnessRangeAndStep),
  243. 0
  244. },
  245. (PVOID) BrightnessRangeAndStep
  246. },
  247. {
  248. {
  249. KSPROPERTY_MEMBER_VALUES,
  250. sizeof( BrightnessDefault ),
  251. sizeof( BrightnessDefault ),
  252. KSPROPERTY_MEMBER_FLAG_DEFAULT
  253. },
  254. (PVOID) &BrightnessDefault
  255. }
  256. };
  257. static KSPROPERTY_VALUES BrightnessValues =
  258. {
  259. {
  260. {
  261. STATICGUIDOF( KSPROPTYPESETID_General ),
  262. VT_I4,
  263. 0
  264. }
  265. },
  266. SIZEOF_ARRAY( BrightnessMembersList ),
  267. BrightnessMembersList
  268. };
  269. // ------------------------------------------------------------------------
  270. static KSPROPERTY_STEPPING_LONG ContrastRangeAndStep [] =
  271. {
  272. {
  273. 10000 / 256, // SteppingDelta (range / steps)
  274. 0, // Reserved
  275. {
  276. {
  277. 0, // Minimum in (gain * 100) units
  278. 10000 // Maximum in (gain * 100) units
  279. }
  280. }
  281. }
  282. };
  283. static const ULONG ContrastDefault = 5000;
  284. static KSPROPERTY_MEMBERSLIST ContrastMembersList [] =
  285. {
  286. {
  287. {
  288. KSPROPERTY_MEMBER_RANGES,
  289. sizeof( ContrastRangeAndStep ),
  290. SIZEOF_ARRAY( ContrastRangeAndStep ),
  291. 0
  292. },
  293. (PVOID) ContrastRangeAndStep
  294. },
  295. {
  296. {
  297. KSPROPERTY_MEMBER_VALUES,
  298. sizeof( ContrastDefault ),
  299. sizeof( ContrastDefault ),
  300. KSPROPERTY_MEMBER_FLAG_DEFAULT
  301. },
  302. (PVOID) &ContrastDefault
  303. }
  304. };
  305. static KSPROPERTY_VALUES ContrastValues =
  306. {
  307. {
  308. {
  309. STATICGUIDOF( KSPROPTYPESETID_General ),
  310. VT_I4,
  311. 0
  312. }
  313. },
  314. SIZEOF_ARRAY( ContrastMembersList ),
  315. ContrastMembersList
  316. };
  317. // ------------------------------------------------------------------------
  318. static KSPROPERTY_STEPPING_LONG HueRangeAndStep [] =
  319. {
  320. {
  321. 10000 / 256, // SteppingDelta (range / steps)
  322. 0, // Reserved
  323. {
  324. {
  325. 0, // Minimum in (gain * 100) units
  326. 10000 // Maximum in (gain * 100) units
  327. }
  328. }
  329. }
  330. };
  331. static const ULONG HueDefault = 5000;
  332. static KSPROPERTY_MEMBERSLIST HueMembersList [] =
  333. {
  334. {
  335. {
  336. KSPROPERTY_MEMBER_RANGES,
  337. sizeof( HueRangeAndStep ),
  338. SIZEOF_ARRAY( HueRangeAndStep ),
  339. 0
  340. },
  341. (PVOID) HueRangeAndStep
  342. },
  343. {
  344. {
  345. KSPROPERTY_MEMBER_VALUES,
  346. sizeof( HueDefault ),
  347. sizeof( HueDefault ),
  348. KSPROPERTY_MEMBER_FLAG_DEFAULT
  349. },
  350. (PVOID) &HueDefault
  351. }
  352. };
  353. static KSPROPERTY_VALUES HueValues =
  354. {
  355. {
  356. {
  357. STATICGUIDOF( KSPROPTYPESETID_General ),
  358. VT_I4,
  359. 0
  360. }
  361. },
  362. SIZEOF_ARRAY( HueMembersList ),
  363. HueMembersList
  364. };
  365. static KSPROPERTY_STEPPING_LONG SaturationRangeAndStep [] =
  366. {
  367. {
  368. 10000 / 256, // SteppingDelta (range / steps)
  369. 0, // Reserved
  370. {
  371. {
  372. 0, // Minimum in (gain * 100) units
  373. 10000 // Maximum in (gain * 100) units
  374. }
  375. }
  376. }
  377. };
  378. static const ULONG SaturationDefault = 5000;
  379. static KSPROPERTY_MEMBERSLIST SaturationMembersList [] =
  380. {
  381. {
  382. {
  383. KSPROPERTY_MEMBER_RANGES,
  384. sizeof( SaturationRangeAndStep ),
  385. SIZEOF_ARRAY( SaturationRangeAndStep ),
  386. 0
  387. },
  388. (PVOID) SaturationRangeAndStep
  389. },
  390. {
  391. {
  392. KSPROPERTY_MEMBER_VALUES,
  393. sizeof( SaturationDefault ),
  394. sizeof( SaturationDefault ),
  395. KSPROPERTY_MEMBER_FLAG_DEFAULT
  396. },
  397. (PVOID) &SaturationDefault
  398. }
  399. };
  400. static KSPROPERTY_VALUES SaturationValues =
  401. {
  402. {
  403. {
  404. STATICGUIDOF( KSPROPTYPESETID_General ),
  405. VT_I4,
  406. 0
  407. }
  408. },
  409. SIZEOF_ARRAY( SaturationMembersList ),
  410. SaturationMembersList
  411. };
  412. // ------------------------------------------------------------------------
  413. DEFINE_KSPROPERTY_TABLE(VideoProcAmpProperties)
  414. {
  415. DEFINE_KSPROPERTY_ITEM
  416. (
  417. KSPROPERTY_VIDEOPROCAMP_CONTRAST,
  418. TRUE, // GetSupported or Handler
  419. sizeof(KSPROPERTY_VIDEOPROCAMP_S), // MinProperty
  420. sizeof(KSPROPERTY_VIDEOPROCAMP_S), // MinData
  421. TRUE, // SetSupported or Handler
  422. &ContrastValues, // Values
  423. 0, // RelationsCount
  424. NULL, // Relations
  425. NULL, // SupportHandler
  426. sizeof(ULONG) // SerializedSize
  427. ),
  428. DEFINE_KSPROPERTY_ITEM
  429. (
  430. KSPROPERTY_VIDEOPROCAMP_BRIGHTNESS,
  431. TRUE, // GetSupported or Handler
  432. sizeof(KSPROPERTY_VIDEOPROCAMP_S), // MinProperty
  433. sizeof(KSPROPERTY_VIDEOPROCAMP_S), // MinData
  434. TRUE, // SetSupported or Handler
  435. &BrightnessValues, // Values
  436. 0, // RelationsCount
  437. NULL, // Relations
  438. NULL, // SupportHandler
  439. sizeof(ULONG) // SerializedSize
  440. ),
  441. DEFINE_KSPROPERTY_ITEM
  442. (
  443. KSPROPERTY_VIDEOPROCAMP_HUE,
  444. TRUE, // GetSupported or Handler
  445. sizeof(KSPROPERTY_VIDEOPROCAMP_S), // MinProperty
  446. sizeof(KSPROPERTY_VIDEOPROCAMP_S), // MinData
  447. TRUE, // SetSupported or Handler
  448. &HueValues, // Values
  449. 0, // RelationsCount
  450. NULL, // Relations
  451. NULL, // SupportHandler
  452. sizeof( ULONG ) // SerializedSize
  453. ),
  454. DEFINE_KSPROPERTY_ITEM
  455. (
  456. KSPROPERTY_VIDEOPROCAMP_SATURATION,
  457. TRUE, // GetSupported or Handler
  458. sizeof(KSPROPERTY_VIDEOPROCAMP_S), // MinProperty
  459. sizeof(KSPROPERTY_VIDEOPROCAMP_S), // MinData
  460. TRUE, // SetSupported or Handler
  461. &SaturationValues, // Values
  462. 0, // RelationsCount
  463. NULL, // Relations
  464. NULL, // SupportHandler
  465. sizeof( ULONG ) // SerializedSize
  466. )
  467. };
  468. // Analog Video Decoder Properties
  469. DEFINE_KSPROPERTY_TABLE( VideoDecProperties )
  470. {
  471. DEFINE_KSPROPERTY_ITEM
  472. (
  473. KSPROPERTY_VIDEODECODER_CAPS,
  474. true, // GetSupported or Handler
  475. sizeof(KSPROPERTY_VIDEODECODER_CAPS_S), // MinProperty
  476. sizeof(KSPROPERTY_VIDEODECODER_CAPS_S), // MinData
  477. false, // SetSupported or Handler
  478. NULL, // Values
  479. 0, // RelationsCount
  480. NULL, // Relations
  481. NULL, // SupportHandler
  482. sizeof( ULONG ) // SerializedSize
  483. ),
  484. DEFINE_KSPROPERTY_ITEM
  485. (
  486. KSPROPERTY_VIDEODECODER_STANDARD,
  487. true, // GetSupported or Handler
  488. sizeof(KSPROPERTY_VIDEODECODER_S), // MinProperty
  489. sizeof(KSPROPERTY_VIDEODECODER_S), // MinData
  490. true, // SetSupported or Handler
  491. NULL, // Values
  492. 0, // RelationsCount
  493. NULL, // Relations
  494. NULL, // SupportHandler
  495. sizeof( ULONG ) // SerializedSize
  496. ),
  497. DEFINE_KSPROPERTY_ITEM
  498. (
  499. KSPROPERTY_VIDEODECODER_STATUS,
  500. true, // GetSupported or Handler
  501. sizeof(KSPROPERTY_VIDEODECODER_STATUS_S), // MinProperty
  502. sizeof(KSPROPERTY_VIDEODECODER_STATUS_S), // MinData
  503. true, // SetSupported or Handler
  504. NULL, // Values
  505. 0, // RelationsCount
  506. NULL, // Relations
  507. NULL, // SupportHandler
  508. sizeof( ULONG ) // SerializedSize
  509. )
  510. };
  511. //
  512. // All of the property sets supported by the adapter
  513. //
  514. DEFINE_KSPROPERTY_SET_TABLE(AdapterPropertyTable)
  515. {
  516. DEFINE_KSPROPERTY_SET
  517. (
  518. &PROPSETID_VIDCAP_CROSSBAR, // Set
  519. SIZEOF_ARRAY(XBarProperties), // PropertiesCount
  520. XBarProperties, // PropertyItem
  521. 0, // FastIoCount
  522. NULL // FastIoTable
  523. ),
  524. DEFINE_KSPROPERTY_SET
  525. (
  526. &PROPSETID_TUNER,
  527. SIZEOF_ARRAY(TVTunerProperties),
  528. TVTunerProperties,
  529. 0,
  530. NULL
  531. ),
  532. DEFINE_KSPROPERTY_SET
  533. (
  534. &PROPSETID_VIDCAP_TVAUDIO,
  535. SIZEOF_ARRAY(TVAudioProperties),
  536. TVAudioProperties,
  537. 0,
  538. NULL
  539. ),
  540. DEFINE_KSPROPERTY_SET
  541. (
  542. &PROPSETID_VIDCAP_VIDEOPROCAMP,
  543. SIZEOF_ARRAY(VideoProcAmpProperties),
  544. VideoProcAmpProperties,
  545. 0,
  546. NULL
  547. ),
  548. DEFINE_KSPROPERTY_SET
  549. (
  550. &PROPSETID_VIDCAP_VIDEODECODER,
  551. SIZEOF_ARRAY(VideoDecProperties),
  552. VideoDecProperties,
  553. 0,
  554. NULL
  555. )
  556. };
  557. #define NUMBER_OF_ADAPTER_PROPERTY_SETS (SIZEOF_ARRAY (AdapterPropertyTable))
  558. VOID AdapterSetProperty(PHW_STREAM_REQUEST_BLOCK pSrb);
  559. VOID AdapterGetProperty(PHW_STREAM_REQUEST_BLOCK pSrb);