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.

1802 lines
54 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) 1992 - 1996 Microsoft Corporation. All Rights Reserved.
  9. //
  10. //==========================================================================;
  11. //
  12. // This file handles all adapter property sets
  13. //
  14. #include "strmini.h"
  15. #include "ksmedia.h"
  16. #include "capmain.h"
  17. #include "capdebug.h"
  18. #ifdef TOSHIBA
  19. #include "bert.h"
  20. #endif//TOSHIBA
  21. #define DEFINE_MEDIUMS
  22. #include "mediums.h"
  23. #ifdef TOSHIBA
  24. ULONG
  25. get_AblFilter (
  26. PHW_DEVICE_EXTENSION pHwDevExt
  27. )
  28. {
  29. return( HW_ReadFilter( pHwDevExt, TRUE ) );
  30. }
  31. ULONG
  32. get_filtering (
  33. PHW_DEVICE_EXTENSION pHwDevExt
  34. )
  35. {
  36. return( HW_ReadFilter( pHwDevExt, FALSE ) );
  37. }
  38. VOID
  39. set_filtering (
  40. PHW_DEVICE_EXTENSION pHwDevExt, BOOL bFlag
  41. )
  42. {
  43. HW_SetFilter( pHwDevExt, bFlag );
  44. }
  45. #endif//TOSHIBA
  46. // -------------------------------------------------------------------
  47. // A few notes about property set handling
  48. //
  49. // Property sets used in TsbVcap are of two varieties, those that have
  50. // default values, ranges, and stepping, such as VideoProcAmp and CameraControl,
  51. // and those which don't have defaults and ranges, such as TVTuner and
  52. // Crossbar.
  53. //
  54. // Default values and stepping are established by tables in capprop.h,
  55. // no code is required to implement this other than initally creating the tables.
  56. //
  57. // Many of the property sets require the ability to modify a number
  58. // of input parameters. Since KS doesn't allow this inherently, you'll
  59. // note that some property sets require copying the provided input parameters
  60. // to the ouput parameter list, effectively creating a "read, modify, write"
  61. // capability. For this reason, the input and output parameter lists
  62. // use identical structures.
  63. //
  64. // On an SRB_GET_DEVICE_PROPERTY, read-only input data to the driver is provided as:
  65. // pSrb->CommandData.PropertyInfo
  66. //
  67. // ... while the output data pointer is:
  68. // pSrb->CommandData.PropertyInfo.PropertyInfo
  69. //
  70. // -------------------------------------------------------------------
  71. #ifndef TOSHIBA
  72. // -------------------------------------------------------------------
  73. // XBar pin definitions
  74. // -------------------------------------------------------------------
  75. typedef struct _XBAR_PIN_DESCRIPTION {
  76. ULONG PinType;
  77. ULONG SynthImageCommand; // This driver simulates different inputs by synthesizing images
  78. ULONG RelatedPinIndex;
  79. const KSPIN_MEDIUM *Medium; // Describes hardware connectivity
  80. } XBAR_PIN_DESCRIPTION, *PXBAR_PIN_DESCRIPTION;
  81. XBAR_PIN_DESCRIPTION XBarInputPins[] = {
  82. // First list the video input pins, then the audio inputs, then the output pins
  83. // Note that audio pin index 6 is shared between two video inputs (index 1 and index 2)
  84. // PinType SynthImageCommand RelatedPinIndex Medium
  85. /*0*/ KS_PhysConn_Video_Tuner, IMAGE_XFER_NTSC_EIA_100AMP_100SAT, 5, &CrossbarMediums[0],
  86. /*1*/ KS_PhysConn_Video_Composite, IMAGE_XFER_NTSC_EIA_75AMP_100SAT, 6, &CrossbarMediums[1],
  87. /*2*/ KS_PhysConn_Video_SVideo, IMAGE_XFER_BLACK, 6, &CrossbarMediums[2],
  88. /*3*/ KS_PhysConn_Video_Tuner, IMAGE_XFER_WHITE, 7, &CrossbarMediums[3],
  89. /*4*/ KS_PhysConn_Video_Composite, IMAGE_XFER_GRAY_INCREASING, 8, &CrossbarMediums[4],
  90. /*5*/ KS_PhysConn_Audio_Tuner, 0, 0, &CrossbarMediums[5],
  91. /*6*/ KS_PhysConn_Audio_Line, 0, 1, &CrossbarMediums[6],
  92. /*7*/ KS_PhysConn_Audio_Tuner, 0, 3, &CrossbarMediums[7],
  93. /*8*/ KS_PhysConn_Audio_Line, 0, 4, &CrossbarMediums[8],
  94. };
  95. #define NUMBER_OF_XBAR_INPUTS (SIZEOF_ARRAY (XBarInputPins))
  96. XBAR_PIN_DESCRIPTION XBarOutputPins[] = {
  97. // PinType SynthImageCommand RelatedPinIndex
  98. /*0*/ KS_PhysConn_Video_VideoDecoder, 0, 1, &CrossbarMediums[9],
  99. /*1*/ KS_PhysConn_Audio_AudioDecoder, 0, 0, &CrossbarMediums[10],
  100. };
  101. #define NUMBER_OF_XBAR_OUTPUTS (SIZEOF_ARRAY (XBarOutputPins))
  102. #define NUMBER_OF_XBAR_PINS_TOTAL (NUMBER_OF_XBAR_INPUTS + NUMBER_OF_XBAR_OUTPUTS)
  103. // -------------------------------------------------------------------
  104. // XBar Property Set functions
  105. // -------------------------------------------------------------------
  106. /*
  107. ** AdapterSetCrossbarProperty ()
  108. **
  109. ** Handles Set operations on the Crossbar property set.
  110. ** TsbVcap uses this to select an image to synthesize.
  111. **
  112. ** Arguments:
  113. **
  114. ** pSRB -
  115. ** Pointer to the HW_STREAM_REQUEST_BLOCK
  116. **
  117. ** Returns:
  118. **
  119. ** Side Effects: none
  120. */
  121. VOID
  122. STREAMAPI
  123. AdapterSetCrossbarProperty(
  124. PHW_STREAM_REQUEST_BLOCK pSrb
  125. )
  126. {
  127. PHW_DEVICE_EXTENSION pHwDevExt = ((PHW_DEVICE_EXTENSION)pSrb->HwDeviceExtension);
  128. PSTREAM_PROPERTY_DESCRIPTOR pSPD = pSrb->CommandData.PropertyInfo;
  129. ULONG Id = pSPD->Property->Id; // index of the property
  130. ULONG nS = pSPD->PropertyOutputSize; // size of data supplied
  131. switch (Id) {
  132. case KSPROPERTY_CROSSBAR_ROUTE: // W
  133. {
  134. PKSPROPERTY_CROSSBAR_ROUTE_S pRoute =
  135. (PKSPROPERTY_CROSSBAR_ROUTE_S)pSPD->PropertyInfo;
  136. ASSERT (nS >= sizeof (KSPROPERTY_CROSSBAR_ROUTE_S));
  137. // Copy the input property info to the output property info
  138. RtlCopyMemory( pRoute,
  139. pSPD->Property,
  140. sizeof (KSPROPERTY_CROSSBAR_ROUTE_S));
  141. // Default to failure
  142. pRoute->CanRoute = 0;
  143. // if video
  144. if (pRoute->IndexOutputPin == 0) {
  145. if (pRoute->IndexInputPin <= 4) {
  146. pHwDevExt->VideoInputConnected = pRoute->IndexInputPin;
  147. pRoute->CanRoute = 1;
  148. }
  149. }
  150. // if audio
  151. else if (pRoute->IndexOutputPin == 1) {
  152. // Special case! Audio Routing of (-1) means mute!!!
  153. if (pRoute->IndexInputPin == -1) {
  154. pHwDevExt->AudioInputConnected = pRoute->IndexInputPin;
  155. pRoute->CanRoute = 1;
  156. }
  157. else if (pRoute->IndexInputPin > 4 && pRoute->IndexInputPin <= 8) {
  158. pHwDevExt->AudioInputConnected = pRoute->IndexInputPin;
  159. pRoute->CanRoute = 1;
  160. }
  161. }
  162. // Somebody passed bogus data
  163. if (pRoute->CanRoute == 0) {
  164. pSrb->Status = STATUS_INVALID_PARAMETER;
  165. }
  166. }
  167. break;
  168. default:
  169. TRAP
  170. break;
  171. }
  172. }
  173. /*
  174. ** AdapterGetCrossbarProperty ()
  175. **
  176. ** Handles Get operations on the Crossbar property set.
  177. ** TsbVcap uses this to select an image to synthesize.
  178. **
  179. ** Arguments:
  180. **
  181. ** pSRB -
  182. ** Pointer to the HW_STREAM_REQUEST_BLOCK
  183. **
  184. ** Returns:
  185. **
  186. ** Side Effects: none
  187. */
  188. VOID
  189. STREAMAPI
  190. AdapterGetCrossbarProperty(
  191. PHW_STREAM_REQUEST_BLOCK pSrb
  192. )
  193. {
  194. PHW_DEVICE_EXTENSION pHwDevExt = ((PHW_DEVICE_EXTENSION)pSrb->HwDeviceExtension);
  195. PSTREAM_PROPERTY_DESCRIPTOR pSPD = pSrb->CommandData.PropertyInfo;
  196. ULONG Id = pSPD->Property->Id; // index of the property
  197. ULONG nS = pSPD->PropertyOutputSize; // size of data supplied
  198. switch (Id) {
  199. case KSPROPERTY_CROSSBAR_CAPS: // R
  200. {
  201. PKSPROPERTY_CROSSBAR_CAPS_S pCaps =
  202. (PKSPROPERTY_CROSSBAR_CAPS_S)pSPD->PropertyInfo;
  203. if (nS < sizeof (KSPROPERTY_CROSSBAR_CAPS_S))
  204. break;
  205. // Copy the input property info to the output property info
  206. RtlCopyMemory( pCaps,
  207. pSPD->Property,
  208. sizeof (KSPROPERTY_CROSSBAR_CAPS_S));
  209. pCaps->NumberOfInputs = NUMBER_OF_XBAR_INPUTS;
  210. pCaps->NumberOfOutputs = NUMBER_OF_XBAR_OUTPUTS;
  211. pSrb->ActualBytesTransferred = sizeof (KSPROPERTY_CROSSBAR_CAPS_S);
  212. }
  213. break;
  214. case KSPROPERTY_CROSSBAR_CAN_ROUTE: // R
  215. {
  216. PKSPROPERTY_CROSSBAR_ROUTE_S pRoute =
  217. (PKSPROPERTY_CROSSBAR_ROUTE_S)pSPD->PropertyInfo;
  218. if (nS < sizeof (KSPROPERTY_CROSSBAR_ROUTE_S))
  219. break;
  220. // Copy the input property info to the output property info
  221. RtlCopyMemory( pRoute,
  222. pSPD->Property,
  223. sizeof (KSPROPERTY_CROSSBAR_ROUTE_S));
  224. // Special case, audio output routed to (-1) means mute
  225. if (pRoute->IndexOutputPin == 1 && pRoute->IndexInputPin == -1) {
  226. pRoute->CanRoute = TRUE;
  227. }
  228. else if ((pRoute->IndexInputPin >= NUMBER_OF_XBAR_INPUTS) ||
  229. (pRoute->IndexOutputPin >= NUMBER_OF_XBAR_OUTPUTS)) {
  230. pRoute->CanRoute = FALSE;
  231. }
  232. else if ((pRoute->IndexInputPin <= 4) &&
  233. (pRoute->IndexOutputPin == 0) ||
  234. (pRoute->IndexInputPin >= 5) &&
  235. (pRoute->IndexOutputPin == 1)) {
  236. // This driver allows any video input to connect to any video output
  237. // and any audio input to connect to any audio output
  238. pRoute->CanRoute = TRUE;
  239. }
  240. else {
  241. pRoute->CanRoute = FALSE;
  242. }
  243. pSrb->ActualBytesTransferred = sizeof (KSPROPERTY_CROSSBAR_ROUTE_S);
  244. }
  245. break;
  246. case KSPROPERTY_CROSSBAR_PININFO: // R
  247. {
  248. PKSPROPERTY_CROSSBAR_PININFO_S pPinInfo =
  249. (PKSPROPERTY_CROSSBAR_PININFO_S)pSPD->PropertyInfo;
  250. if (nS < sizeof (KSPROPERTY_CROSSBAR_PININFO_S))
  251. break;
  252. // Copy the input property info to the output property info
  253. RtlCopyMemory( pPinInfo,
  254. pSPD->Property,
  255. sizeof (KSPROPERTY_CROSSBAR_PININFO_S));
  256. if (pPinInfo->Direction == KSPIN_DATAFLOW_IN) {
  257. ASSERT (pPinInfo->Index < NUMBER_OF_XBAR_INPUTS);
  258. pPinInfo->PinType = XBarInputPins[pPinInfo->Index].PinType;
  259. pPinInfo->RelatedPinIndex = XBarInputPins[pPinInfo->Index].RelatedPinIndex;
  260. pPinInfo->Medium = *XBarInputPins[pPinInfo->Index].Medium;
  261. }
  262. else {
  263. ASSERT (pPinInfo->Index < NUMBER_OF_XBAR_OUTPUTS);
  264. pPinInfo->PinType = XBarOutputPins[pPinInfo->Index].PinType;
  265. pPinInfo->RelatedPinIndex = XBarOutputPins[pPinInfo->Index].RelatedPinIndex;
  266. pPinInfo->Medium = *XBarOutputPins[pPinInfo->Index].Medium;
  267. }
  268. pPinInfo->Medium.Id = 0; // (ULONG) pHwDevExt; // Multiple instance support
  269. pSrb->ActualBytesTransferred = sizeof (KSPROPERTY_CROSSBAR_PININFO_S);
  270. }
  271. break;
  272. case KSPROPERTY_CROSSBAR_ROUTE: // R
  273. {
  274. PKSPROPERTY_CROSSBAR_ROUTE_S pRoute =
  275. (PKSPROPERTY_CROSSBAR_ROUTE_S)pSPD->PropertyInfo;
  276. if (nS < sizeof (KSPROPERTY_CROSSBAR_ROUTE_S))
  277. break;
  278. // Copy the input property info to the output property info
  279. RtlCopyMemory( pRoute,
  280. pSPD->Property,
  281. sizeof (KSPROPERTY_CROSSBAR_ROUTE_S));
  282. // Sanity check
  283. if (pRoute->IndexOutputPin >= NUMBER_OF_XBAR_OUTPUTS) {
  284. pRoute->CanRoute = FALSE;
  285. }
  286. // querying the the video output pin
  287. else if (pRoute->IndexOutputPin == 0) {
  288. pRoute->IndexInputPin = pHwDevExt->VideoInputConnected;
  289. pRoute->CanRoute = TRUE;
  290. }
  291. // querying the the audio output pin
  292. else if (pRoute->IndexOutputPin == 1) {
  293. pRoute->IndexInputPin = pHwDevExt->AudioInputConnected;
  294. pRoute->CanRoute = TRUE;
  295. }
  296. pSrb->ActualBytesTransferred = sizeof (KSPROPERTY_CROSSBAR_ROUTE_S);
  297. }
  298. break;
  299. default:
  300. TRAP
  301. break;
  302. }
  303. }
  304. // -------------------------------------------------------------------
  305. // TVTuner Property Set functions
  306. // -------------------------------------------------------------------
  307. /*
  308. ** AdapterSetTunerProperty ()
  309. **
  310. ** Handles Set operations on the TvTuner property set.
  311. ** TsbVcap uses this for demo purposes only.
  312. **
  313. ** Arguments:
  314. **
  315. ** pSRB -
  316. ** Pointer to the HW_STREAM_REQUEST_BLOCK
  317. **
  318. ** Returns:
  319. **
  320. ** Side Effects: none
  321. */
  322. VOID
  323. STREAMAPI
  324. AdapterSetTunerProperty(
  325. PHW_STREAM_REQUEST_BLOCK pSrb
  326. )
  327. {
  328. PHW_DEVICE_EXTENSION pHwDevExt = ((PHW_DEVICE_EXTENSION)pSrb->HwDeviceExtension);
  329. PSTREAM_PROPERTY_DESCRIPTOR pSPD = pSrb->CommandData.PropertyInfo;
  330. ULONG Id = pSPD->Property->Id; // index of the property
  331. ULONG nS = pSPD->PropertyOutputSize; // size of data supplied
  332. switch (Id) {
  333. case KSPROPERTY_TUNER_MODE:
  334. {
  335. PKSPROPERTY_TUNER_MODE_S pMode =
  336. (PKSPROPERTY_TUNER_MODE_S)pSPD->Property;
  337. ASSERT (pMode->Mode == KSPROPERTY_TUNER_MODE_TV);
  338. }
  339. break;
  340. case KSPROPERTY_TUNER_STANDARD:
  341. {
  342. PKSPROPERTY_TUNER_STANDARD_S pStandard_S =
  343. (PKSPROPERTY_TUNER_STANDARD_S) pSPD->Property;
  344. pHwDevExt->VideoStandard = pStandard_S->Standard;
  345. }
  346. break;
  347. case KSPROPERTY_TUNER_FREQUENCY:
  348. {
  349. PKSPROPERTY_TUNER_FREQUENCY_S pFreq_S =
  350. (PKSPROPERTY_TUNER_FREQUENCY_S) pSPD->Property;
  351. pHwDevExt->Frequency = pFreq_S->Frequency;
  352. }
  353. break;
  354. case KSPROPERTY_TUNER_INPUT:
  355. {
  356. PKSPROPERTY_TUNER_INPUT_S pInput_S =
  357. (PKSPROPERTY_TUNER_INPUT_S) pSPD->Property;
  358. pHwDevExt->TunerInput = pInput_S->InputIndex;
  359. }
  360. break;
  361. default:
  362. TRAP
  363. break;
  364. }
  365. }
  366. /*
  367. ** AdapterGetTunerProperty ()
  368. **
  369. ** Handles Get operations on the TvTuner property set.
  370. ** TsbVcap uses this for demo purposes only.
  371. **
  372. ** Arguments:
  373. **
  374. ** pSRB -
  375. ** Pointer to the HW_STREAM_REQUEST_BLOCK
  376. **
  377. ** Returns:
  378. **
  379. ** Side Effects: none
  380. */
  381. VOID
  382. STREAMAPI
  383. AdapterGetTunerProperty(
  384. PHW_STREAM_REQUEST_BLOCK pSrb
  385. )
  386. {
  387. PHW_DEVICE_EXTENSION pHwDevExt = ((PHW_DEVICE_EXTENSION)pSrb->HwDeviceExtension);
  388. PSTREAM_PROPERTY_DESCRIPTOR pSPD = pSrb->CommandData.PropertyInfo;
  389. ULONG Id = pSPD->Property->Id; // index of the property
  390. ULONG nS = pSPD->PropertyOutputSize; // size of data supplied
  391. PVOID pV = pSPD->PropertyInfo; // pointer to the output data
  392. ASSERT (nS >= sizeof (LONG));
  393. switch (Id) {
  394. case KSPROPERTY_TUNER_CAPS:
  395. {
  396. PKSPROPERTY_TUNER_CAPS_S pCaps =
  397. (PKSPROPERTY_TUNER_CAPS_S)pSPD->Property;
  398. ASSERT (nS >= sizeof( KSPROPERTY_TUNER_CAPS_S ) );
  399. // now work with the output buffer
  400. pCaps =(PKSPROPERTY_TUNER_CAPS_S)pV;
  401. pCaps->ModesSupported = KSPROPERTY_TUNER_MODE_TV;
  402. pCaps->VideoMedium = TVTunerMediums[0];
  403. pCaps->VideoMedium.Id = 0; //(ULONG) pHwDevExt; // Multiple instance support
  404. pCaps->TVAudioMedium = TVTunerMediums[1];
  405. pCaps->TVAudioMedium.Id = 0; //(ULONG) pHwDevExt; // Multiple instance support
  406. pCaps->RadioAudioMedium = TVTunerMediums[2]; // No separate radio audio pin?
  407. pCaps->RadioAudioMedium.Id = 0; //(ULONG) pHwDevExt; // Multiple instance support
  408. pSrb->ActualBytesTransferred = sizeof( KSPROPERTY_TUNER_CAPS_S );
  409. }
  410. break;
  411. case KSPROPERTY_TUNER_MODE:
  412. {
  413. PKSPROPERTY_TUNER_MODE_S pMode =
  414. (PKSPROPERTY_TUNER_MODE_S)pSPD->Property;
  415. ASSERT (nS >= sizeof( KSPROPERTY_TUNER_MODE_S ) );
  416. // now work with the output buffer
  417. pMode =(PKSPROPERTY_TUNER_MODE_S)pV;
  418. pMode->Mode = KSPROPERTY_TUNER_MODE_TV;
  419. pSrb->ActualBytesTransferred = sizeof( KSPROPERTY_TUNER_MODE_S);
  420. }
  421. break;
  422. case KSPROPERTY_TUNER_MODE_CAPS:
  423. {
  424. PKSPROPERTY_TUNER_MODE_CAPS_S pCaps =
  425. (PKSPROPERTY_TUNER_MODE_CAPS_S) pSPD->Property;
  426. ASSERT (nS >= sizeof (KSPROPERTY_TUNER_MODE_CAPS_S));
  427. ASSERT (pCaps->Mode == KSPROPERTY_TUNER_MODE_TV);
  428. // now work with the output buffer
  429. pCaps = (PKSPROPERTY_TUNER_MODE_CAPS_S) pV;
  430. //
  431. // List the formats actually supported by this tuner
  432. //
  433. pCaps->StandardsSupported =
  434. KS_AnalogVideo_NTSC_M
  435. | KS_AnalogVideo_PAL_B
  436. | KS_AnalogVideo_PAL_D
  437. // | KS_AnalogVideo_PAL_H
  438. // | KS_AnalogVideo_PAL_I
  439. | KS_AnalogVideo_PAL_M
  440. | KS_AnalogVideo_PAL_N
  441. // | KS_AnalogVideo_SECAM_B
  442. // | KS_AnalogVideo_SECAM_D
  443. // | KS_AnalogVideo_SECAM_G
  444. // | KS_AnalogVideo_SECAM_H
  445. // | KS_AnalogVideo_SECAM_K
  446. // | KS_AnalogVideo_SECAM_K1
  447. // | KS_AnalogVideo_SECAM_L
  448. ;
  449. //
  450. // Get the min and max frequencies supported
  451. //
  452. pCaps->MinFrequency = 55250000L;
  453. pCaps->MaxFrequency = 997250000L;
  454. //
  455. // What is the frequency step size?
  456. //
  457. pCaps->TuningGranularity = 62500L;
  458. //
  459. // How many inputs are on the tuner?
  460. //
  461. pCaps->NumberOfInputs = 1;
  462. //
  463. // What is the maximum settling time in milliseconds?
  464. //
  465. pCaps->SettlingTime = 100;
  466. //
  467. // Strategy defines how the tuner knows when it is in tune:
  468. //
  469. // KS_TUNER_STRATEGY_PLL (Has PLL offset information)
  470. // KS_TUNER_STRATEGY_SIGNAL_STRENGTH (has signal strength info)
  471. // KS_TUNER_STRATEGY_DRIVER_TUNES (driver handles all fine tuning)
  472. //
  473. pCaps->Strategy = KS_TUNER_STRATEGY_DRIVER_TUNES;
  474. pSrb->ActualBytesTransferred = sizeof (KSPROPERTY_TUNER_MODE_CAPS_S);
  475. }
  476. break;
  477. case KSPROPERTY_TUNER_STANDARD:
  478. {
  479. // What is the currently selected video standard?
  480. ((PKSPROPERTY_TUNER_STANDARD_S) pSPD->PropertyInfo)->Standard =
  481. pHwDevExt->VideoStandard;
  482. pSrb->ActualBytesTransferred = sizeof (KSPROPERTY_TUNER_STANDARD_S);
  483. }
  484. break;
  485. case KSPROPERTY_TUNER_INPUT:
  486. {
  487. // What is the currently selected input?
  488. ((PKSPROPERTY_TUNER_INPUT_S) pSPD->PropertyInfo)->InputIndex =
  489. pHwDevExt->TunerInput;
  490. pSrb->ActualBytesTransferred = sizeof (PKSPROPERTY_TUNER_INPUT_S);
  491. }
  492. break;
  493. case KSPROPERTY_TUNER_STATUS:
  494. // Return the status of the tuner
  495. // PLLOffset is in units of TuningGranularity
  496. // SignalStrength is 0 to 100
  497. // Set Busy to 1 if tuning is still in process
  498. {
  499. PKSPROPERTY_TUNER_STATUS_S pStatus =
  500. (PKSPROPERTY_TUNER_STATUS_S) pSPD->PropertyInfo;
  501. ASSERT (nS >= sizeof (KSPROPERTY_TUNER_STATUS_S));
  502. pStatus->CurrentFrequency = pHwDevExt->Frequency;
  503. pStatus->PLLOffset = 0;
  504. pStatus->SignalStrength = 100;
  505. pStatus->Busy = pHwDevExt->Busy;
  506. pSrb->ActualBytesTransferred = sizeof (KSPROPERTY_TUNER_STATUS_S);
  507. }
  508. break;
  509. default:
  510. TRAP
  511. break;
  512. }
  513. }
  514. #endif//TOSHIBA
  515. // -------------------------------------------------------------------
  516. // VideoProcAmp functions
  517. // -------------------------------------------------------------------
  518. /*
  519. ** AdapterSetVideoProcAmpProperty ()
  520. **
  521. ** Handles Set operations on the VideoProcAmp property set.
  522. ** TsbVcap uses this for demo purposes only.
  523. **
  524. ** Arguments:
  525. **
  526. ** pSRB -
  527. ** Pointer to the HW_STREAM_REQUEST_BLOCK
  528. **
  529. ** Returns:
  530. **
  531. ** Side Effects: none
  532. */
  533. VOID
  534. STREAMAPI
  535. AdapterSetVideoProcAmpProperty(
  536. PHW_STREAM_REQUEST_BLOCK pSrb
  537. )
  538. {
  539. PHW_DEVICE_EXTENSION pHwDevExt = ((PHW_DEVICE_EXTENSION)pSrb->HwDeviceExtension);
  540. PSTREAM_PROPERTY_DESCRIPTOR pSPD = pSrb->CommandData.PropertyInfo;
  541. ULONG Id = pSPD->Property->Id; // index of the property
  542. PKSPROPERTY_VIDEOPROCAMP_S pS = (PKSPROPERTY_VIDEOPROCAMP_S) pSPD->PropertyInfo;
  543. #ifdef TOSHIBA // '98-12-09 Added, for Bug-Report 253529
  544. LONG MaxRange;
  545. LONG MinRange;
  546. #endif//TOSHIBA
  547. ASSERT (pSPD->PropertyInputSize >= sizeof (KSPROPERTY_VIDEOPROCAMP_S));
  548. switch (Id) {
  549. case KSPROPERTY_VIDEOPROCAMP_BRIGHTNESS:
  550. #ifdef TOSHIBA // '98-12-09 Modified, for Bug-Report 253529
  551. MaxRange = pHwDevExt->BrightnessRange.SignedMaximum;
  552. MinRange = pHwDevExt->BrightnessRange.SignedMinimum;
  553. if ( pS->Value < MinRange || pS->Value > MaxRange ) {
  554. pSrb->Status = STATUS_INVALID_PARAMETER;
  555. return;
  556. }
  557. #endif//TOSHIBA
  558. pHwDevExt->Brightness = pS->Value;
  559. pHwDevExt->BrightnessFlags = pS->Flags;
  560. break;
  561. case KSPROPERTY_VIDEOPROCAMP_CONTRAST:
  562. #ifdef TOSHIBA // '98-12-09 Modified, for Bug-Report 253529
  563. MaxRange = pHwDevExt->ContrastRange.SignedMaximum;
  564. MinRange = pHwDevExt->ContrastRange.SignedMinimum;
  565. if ( pS->Value < MinRange || pS->Value > MaxRange ) {
  566. pSrb->Status = STATUS_INVALID_PARAMETER;
  567. return;
  568. }
  569. #endif//TOSHIBA
  570. pHwDevExt->Contrast = pS->Value;
  571. pHwDevExt->ContrastFlags = pS->Flags;
  572. break;
  573. #ifdef TOSHIBA
  574. case KSPROPERTY_VIDEOPROCAMP_HUE:
  575. #ifdef TOSHIBA // '98-12-09 Modified, for Bug-Report 253529
  576. MaxRange = pHwDevExt->HueRange.SignedMaximum;
  577. MinRange = pHwDevExt->HueRange.SignedMinimum;
  578. if ( pS->Value < MinRange || pS->Value > MaxRange ) {
  579. pSrb->Status = STATUS_INVALID_PARAMETER;
  580. return;
  581. }
  582. #endif//TOSHIBA
  583. pHwDevExt->Hue = pS->Value;
  584. pHwDevExt->HueFlags = pS->Flags;
  585. break;
  586. case KSPROPERTY_VIDEOPROCAMP_SATURATION:
  587. #ifdef TOSHIBA // '98-12-09 Modified, for Bug-Report 253529
  588. MaxRange = pHwDevExt->SaturationRange.SignedMaximum;
  589. MinRange = pHwDevExt->SaturationRange.SignedMinimum;
  590. if ( pS->Value < MinRange || pS->Value > MaxRange ) {
  591. pSrb->Status = STATUS_INVALID_PARAMETER;
  592. return;
  593. }
  594. #endif//TOSHIBA
  595. pHwDevExt->Saturation = pS->Value;
  596. pHwDevExt->SaturationFlags = pS->Flags;
  597. break;
  598. case KSPROPERTY_VIDEOPROCAMP_COLORENABLE:
  599. pHwDevExt->ColorEnable = pS->Value;
  600. pHwDevExt->ColorEnableFlags = pS->Flags;
  601. if ( pS->Value ) {
  602. if ( get_AblFilter( pHwDevExt ) ) {
  603. set_filtering( pHwDevExt, TRUE );
  604. } else {
  605. set_filtering( pHwDevExt, FALSE );
  606. pHwDevExt->ColorEnable = 0;
  607. }
  608. } else {
  609. set_filtering( pHwDevExt, FALSE );
  610. }
  611. return;
  612. #else //TOSHIBA
  613. case KSPROPERTY_VIDEOPROCAMP_COLORENABLE:
  614. pHwDevExt->ColorEnable = pS->Value;
  615. pHwDevExt->ColorEnableFlags = pS->Flags;
  616. break;
  617. #endif//TOSHIBA
  618. #ifdef TOSHIBA
  619. default:
  620. return;
  621. }
  622. ImageSetHueBrightnessContrastSat(pHwDevExt);
  623. #else //TOSHIBA
  624. default:
  625. break;
  626. }
  627. #endif//TOSHIBA
  628. }
  629. /*
  630. ** AdapterGetVideoProcAmpProperty ()
  631. **
  632. ** Handles Get operations on the VideoProcAmp property set.
  633. ** TsbVcap uses this for demo purposes only.
  634. **
  635. ** Arguments:
  636. **
  637. ** pSRB -
  638. ** Pointer to the HW_STREAM_REQUEST_BLOCK
  639. **
  640. ** Returns:
  641. **
  642. ** Side Effects: none
  643. */
  644. VOID
  645. STREAMAPI
  646. AdapterGetVideoProcAmpProperty(
  647. PHW_STREAM_REQUEST_BLOCK pSrb
  648. )
  649. {
  650. PHW_DEVICE_EXTENSION pHwDevExt = ((PHW_DEVICE_EXTENSION)pSrb->HwDeviceExtension);
  651. PSTREAM_PROPERTY_DESCRIPTOR pSPD = pSrb->CommandData.PropertyInfo;
  652. ULONG Id = pSPD->Property->Id; // index of the property
  653. PKSPROPERTY_VIDEOPROCAMP_S pS = (PKSPROPERTY_VIDEOPROCAMP_S) pSPD->PropertyInfo;
  654. ASSERT (pSPD->PropertyOutputSize >= sizeof (KSPROPERTY_VIDEOPROCAMP_S));
  655. switch (Id) {
  656. #ifdef TOSHIBA
  657. case KSPROPERTY_VIDEOPROCAMP_BRIGHTNESS:
  658. pS->Value = pHwDevExt->Brightness;
  659. pS->Flags = pHwDevExt->BrightnessFlags;
  660. pS->Capabilities = KSPROPERTY_VIDEOPROCAMP_FLAGS_MANUAL;
  661. break;
  662. case KSPROPERTY_VIDEOPROCAMP_CONTRAST:
  663. pS->Value = pHwDevExt->Contrast;
  664. pS->Flags = pHwDevExt->ContrastFlags;
  665. pS->Capabilities = KSPROPERTY_VIDEOPROCAMP_FLAGS_MANUAL;
  666. break;
  667. case KSPROPERTY_VIDEOPROCAMP_HUE:
  668. pS->Value = pHwDevExt->Hue;
  669. pS->Flags = pHwDevExt->HueFlags;
  670. pS->Capabilities = KSPROPERTY_VIDEOPROCAMP_FLAGS_MANUAL;
  671. break;
  672. case KSPROPERTY_VIDEOPROCAMP_SATURATION:
  673. pS->Value = pHwDevExt->Saturation;
  674. pS->Flags = pHwDevExt->SaturationFlags;
  675. pS->Capabilities = KSPROPERTY_VIDEOPROCAMP_FLAGS_MANUAL;
  676. break;
  677. case KSPROPERTY_VIDEOPROCAMP_COLORENABLE:
  678. if ( get_AblFilter( pHwDevExt ) ) {
  679. if ( get_filtering( pHwDevExt ) ) {
  680. pHwDevExt->ColorEnable = 1;
  681. } else {
  682. pHwDevExt->ColorEnable = 0;
  683. }
  684. pHwDevExt->ColorEnableFlags = KSPROPERTY_VIDEOPROCAMP_FLAGS_MANUAL;
  685. pS->Value = pHwDevExt->ColorEnable;
  686. pS->Flags = pHwDevExt->ColorEnableFlags;
  687. pS->Capabilities = KSPROPERTY_VIDEOPROCAMP_FLAGS_MANUAL;
  688. } else {
  689. if ( pHwDevExt->ColorEnable ) {
  690. set_filtering( pHwDevExt, FALSE );
  691. pHwDevExt->ColorEnable = 0;
  692. }
  693. pHwDevExt->ColorEnableFlags = KSPROPERTY_VIDEOPROCAMP_FLAGS_AUTO;
  694. pS->Value = pHwDevExt->ColorEnable;
  695. pS->Flags = pHwDevExt->ColorEnableFlags;
  696. pS->Capabilities = KSPROPERTY_VIDEOPROCAMP_FLAGS_AUTO;
  697. }
  698. break;
  699. #else //TOSHIBA
  700. case KSPROPERTY_VIDEOPROCAMP_BRIGHTNESS:
  701. pS->Value = pHwDevExt->Brightness;
  702. pS->Flags = pHwDevExt->BrightnessFlags;
  703. pS->Capabilities = KSPROPERTY_VIDEOPROCAMP_FLAGS_MANUAL |
  704. KSPROPERTY_VIDEOPROCAMP_FLAGS_AUTO;
  705. break;
  706. case KSPROPERTY_VIDEOPROCAMP_CONTRAST:
  707. pS->Value = pHwDevExt->Contrast;
  708. pS->Flags = pHwDevExt->ContrastFlags;
  709. pS->Capabilities = KSPROPERTY_VIDEOPROCAMP_FLAGS_MANUAL |
  710. KSPROPERTY_VIDEOPROCAMP_FLAGS_AUTO;
  711. break;
  712. case KSPROPERTY_VIDEOPROCAMP_COLORENABLE:
  713. pS->Value = pHwDevExt->ColorEnable;
  714. pS->Flags = pHwDevExt->ColorEnableFlags;
  715. pS->Capabilities = KSPROPERTY_VIDEOPROCAMP_FLAGS_MANUAL;
  716. break;
  717. #endif//TOSHIBA
  718. default:
  719. break;
  720. }
  721. pSrb->ActualBytesTransferred = sizeof (KSPROPERTY_VIDEOPROCAMP_S);
  722. }
  723. #ifndef TOSHIBA
  724. // -------------------------------------------------------------------
  725. // CameraControl functions
  726. // -------------------------------------------------------------------
  727. /*
  728. ** AdapterSetCameraControlProperty ()
  729. **
  730. ** Handles Set operations on the CameraControl property set.
  731. ** TsbVcap uses this for demo purposes only.
  732. **
  733. ** Arguments:
  734. **
  735. ** pSRB -
  736. ** Pointer to the HW_STREAM_REQUEST_BLOCK
  737. **
  738. ** Returns:
  739. **
  740. ** Side Effects: none
  741. */
  742. VOID
  743. STREAMAPI
  744. AdapterSetCameraControlProperty(
  745. PHW_STREAM_REQUEST_BLOCK pSrb
  746. )
  747. {
  748. PHW_DEVICE_EXTENSION pHwDevExt = ((PHW_DEVICE_EXTENSION)pSrb->HwDeviceExtension);
  749. PSTREAM_PROPERTY_DESCRIPTOR pSPD = pSrb->CommandData.PropertyInfo;
  750. ULONG Id = pSPD->Property->Id; // index of the property
  751. PKSPROPERTY_CAMERACONTROL_S pS = (PKSPROPERTY_CAMERACONTROL_S) pSPD->PropertyInfo;
  752. ASSERT (pSPD->PropertyInputSize >= sizeof (KSPROPERTY_CAMERACONTROL_S));
  753. switch (Id) {
  754. case KSPROPERTY_CAMERACONTROL_ZOOM:
  755. pHwDevExt->Zoom = pS->Value;
  756. pHwDevExt->ZoomFlags = pS->Flags;
  757. break;
  758. case KSPROPERTY_CAMERACONTROL_FOCUS:
  759. pHwDevExt->Focus = pS->Value;
  760. pHwDevExt->FocusFlags = pS->Flags;
  761. break;
  762. default:
  763. break;
  764. }
  765. }
  766. /*
  767. ** AdapterGetCameraControlProperty ()
  768. **
  769. ** Handles Get operations on the CameraControl property set.
  770. ** TsbVcap uses this for demo purposes only.
  771. **
  772. ** Arguments:
  773. **
  774. ** pSRB -
  775. ** Pointer to the HW_STREAM_REQUEST_BLOCK
  776. **
  777. ** Returns:
  778. **
  779. ** Side Effects: none
  780. */
  781. VOID
  782. STREAMAPI
  783. AdapterGetCameraControlProperty(
  784. PHW_STREAM_REQUEST_BLOCK pSrb
  785. )
  786. {
  787. PHW_DEVICE_EXTENSION pHwDevExt = ((PHW_DEVICE_EXTENSION)pSrb->HwDeviceExtension);
  788. PSTREAM_PROPERTY_DESCRIPTOR pSPD = pSrb->CommandData.PropertyInfo;
  789. ULONG Id = pSPD->Property->Id; // index of the property
  790. PKSPROPERTY_CAMERACONTROL_S pS = (PKSPROPERTY_CAMERACONTROL_S) pSPD->PropertyInfo; // pointer to the output data
  791. ASSERT (pSPD->PropertyOutputSize >= sizeof (KSPROPERTY_CAMERACONTROL_S));
  792. switch (Id) {
  793. case KSPROPERTY_CAMERACONTROL_ZOOM:
  794. pS->Value = pHwDevExt->Zoom;
  795. pS->Flags = pHwDevExt->ZoomFlags;
  796. pS->Capabilities = KSPROPERTY_CAMERACONTROL_FLAGS_MANUAL |
  797. KSPROPERTY_CAMERACONTROL_FLAGS_AUTO;
  798. break;
  799. case KSPROPERTY_CAMERACONTROL_FOCUS:
  800. pS->Value = pHwDevExt->Focus;
  801. pS->Flags = pHwDevExt->FocusFlags;
  802. pS->Capabilities = KSPROPERTY_CAMERACONTROL_FLAGS_MANUAL |
  803. KSPROPERTY_CAMERACONTROL_FLAGS_AUTO;
  804. break;
  805. default:
  806. break;
  807. }
  808. pSrb->ActualBytesTransferred = sizeof (KSPROPERTY_CAMERACONTROL_S);
  809. }
  810. // -------------------------------------------------------------------
  811. // TVAudio functions
  812. // -------------------------------------------------------------------
  813. /*
  814. ** AdapterSetTVAudioProperty ()
  815. **
  816. ** Handles Set operations on the TVAudio property set.
  817. ** TsbVcap uses this for demo purposes only.
  818. **
  819. ** Arguments:
  820. **
  821. ** pSRB -
  822. ** Pointer to the HW_STREAM_REQUEST_BLOCK
  823. **
  824. ** Returns:
  825. **
  826. ** Side Effects: none
  827. */
  828. VOID
  829. STREAMAPI
  830. AdapterSetTVAudioProperty(
  831. PHW_STREAM_REQUEST_BLOCK pSrb
  832. )
  833. {
  834. PHW_DEVICE_EXTENSION pHwDevExt = ((PHW_DEVICE_EXTENSION)pSrb->HwDeviceExtension);
  835. PSTREAM_PROPERTY_DESCRIPTOR pSPD = pSrb->CommandData.PropertyInfo;
  836. ULONG Id = pSPD->Property->Id; // index of the property
  837. switch (Id) {
  838. case KSPROPERTY_TVAUDIO_MODE:
  839. {
  840. PKSPROPERTY_TVAUDIO_S pS = (PKSPROPERTY_TVAUDIO_S) pSPD->PropertyInfo;
  841. pHwDevExt->TVAudioMode = pS->Mode;
  842. }
  843. break;
  844. default:
  845. break;
  846. }
  847. }
  848. /*
  849. ** AdapterGetTVAudioProperty ()
  850. **
  851. ** Handles Get operations on the TVAudio property set.
  852. ** TsbVcap uses this for demo purposes only.
  853. **
  854. ** Arguments:
  855. **
  856. ** pSRB -
  857. ** Pointer to the HW_STREAM_REQUEST_BLOCK
  858. **
  859. ** Returns:
  860. **
  861. ** Side Effects: none
  862. */
  863. VOID
  864. STREAMAPI
  865. AdapterGetTVAudioProperty(
  866. PHW_STREAM_REQUEST_BLOCK pSrb
  867. )
  868. {
  869. PHW_DEVICE_EXTENSION pHwDevExt = ((PHW_DEVICE_EXTENSION)pSrb->HwDeviceExtension);
  870. PSTREAM_PROPERTY_DESCRIPTOR pSPD = pSrb->CommandData.PropertyInfo;
  871. ULONG Id = pSPD->Property->Id; // index of the property
  872. switch (Id) {
  873. case KSPROPERTY_TVAUDIO_CAPS:
  874. {
  875. PKSPROPERTY_TVAUDIO_CAPS_S pS = (PKSPROPERTY_TVAUDIO_CAPS_S) pSPD->PropertyInfo; // pointer to the data
  876. ASSERT (pSPD->PropertyOutputSize >= sizeof (KSPROPERTY_TVAUDIO_CAPS_S));
  877. pS->InputMedium = TVAudioMediums[0];
  878. pS->InputMedium.Id = 0; //(ULONG) pHwDevExt; // Multiple instance support
  879. pS->OutputMedium = TVAudioMediums[1];
  880. pS->OutputMedium.Id = 0; //(ULONG) pHwDevExt; // Multiple instance support
  881. // Report all of the possible audio decoding modes the hardware is capabable of
  882. pS->Capabilities = KS_TVAUDIO_MODE_MONO |
  883. KS_TVAUDIO_MODE_STEREO |
  884. KS_TVAUDIO_MODE_LANG_A |
  885. KS_TVAUDIO_MODE_LANG_B ;
  886. pSrb->ActualBytesTransferred = sizeof (KSPROPERTY_TVAUDIO_CAPS_S);
  887. }
  888. break;
  889. case KSPROPERTY_TVAUDIO_MODE:
  890. {
  891. PKSPROPERTY_TVAUDIO_S pS = (PKSPROPERTY_TVAUDIO_S) pSPD->PropertyInfo; // pointer to the data
  892. ASSERT (pSPD->PropertyOutputSize >= sizeof (KSPROPERTY_TVAUDIO_S));
  893. // Report the currently selected mode
  894. pS->Mode = pHwDevExt->TVAudioMode;
  895. pSrb->ActualBytesTransferred = sizeof (KSPROPERTY_TVAUDIO_S);
  896. }
  897. break;
  898. case KSPROPERTY_TVAUDIO_CURRENTLY_AVAILABLE_MODES:
  899. {
  900. PKSPROPERTY_TVAUDIO_S pS = (PKSPROPERTY_TVAUDIO_S) pSPD->PropertyInfo; // pointer to the data
  901. ASSERT (pSPD->PropertyOutputSize >= sizeof (KSPROPERTY_TVAUDIO_S));
  902. // Report which audio modes could potentially be selected right now
  903. pS->Mode = KS_TVAUDIO_MODE_MONO |
  904. KS_TVAUDIO_MODE_STEREO |
  905. KS_TVAUDIO_MODE_LANG_A ;
  906. pSrb->ActualBytesTransferred = sizeof (KSPROPERTY_TVAUDIO_S);
  907. }
  908. break;
  909. default:
  910. break;
  911. }
  912. }
  913. // -------------------------------------------------------------------
  914. // AnalogVideoDecoder functions
  915. // -------------------------------------------------------------------
  916. /*
  917. ** AdapterSetAnalogVideoDecoderProperty ()
  918. **
  919. ** Handles Set operations on the AnalogVideoDecoder property set.
  920. ** TsbVcap uses this for demo purposes only.
  921. **
  922. ** Arguments:
  923. **
  924. ** pSRB -
  925. ** Pointer to the HW_STREAM_REQUEST_BLOCK
  926. **
  927. ** Returns:
  928. **
  929. ** Side Effects: none
  930. */
  931. VOID
  932. STREAMAPI
  933. AdapterSetAnalogVideoDecoderProperty(
  934. PHW_STREAM_REQUEST_BLOCK pSrb
  935. )
  936. {
  937. PHW_DEVICE_EXTENSION pHwDevExt = ((PHW_DEVICE_EXTENSION)pSrb->HwDeviceExtension);
  938. PSTREAM_PROPERTY_DESCRIPTOR pSPD = pSrb->CommandData.PropertyInfo;
  939. ULONG Id = pSPD->Property->Id; // index of the property
  940. PKSPROPERTY_VIDEODECODER_S pS = (PKSPROPERTY_VIDEODECODER_S) pSPD->PropertyInfo;
  941. ASSERT (pSPD->PropertyInputSize >= sizeof (KSPROPERTY_VIDEODECODER_S));
  942. switch (Id) {
  943. case KSPROPERTY_VIDEODECODER_STANDARD:
  944. {
  945. pHwDevExt->VideoDecoderVideoStandard = pS->Value;
  946. }
  947. break;
  948. case KSPROPERTY_VIDEODECODER_OUTPUT_ENABLE:
  949. {
  950. pHwDevExt->VideoDecoderOutputEnable = pS->Value;
  951. }
  952. break;
  953. case KSPROPERTY_VIDEODECODER_VCR_TIMING:
  954. {
  955. pHwDevExt->VideoDecoderVCRTiming = pS->Value;
  956. }
  957. break;
  958. default:
  959. break;
  960. }
  961. }
  962. /*
  963. ** AdapterGetAnalogVideoDecoderProperty ()
  964. **
  965. ** Handles Get operations on the AnalogVideoDecoder property set.
  966. ** TsbVcap uses this for demo purposes only.
  967. **
  968. ** Arguments:
  969. **
  970. ** pSRB -
  971. ** Pointer to the HW_STREAM_REQUEST_BLOCK
  972. **
  973. ** Returns:
  974. **
  975. ** Side Effects: none
  976. */
  977. VOID
  978. STREAMAPI
  979. AdapterGetAnalogVideoDecoderProperty(
  980. PHW_STREAM_REQUEST_BLOCK pSrb
  981. )
  982. {
  983. PHW_DEVICE_EXTENSION pHwDevExt = ((PHW_DEVICE_EXTENSION)pSrb->HwDeviceExtension);
  984. PSTREAM_PROPERTY_DESCRIPTOR pSPD = pSrb->CommandData.PropertyInfo;
  985. ULONG Id = pSPD->Property->Id; // index of the property
  986. switch (Id) {
  987. case KSPROPERTY_VIDEODECODER_CAPS:
  988. {
  989. PKSPROPERTY_VIDEODECODER_CAPS_S pS = (PKSPROPERTY_VIDEODECODER_CAPS_S) pSPD->PropertyInfo; // pointer to the data
  990. ASSERT (pSPD->PropertyOutputSize >= sizeof (KSPROPERTY_VIDEODECODER_CAPS_S));
  991. pS->StandardsSupported =
  992. KS_AnalogVideo_NTSC_M
  993. | KS_AnalogVideo_PAL_B
  994. | KS_AnalogVideo_PAL_D
  995. // | KS_AnalogVideo_PAL_H
  996. // | KS_AnalogVideo_PAL_I
  997. | KS_AnalogVideo_PAL_M
  998. | KS_AnalogVideo_PAL_N
  999. // | KS_AnalogVideo_SECAM_B
  1000. // | KS_AnalogVideo_SECAM_D
  1001. // | KS_AnalogVideo_SECAM_G
  1002. // | KS_AnalogVideo_SECAM_H
  1003. // | KS_AnalogVideo_SECAM_K
  1004. // | KS_AnalogVideo_SECAM_K1
  1005. // | KS_AnalogVideo_SECAM_L
  1006. ;
  1007. pS->Capabilities = KS_VIDEODECODER_FLAGS_CAN_DISABLE_OUTPUT |
  1008. KS_VIDEODECODER_FLAGS_CAN_USE_VCR_LOCKING |
  1009. KS_VIDEODECODER_FLAGS_CAN_INDICATE_LOCKED ;
  1010. pS->SettlingTime = 10; // How long to delay after tuning before
  1011. // Locked indicator is valid
  1012. pS->HSyncPerVSync = 6; // HSync per VSync
  1013. pSrb->ActualBytesTransferred = sizeof (KSPROPERTY_VIDEODECODER_CAPS_S);
  1014. }
  1015. break;
  1016. case KSPROPERTY_VIDEODECODER_STANDARD:
  1017. {
  1018. PKSPROPERTY_VIDEODECODER_S pS = (PKSPROPERTY_VIDEODECODER_S) pSPD->PropertyInfo; // pointer to the data
  1019. ASSERT (pSPD->PropertyOutputSize >= sizeof (KSPROPERTY_VIDEODECODER_S));
  1020. pS->Value = pHwDevExt->VideoDecoderVideoStandard;
  1021. pSrb->ActualBytesTransferred = sizeof (KSPROPERTY_VIDEODECODER_S);
  1022. }
  1023. break;
  1024. case KSPROPERTY_VIDEODECODER_STATUS:
  1025. {
  1026. PKSPROPERTY_VIDEODECODER_STATUS_S pS = (PKSPROPERTY_VIDEODECODER_STATUS_S) pSPD->PropertyInfo; // pointer to the data
  1027. ASSERT (pSPD->PropertyOutputSize >= sizeof (KSPROPERTY_VIDEODECODER_STATUS_S));
  1028. pS->NumberOfLines = (pHwDevExt->VideoDecoderVideoStandard & KS_AnalogVideo_NTSC_Mask)
  1029. ? 525 : 625;
  1030. // Just to make things interesting, simulate that some channels aren't locked
  1031. // In the US, these are channels 54 through 70
  1032. pS->SignalLocked = (pHwDevExt->Frequency < 400000000 || pHwDevExt->Frequency > 500000000);
  1033. pSrb->ActualBytesTransferred = sizeof (KSPROPERTY_VIDEODECODER_S);
  1034. }
  1035. break;
  1036. case KSPROPERTY_VIDEODECODER_OUTPUT_ENABLE:
  1037. {
  1038. PKSPROPERTY_VIDEODECODER_S pS = (PKSPROPERTY_VIDEODECODER_S) pSPD->PropertyInfo; // pointer to the data
  1039. ASSERT (pSPD->PropertyOutputSize >= sizeof (KSPROPERTY_VIDEODECODER_S));
  1040. pS->Value = pHwDevExt->VideoDecoderOutputEnable;
  1041. pSrb->ActualBytesTransferred = sizeof (KSPROPERTY_VIDEODECODER_S);
  1042. }
  1043. break;
  1044. case KSPROPERTY_VIDEODECODER_VCR_TIMING:
  1045. {
  1046. PKSPROPERTY_VIDEODECODER_S pS = (PKSPROPERTY_VIDEODECODER_S) pSPD->PropertyInfo; // pointer to the data
  1047. ASSERT (pSPD->PropertyOutputSize >= sizeof (KSPROPERTY_VIDEODECODER_S));
  1048. pS->Value = pHwDevExt->VideoDecoderVCRTiming;
  1049. pSrb->ActualBytesTransferred = sizeof (KSPROPERTY_VIDEODECODER_S);
  1050. }
  1051. break;
  1052. default:
  1053. break;
  1054. }
  1055. }
  1056. #endif//TOSHIBA
  1057. #ifndef TOSHIBA // '98-12-10 Deleted, for Bug-Report 253534
  1058. // -------------------------------------------------------------------
  1059. // VideoControl functions
  1060. // -------------------------------------------------------------------
  1061. /*
  1062. ** AdapterSetVideoControlProperty ()
  1063. **
  1064. ** Handles Set operations on the VideoControl property set.
  1065. ** TsbVcap uses this for demo purposes only.
  1066. **
  1067. ** Arguments:
  1068. **
  1069. ** pSRB -
  1070. ** Pointer to the HW_STREAM_REQUEST_BLOCK
  1071. **
  1072. ** Returns:
  1073. **
  1074. ** Side Effects: none
  1075. */
  1076. VOID
  1077. STREAMAPI
  1078. AdapterSetVideoControlProperty(
  1079. PHW_STREAM_REQUEST_BLOCK pSrb
  1080. )
  1081. {
  1082. PHW_DEVICE_EXTENSION pHwDevExt = ((PHW_DEVICE_EXTENSION)pSrb->HwDeviceExtension);
  1083. PSTREAM_PROPERTY_DESCRIPTOR pSPD = pSrb->CommandData.PropertyInfo;
  1084. ULONG Id = pSPD->Property->Id; // index of the property
  1085. PKSPROPERTY_VIDEOCONTROL_MODE_S pS = (PKSPROPERTY_VIDEOCONTROL_MODE_S) pSPD->PropertyInfo;
  1086. PSTREAMEX pStrmEx;
  1087. ULONG StreamIndex;
  1088. ULONG *pVideoControlMode;
  1089. // For this property set, the StreamIndex is always in the same place
  1090. // for each property
  1091. StreamIndex = ((PKSPROPERTY_VIDEOCONTROL_CAPS_S) pSPD->Property)->StreamIndex;
  1092. ASSERT (StreamIndex >= 0 && StreamIndex < MAX_TSBVCAP_STREAMS);
  1093. // Verify the stream index is valid
  1094. if (StreamIndex < 0 || StreamIndex >= MAX_TSBVCAP_STREAMS) {
  1095. pSrb->Status = STATUS_INVALID_PARAMETER;
  1096. return;
  1097. }
  1098. pStrmEx = (PSTREAMEX) pHwDevExt->pStrmEx[StreamIndex];
  1099. // If the stream is not opened when this property set is used,
  1100. // store the values in the HwDevExt
  1101. if (pStrmEx) {
  1102. pVideoControlMode = &pStrmEx->VideoControlMode;
  1103. }
  1104. else {
  1105. pVideoControlMode = &pHwDevExt->VideoControlMode;
  1106. }
  1107. ASSERT (pSPD->PropertyInputSize >= sizeof (KSPROPERTY_VIDEOCONTROL_MODE_S));
  1108. switch (Id) {
  1109. case KSPROPERTY_VIDEOCONTROL_MODE:
  1110. {
  1111. *pVideoControlMode = pS->Mode;
  1112. }
  1113. break;
  1114. default:
  1115. break;
  1116. }
  1117. }
  1118. /*
  1119. ** AdapterGetVideoControlProperty ()
  1120. **
  1121. ** Handles Get operations on the VideoControl property set.
  1122. ** TsbVcap uses this for demo purposes only.
  1123. **
  1124. ** Arguments:
  1125. **
  1126. ** pSRB -
  1127. ** Pointer to the HW_STREAM_REQUEST_BLOCK
  1128. **
  1129. ** Returns:
  1130. **
  1131. ** Side Effects: none
  1132. */
  1133. VOID
  1134. STREAMAPI
  1135. AdapterGetVideoControlProperty(
  1136. PHW_STREAM_REQUEST_BLOCK pSrb
  1137. )
  1138. {
  1139. PHW_DEVICE_EXTENSION pHwDevExt = ((PHW_DEVICE_EXTENSION)pSrb->HwDeviceExtension);
  1140. PSTREAM_PROPERTY_DESCRIPTOR pSPD = pSrb->CommandData.PropertyInfo;
  1141. ULONG Id = pSPD->Property->Id; // index of the property
  1142. PSTREAMEX pStrmEx;
  1143. ULONG StreamIndex;
  1144. ULONG *pVideoControlMode;
  1145. // For this property set, the StreamIndex is always in the same place
  1146. // for each property
  1147. StreamIndex = ((PKSPROPERTY_VIDEOCONTROL_CAPS_S) pSPD->Property)->StreamIndex;
  1148. ASSERT (StreamIndex >= 0 && StreamIndex < MAX_TSBVCAP_STREAMS);
  1149. // Verify the stream index is valid
  1150. if (StreamIndex < 0 || StreamIndex >= MAX_TSBVCAP_STREAMS) {
  1151. pSrb->Status = STATUS_INVALID_PARAMETER;
  1152. return;
  1153. }
  1154. pStrmEx = (PSTREAMEX) pHwDevExt->pStrmEx[StreamIndex];
  1155. // If the stream is not opened when this property set is used,
  1156. // store the values in the HwDevExt
  1157. if (pStrmEx) {
  1158. pVideoControlMode = &pStrmEx->VideoControlMode;
  1159. }
  1160. else {
  1161. pVideoControlMode = &pHwDevExt->VideoControlMode;
  1162. }
  1163. switch (Id) {
  1164. case KSPROPERTY_VIDEOCONTROL_CAPS:
  1165. {
  1166. PKSPROPERTY_VIDEOCONTROL_CAPS_S pS = (PKSPROPERTY_VIDEOCONTROL_CAPS_S) pSPD->PropertyInfo; // pointer to the data
  1167. ASSERT (pSPD->PropertyOutputSize >= sizeof (KSPROPERTY_VIDEOCONTROL_CAPS_S));
  1168. pS->VideoControlCaps =
  1169. KS_VideoControlFlag_FlipHorizontal
  1170. // | KS_VideoControlFlag_FlipVertical
  1171. // | KS_VideoControlFlag_ExternalTriggerEnable
  1172. // | KS_VideoControlFlag_Trigger
  1173. ;
  1174. pSrb->ActualBytesTransferred = sizeof (KSPROPERTY_VIDEOCONTROL_CAPS_S);
  1175. }
  1176. break;
  1177. case KSPROPERTY_VIDEOCONTROL_ACTUAL_FRAME_RATE:
  1178. {
  1179. PKSPROPERTY_VIDEOCONTROL_ACTUAL_FRAME_RATE_S pS =
  1180. (PKSPROPERTY_VIDEOCONTROL_ACTUAL_FRAME_RATE_S) pSPD->PropertyInfo; // pointer to the data
  1181. ASSERT (pSPD->PropertyOutputSize >= sizeof (KSPROPERTY_VIDEOCONTROL_ACTUAL_FRAME_RATE_S));
  1182. pS->CurrentActualFrameRate = 15; // TODO: Why is this a fixed value? Is it not reprogrammable?
  1183. pS->CurrentMaxAvailableFrameRate = 15; // TODO: Why is this a fixed value? Is it not reprogrammable?
  1184. pSrb->ActualBytesTransferred = sizeof (KSPROPERTY_VIDEOCONTROL_ACTUAL_FRAME_RATE_S);
  1185. }
  1186. break;
  1187. case KSPROPERTY_VIDEOCONTROL_FRAME_RATES:
  1188. {
  1189. // todo
  1190. }
  1191. break;
  1192. case KSPROPERTY_VIDEOCONTROL_MODE:
  1193. {
  1194. PKSPROPERTY_VIDEOCONTROL_MODE_S pS = (PKSPROPERTY_VIDEOCONTROL_MODE_S) pSPD->PropertyInfo; // pointer to the data
  1195. ASSERT (pSPD->PropertyOutputSize >= sizeof (KSPROPERTY_VIDEOCONTROL_MODE_S));
  1196. pS->Mode = *pVideoControlMode;
  1197. pSrb->ActualBytesTransferred = sizeof (KSPROPERTY_VIDEOCONTROL_MODE_S);
  1198. }
  1199. break;
  1200. default:
  1201. break;
  1202. }
  1203. }
  1204. /*
  1205. ** AdapterGetVideoCompressionProperty()
  1206. **
  1207. ** Gets compressor settings
  1208. **
  1209. ** Arguments:
  1210. **
  1211. ** pSrb - pointer to the stream request block for properties
  1212. **
  1213. ** Returns:
  1214. **
  1215. ** Side Effects: none
  1216. */
  1217. VOID
  1218. STREAMAPI
  1219. AdapterGetVideoCompressionProperty(
  1220. PHW_STREAM_REQUEST_BLOCK pSrb
  1221. )
  1222. {
  1223. PHW_DEVICE_EXTENSION pHwDevExt = ((PHW_DEVICE_EXTENSION)pSrb->HwDeviceExtension);
  1224. PSTREAMEX pStrmEx;
  1225. PSTREAM_PROPERTY_DESCRIPTOR pSPD = pSrb->CommandData.PropertyInfo;
  1226. ULONG Id = pSPD->Property->Id; // index of the property
  1227. ULONG StreamIndex;
  1228. PCOMPRESSION_SETTINGS pCompressionSettings;
  1229. // For this property set, the StreamIndex is always in the same place
  1230. // for each property
  1231. StreamIndex = ((PKSPROPERTY_VIDEOCOMPRESSION_S) pSPD->Property)->StreamIndex;
  1232. ASSERT (StreamIndex >= 0 && StreamIndex < MAX_TSBVCAP_STREAMS);
  1233. // Verify the stream index is valid
  1234. if (StreamIndex < 0 || StreamIndex >= MAX_TSBVCAP_STREAMS) {
  1235. pSrb->Status = STATUS_INVALID_PARAMETER;
  1236. return;
  1237. }
  1238. pStrmEx = (PSTREAMEX) pHwDevExt->pStrmEx[StreamIndex];
  1239. // If the stream is not opened when this property set is used,
  1240. // store the values in the HwDevExt
  1241. if (pStrmEx) {
  1242. pCompressionSettings = &pStrmEx->CompressionSettings;
  1243. }
  1244. else {
  1245. pCompressionSettings = &pHwDevExt->CompressionSettings;
  1246. }
  1247. switch (Id) {
  1248. case KSPROPERTY_VIDEOCOMPRESSION_GETINFO:
  1249. {
  1250. PKSPROPERTY_VIDEOCOMPRESSION_GETINFO_S pS =
  1251. (PKSPROPERTY_VIDEOCOMPRESSION_GETINFO_S) pSPD->PropertyInfo;
  1252. pS->DefaultKeyFrameRate = 15; // Key frame rate
  1253. pS->DefaultPFrameRate = 3; // Predeicted frames per Key frame
  1254. pS->DefaultQuality = 5000; // 0 to 10000
  1255. pS->Capabilities =
  1256. KS_CompressionCaps_CanQuality |
  1257. KS_CompressionCaps_CanKeyFrame |
  1258. KS_CompressionCaps_CanBFrame ;
  1259. pSrb->ActualBytesTransferred = sizeof (KSPROPERTY_VIDEOCOMPRESSION_GETINFO_S);
  1260. }
  1261. break;
  1262. case KSPROPERTY_VIDEOCOMPRESSION_KEYFRAME_RATE:
  1263. {
  1264. PKSPROPERTY_VIDEOCOMPRESSION_S pS =
  1265. (PKSPROPERTY_VIDEOCOMPRESSION_S) pSPD->PropertyInfo;
  1266. pS->Value = pCompressionSettings->CompressionKeyFrameRate;
  1267. pSrb->ActualBytesTransferred = sizeof (KSPROPERTY_VIDEOCOMPRESSION_S);
  1268. }
  1269. break;
  1270. case KSPROPERTY_VIDEOCOMPRESSION_PFRAMES_PER_KEYFRAME:
  1271. {
  1272. PKSPROPERTY_VIDEOCOMPRESSION_S pS =
  1273. (PKSPROPERTY_VIDEOCOMPRESSION_S) pSPD->PropertyInfo;
  1274. pS->Value = pCompressionSettings->CompressionPFramesPerKeyFrame;
  1275. pSrb->ActualBytesTransferred = sizeof (KSPROPERTY_VIDEOCOMPRESSION_S);
  1276. }
  1277. break;
  1278. case KSPROPERTY_VIDEOCOMPRESSION_QUALITY:
  1279. {
  1280. PKSPROPERTY_VIDEOCOMPRESSION_S pS =
  1281. (PKSPROPERTY_VIDEOCOMPRESSION_S) pSPD->PropertyInfo;
  1282. pS->Value = pCompressionSettings->CompressionQuality;
  1283. pSrb->ActualBytesTransferred = sizeof (KSPROPERTY_VIDEOCOMPRESSION_S);
  1284. }
  1285. break;
  1286. default:
  1287. break;
  1288. }
  1289. }
  1290. /*
  1291. ** AdapterSetVideoCompressionProperty()
  1292. **
  1293. ** Sets compressor settings
  1294. **
  1295. ** Arguments:
  1296. **
  1297. ** pSrb - pointer to the stream request block for properties
  1298. **
  1299. ** Returns:
  1300. **
  1301. ** Side Effects: none
  1302. */
  1303. VOID
  1304. STREAMAPI
  1305. AdapterSetVideoCompressionProperty(
  1306. PHW_STREAM_REQUEST_BLOCK pSrb
  1307. )
  1308. {
  1309. PHW_DEVICE_EXTENSION pHwDevExt = ((PHW_DEVICE_EXTENSION)pSrb->HwDeviceExtension);
  1310. PSTREAMEX pStrmEx;
  1311. PSTREAM_PROPERTY_DESCRIPTOR pSPD = pSrb->CommandData.PropertyInfo;
  1312. PKSPROPERTY_VIDEOCOMPRESSION_S pS = (PKSPROPERTY_VIDEOCOMPRESSION_S) pSPD->Property;
  1313. ULONG Id = pSPD->Property->Id; // index of the property
  1314. ULONG StreamIndex;
  1315. PCOMPRESSION_SETTINGS pCompressionSettings;
  1316. // For this property set, the StreamIndex is always in the same place
  1317. // for each property
  1318. StreamIndex = ((PKSPROPERTY_VIDEOCOMPRESSION_S) pSPD->Property)->StreamIndex;
  1319. ASSERT (StreamIndex >= 0 && StreamIndex < MAX_TSBVCAP_STREAMS);
  1320. // Verify the stream index is valid
  1321. if (StreamIndex < 0 || StreamIndex >= MAX_TSBVCAP_STREAMS) {
  1322. pSrb->Status = STATUS_INVALID_PARAMETER;
  1323. return;
  1324. }
  1325. pStrmEx = (PSTREAMEX) pHwDevExt->pStrmEx[StreamIndex];
  1326. // If the stream is not opened when this property set is used,
  1327. // store the values in the HwDevExt
  1328. if (pStrmEx) {
  1329. pCompressionSettings = &pStrmEx->CompressionSettings;
  1330. }
  1331. else {
  1332. pCompressionSettings = &pHwDevExt->CompressionSettings;
  1333. }
  1334. switch (Id) {
  1335. case KSPROPERTY_VIDEOCOMPRESSION_KEYFRAME_RATE:
  1336. {
  1337. pCompressionSettings->CompressionKeyFrameRate = pS->Value;
  1338. }
  1339. break;
  1340. case KSPROPERTY_VIDEOCOMPRESSION_PFRAMES_PER_KEYFRAME:
  1341. {
  1342. pCompressionSettings->CompressionPFramesPerKeyFrame = pS->Value;
  1343. }
  1344. break;
  1345. case KSPROPERTY_VIDEOCOMPRESSION_QUALITY:
  1346. {
  1347. pCompressionSettings->CompressionQuality = pS->Value;
  1348. }
  1349. break;
  1350. default:
  1351. break;
  1352. }
  1353. }
  1354. #endif//TOSHIBA
  1355. // -------------------------------------------------------------------
  1356. // General entry point for all get/set adapter properties
  1357. // -------------------------------------------------------------------
  1358. /*
  1359. ** AdapterSetProperty ()
  1360. **
  1361. ** Handles Set operations for all adapter properties.
  1362. **
  1363. ** Arguments:
  1364. **
  1365. ** pSRB -
  1366. ** Pointer to the HW_STREAM_REQUEST_BLOCK
  1367. **
  1368. ** Returns:
  1369. **
  1370. ** Side Effects: none
  1371. */
  1372. VOID
  1373. STREAMAPI
  1374. AdapterSetProperty(
  1375. PHW_STREAM_REQUEST_BLOCK pSrb
  1376. )
  1377. {
  1378. PSTREAM_PROPERTY_DESCRIPTOR pSPD = pSrb->CommandData.PropertyInfo;
  1379. #ifdef TOSHIBA
  1380. if (IsEqualGUID(&PROPSETID_VIDCAP_VIDEOPROCAMP, &pSPD->Property->Set)) {
  1381. AdapterSetVideoProcAmpProperty (pSrb);
  1382. }
  1383. #else //TOSHIBA // '98-12-10 Moved, for Bug-Report 253534
  1384. else if (IsEqualGUID(&PROPSETID_VIDCAP_VIDEOCONTROL, &pSPD->Property->Set)) {
  1385. AdapterSetVideoControlProperty (pSrb);
  1386. }
  1387. else if (IsEqualGUID (&PROPSETID_VIDCAP_VIDEOCOMPRESSION, &pSPD->Property->Set)) {
  1388. AdapterSetVideoCompressionProperty (pSrb);
  1389. }
  1390. //#else //TOSHIBA '98-12-10 Moved, for Bug-Report 253534
  1391. if (IsEqualGUID(&PROPSETID_VIDCAP_CROSSBAR, &pSPD->Property->Set)) {
  1392. AdapterSetCrossbarProperty (pSrb);
  1393. }
  1394. else if (IsEqualGUID(&PROPSETID_TUNER, &pSPD->Property->Set)) {
  1395. AdapterSetTunerProperty (pSrb);
  1396. }
  1397. else if (IsEqualGUID(&PROPSETID_VIDCAP_VIDEOPROCAMP, &pSPD->Property->Set)) {
  1398. AdapterSetVideoProcAmpProperty (pSrb);
  1399. }
  1400. else if (IsEqualGUID(&PROPSETID_VIDCAP_CAMERACONTROL, &pSPD->Property->Set)) {
  1401. AdapterSetCameraControlProperty (pSrb);
  1402. }
  1403. else if (IsEqualGUID(&PROPSETID_VIDCAP_TVAUDIO, &pSPD->Property->Set)) {
  1404. AdapterSetTVAudioProperty (pSrb);
  1405. }
  1406. else if (IsEqualGUID(&PROPSETID_VIDCAP_VIDEODECODER, &pSPD->Property->Set)) {
  1407. AdapterSetAnalogVideoDecoderProperty (pSrb);
  1408. }
  1409. else if (IsEqualGUID(&PROPSETID_VIDCAP_VIDEOCONTROL, &pSPD->Property->Set)) {
  1410. AdapterSetVideoControlProperty (pSrb);
  1411. }
  1412. else if (IsEqualGUID (&PROPSETID_VIDCAP_VIDEOCOMPRESSION, &pSPD->Property->Set)) {
  1413. AdapterSetVideoCompressionProperty (pSrb);
  1414. }
  1415. #endif//TOSHIBA
  1416. else {
  1417. //
  1418. // We should never get here
  1419. //
  1420. pSrb->Status = STATUS_NOT_IMPLEMENTED;
  1421. }
  1422. }
  1423. /*
  1424. ** AdapterGetProperty ()
  1425. **
  1426. ** Handles Get operations for all adapter properties.
  1427. **
  1428. ** Arguments:
  1429. **
  1430. ** pSRB -
  1431. ** Pointer to the HW_STREAM_REQUEST_BLOCK
  1432. **
  1433. ** Returns:
  1434. **
  1435. ** Side Effects: none
  1436. */
  1437. VOID
  1438. STREAMAPI
  1439. AdapterGetProperty(
  1440. PHW_STREAM_REQUEST_BLOCK pSrb
  1441. )
  1442. {
  1443. PSTREAM_PROPERTY_DESCRIPTOR pSPD = pSrb->CommandData.PropertyInfo;
  1444. #ifdef TOSHIBA
  1445. if (IsEqualGUID(&PROPSETID_VIDCAP_VIDEOPROCAMP, &pSPD->Property->Set)) {
  1446. AdapterGetVideoProcAmpProperty (pSrb);
  1447. }
  1448. #else //TOSHIBA // '98-12-10 Moved, for Bug-Report 253534
  1449. else if (IsEqualGUID(&PROPSETID_VIDCAP_VIDEOCONTROL, &pSPD->Property->Set)) {
  1450. AdapterGetVideoControlProperty (pSrb);
  1451. }
  1452. else if (IsEqualGUID (&PROPSETID_VIDCAP_VIDEOCOMPRESSION, &pSPD->Property->Set)) {
  1453. AdapterGetVideoCompressionProperty (pSrb);
  1454. }
  1455. //#else //TOSHIBA '98-12-10 Moved, for Bug-Report 253534
  1456. if (IsEqualGUID (&PROPSETID_VIDCAP_CROSSBAR, &pSPD->Property->Set)) {
  1457. AdapterGetCrossbarProperty (pSrb);
  1458. }
  1459. else if (IsEqualGUID (&PROPSETID_TUNER, &pSPD->Property->Set)) {
  1460. AdapterGetTunerProperty (pSrb);
  1461. }
  1462. else if (IsEqualGUID(&PROPSETID_VIDCAP_VIDEOPROCAMP, &pSPD->Property->Set)) {
  1463. AdapterGetVideoProcAmpProperty (pSrb);
  1464. }
  1465. else if (IsEqualGUID(&PROPSETID_VIDCAP_CAMERACONTROL, &pSPD->Property->Set)) {
  1466. AdapterGetCameraControlProperty (pSrb);
  1467. }
  1468. else if (IsEqualGUID(&PROPSETID_VIDCAP_TVAUDIO, &pSPD->Property->Set)) {
  1469. AdapterGetTVAudioProperty (pSrb);
  1470. }
  1471. else if (IsEqualGUID(&PROPSETID_VIDCAP_VIDEODECODER, &pSPD->Property->Set)) {
  1472. AdapterGetAnalogVideoDecoderProperty (pSrb);
  1473. }
  1474. else if (IsEqualGUID(&PROPSETID_VIDCAP_VIDEOCONTROL, &pSPD->Property->Set)) {
  1475. AdapterGetVideoControlProperty (pSrb);
  1476. }
  1477. else if (IsEqualGUID (&PROPSETID_VIDCAP_VIDEOCOMPRESSION, &pSPD->Property->Set)) {
  1478. AdapterGetVideoCompressionProperty (pSrb);
  1479. }
  1480. #endif//TOSHIBA
  1481. else {
  1482. //
  1483. // We should never get here
  1484. //
  1485. pSrb->Status = STATUS_NOT_IMPLEMENTED;
  1486. }
  1487. }
  1488.