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.

994 lines
19 KiB

  1. //***************************************************************************
  2. // Header file
  3. //
  4. //***************************************************************************
  5. extern "C" {
  6. #include "ksmedia.h" // Definition ?
  7. //#include "mpeg2ids.h" // Definition ?
  8. //#include "mpegprop.h" // sample?
  9. //#include "kspvpe.h"
  10. //#include "ddvptype.h"
  11. //#include "vptype.h"
  12. //#include "ksguid.h"
  13. //#include "mpegguid.h"
  14. }
  15. // This information is not defined in ksmedia.h, why???? I got these information from DirectX5.2 SDK
  16. //#define DDVPTYPE_E_HREFH_VREFL \
  17. // 0x54F39980L, 0xDA60, 0x11CF, 0x9B, 0x06, 0x00, 0xA0, 0xC9, 0x03, 0xA3, 0xB8
  18. #define DDVPTYPE_E_HREFL_VREFH \
  19. 0xA07A02E0L, 0xDA60, 0x11CF, 0x9B, 0x06, 0x00, 0xA0, 0xC9, 0x03, 0xA3, 0xB8
  20. #define DDVPCONNECT_DISCARDSVREFDATA 0x00000008L
  21. GUID g_ZVGuid = {DDVPTYPE_E_HREFL_VREFH};
  22. GUID g_S3Guid = {DDVPTYPE_E_HREFL_VREFL};
  23. GUID g_ATIGuid = {0x1352A560L,0xDA61,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8}; // DDVPTYPE_BROOKTREE
  24. // define this macro to facilitate giving the pixel format
  25. #define MKFOURCC(ch0, ch1, ch2, ch3) ((DWORD)(BYTE)(ch0) | \
  26. ((DWORD)(BYTE)(ch1) << 8) | \
  27. ((DWORD)(BYTE)(ch2) << 16) | \
  28. ((DWORD)(BYTE)(ch3) << 24 ))
  29. /*****************************************************************************
  30. define the data formats used by the pins in this minidriver
  31. *****************************************************************************/
  32. /*
  33. Define the Mpeg2Video format that the minidriver supports
  34. */
  35. KSDATAFORMAT hwfmtiMpeg2Vid
  36. = {
  37. sizeof (KSDATAFORMAT), // + sizeof (KS_MPEGVIDEOINFO2),
  38. // sizeof (KSDATAFORMAT),
  39. 0,
  40. 0,
  41. 0,
  42. //
  43. // specify media type, subtype, and format from mpeg2 video
  44. //
  45. STATIC_KSDATAFORMAT_TYPE_DVD_ENCRYPTED_PACK,
  46. // STATIC_KSDATAFORMAT_TYPE_MPEG2_PES,
  47. STATIC_KSDATAFORMAT_SUBTYPE_MPEG2_VIDEO,
  48. // STATIC_KSDATAFORMAT_FORMAT_MPEG2_VIDEO
  49. STATIC_KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO
  50. };
  51. /*
  52. Define the supported AC3 Audio format
  53. */
  54. //--- 98.06.01 S.Watanabe
  55. //KSDATAFORMAT hwfmtiMpeg2Aud[] = {
  56. // {
  57. // sizeof (KSDATAFORMAT),
  58. // 0,
  59. // 0,
  60. // 0,
  61. // STATIC_KSDATAFORMAT_TYPE_DVD_ENCRYPTED_PACK,
  62. //// STATIC_KSDATAFORMAT_TYPE_MPEG2_PES,
  63. // STATIC_KSDATAFORMAT_SUBTYPE_AC3_AUDIO,
  64. //// STATIC_KSDATAFORMAT_FORMAT_WAVEFORMATEX
  65. // STATIC_KSDATAFORMAT_SPECIFIER_WAVEFORMATEX
  66. // },
  67. // {
  68. // sizeof (KSDATAFORMAT),
  69. // 0,
  70. // 0,
  71. // 0,
  72. // STATIC_KSDATAFORMAT_TYPE_DVD_ENCRYPTED_PACK,
  73. // STATIC_KSDATAFORMAT_SUBTYPE_LPCM_AUDIO,
  74. //// STATIC_KSDATAFORMAT_SPECIFIER_LPCM_AUDIO
  75. // STATIC_KSDATAFORMAT_SPECIFIER_WAVEFORMATEX
  76. // },
  77. // {
  78. // sizeof (KSDATAFORMAT),
  79. // 0,
  80. // 0,
  81. // 0,
  82. // STATIC_KSDATAFORMAT_TYPE_DVD_ENCRYPTED_PACK,
  83. // STATIC_KSDATAFORMAT_SUBTYPE_MPEG2_AUDIO,
  84. //// STATIC_KSDATAFORMAT_SPECIFIER_LPCM_AUDIO
  85. // STATIC_KSDATAFORMAT_SPECIFIER_WAVEFORMATEX
  86. // },
  87. //};
  88. KSDATAFORMAT Mpeg2ksdataformat = {
  89. sizeof (KSDATAFORMAT) + sizeof (WAVEFORMATEX),
  90. 0,
  91. 1,
  92. 0,
  93. STATIC_KSDATAFORMAT_TYPE_DVD_ENCRYPTED_PACK,
  94. STATIC_KSDATAFORMAT_SUBTYPE_AC3_AUDIO,
  95. STATIC_KSDATAFORMAT_SPECIFIER_WAVEFORMATEX
  96. };
  97. WAVEFORMATEX Mpeg2waveformatex = {
  98. 0, // WAVE_FORMAT_UNKNOWN
  99. 6, // channels
  100. 48000, // sampling rate
  101. 0, // byte rate
  102. 768, // align
  103. 0, // resolution
  104. 0 // extra
  105. };
  106. /*
  107. Define the supported LPCM audio format.
  108. */
  109. KSDATAFORMAT LPCMksdataformat = {
  110. sizeof (KSDATAFORMAT) + sizeof (WAVEFORMATEX),
  111. 0,
  112. 1,
  113. 0,
  114. STATIC_KSDATAFORMAT_TYPE_DVD_ENCRYPTED_PACK,
  115. STATIC_KSDATAFORMAT_SUBTYPE_LPCM_AUDIO,
  116. STATIC_KSDATAFORMAT_SPECIFIER_WAVEFORMATEX
  117. };
  118. WAVEFORMATEX LPCMwaveformatex = {
  119. /*
  120. The navigator currently does not look at this, all it cares about is that
  121. we provide a valid format block for Mpeg2. So the correctness of these
  122. values has not been verified.
  123. */
  124. WAVE_FORMAT_PCM,
  125. 2, // channels
  126. 48000, // sampling rate
  127. 192000, // byte rate
  128. 4, // alignment
  129. 16, // bit resolution
  130. 0 // extra
  131. };
  132. /* The KSDATAFORMAT and WAVEFORMATEX structures above are copied in
  133. here at run time. See the comment just before the four calls to
  134. RtlCopyMemory in AdapterStreamInfo() in dvdcmd.cpp.
  135. */
  136. BYTE hwfmtiMpeg2Aud[sizeof (KSDATAFORMAT) + sizeof (WAVEFORMATEX)];
  137. BYTE hwfmtiLPCMAud[sizeof (KSDATAFORMAT) + sizeof (WAVEFORMATEX)];
  138. //--- End.
  139. /*
  140. Define the supported Sub picture format
  141. */
  142. KSDATAFORMAT hwfmtiMpeg2Subpic = {
  143. sizeof (KSDATAFORMAT),
  144. 0,
  145. 0,
  146. 0,
  147. //
  148. // specify media type, subtype
  149. //
  150. STATIC_KSDATAFORMAT_TYPE_DVD_ENCRYPTED_PACK,
  151. // STATIC_KSDATAFORMAT_TYPE_MPEG2_PES,
  152. STATIC_KSDATAFORMAT_SUBTYPE_SUBPICTURE,
  153. // STATIC_KSDATAFORMAT_FORMAT_NONE
  154. // STATIC_KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO
  155. // STATIC_KSDATAFORMAT_FORMAT_MPEG2_VIDEO
  156. STATIC_GUID_NULL
  157. };
  158. //--- 98.06.01 S.Watanabe
  159. ///*
  160. //
  161. // Define the NTSC Composite output format
  162. //
  163. // */
  164. //
  165. //KSDATAFORMAT hwfmtiNtscOut
  166. // = {
  167. // sizeof (KSDATAFORMAT),
  168. // 0,
  169. // 0,
  170. // 0,
  171. // STATIC_KSDATAFORMAT_TYPE_MPEG2_PES,
  172. // STATIC_KSDATAFORMAT_SUBTYPE_MPEG2_VIDEO,
  173. //// STATIC_KSDATAFORMAT_FORMAT_WAVEFORMATEX
  174. // STATIC_KSDATAFORMAT_SPECIFIER_WAVEFORMATEX
  175. // };
  176. //--- End.
  177. KSDATAFORMAT hwfmtiVPEOut
  178. = {
  179. sizeof (KSDATAFORMAT),
  180. 0,
  181. 0,
  182. 0,
  183. STATIC_KSDATAFORMAT_TYPE_VIDEO,
  184. STATIC_KSDATAFORMAT_SUBTYPE_VPVideo,
  185. // STATIC_KSDATAFORMAT_TYPE_VIDEO,
  186. STATIC_KSDATAFORMAT_SPECIFIER_NONE
  187. // STATIC_KSDATAFORMAT_TYPE_VIDEO
  188. };
  189. KSDATAFORMAT hwfmtiCCOut
  190. = {
  191. sizeof(KSDATAFORMAT),
  192. 0,
  193. 200,
  194. 0,
  195. STATIC_KSDATAFORMAT_TYPE_AUXLine21Data,
  196. STATIC_KSDATAFORMAT_SUBTYPE_Line21_GOPPacket,
  197. // STATIC_KSDATAFORMAT_SPECIFIER_VIDEOINFO // 98.12.18 H.Yagi commented out
  198. STATIC_KSDATAFORMAT_SPECIFIER_NONE // 98.12.18 H.Yagi added
  199. };
  200. //--- 98.05.21 S.Watanabe
  201. KSDATAFORMAT hwfmtiSS
  202. = {
  203. sizeof(KSDATAFORMAT),
  204. 0,
  205. 0,
  206. 0,
  207. STATIC_DATAFORMAT_TYPE_DEVIO,
  208. STATIC_DATAFORMAT_SUBTYPE_DEVIO,
  209. STATIC_DATAFORMAT_FORMAT_DEVIO
  210. };
  211. //--- End.
  212. //
  213. // this array indicates that stream 0 (as constructed in sscmd.c) supports
  214. // the MPEG 2 video format. If stream zero supported more formats, the
  215. // addresses of these formats would be additional elements in this array.
  216. //
  217. PKSDATAFORMAT Mpeg2VidInfo[] = {
  218. &hwfmtiMpeg2Vid // pointer to the MPEG 2 video format block
  219. };
  220. //
  221. // this structure indicates that stream 1 (as constructed in sscmd.c) supports
  222. // the MPEG 2 audio format. If stream 1 supported more formats, the
  223. // addresses of these formats would be additional elements in this array.
  224. //
  225. // This stream also supports LPCM, and the second element of this array now
  226. // makes this fact known to KS. See the comment about LPCM's WAVEFORMATEX
  227. // above, however.
  228. PKSDATAFORMAT Mpeg2AudInfo[] = {
  229. //--- 98.06.01 S.Watanabe
  230. // hwfmtiMpeg2Aud, // pointer to the MPEG 2 audio format block
  231. (PKSDATAFORMAT) hwfmtiMpeg2Aud, // pointer to the Mpeg2 format
  232. (PKSDATAFORMAT) hwfmtiLPCMAud // pointer to the LPCM format
  233. //--- End.
  234. };
  235. // Sub-pic
  236. PKSDATAFORMAT Mpeg2SubpicInfo[] = {
  237. &hwfmtiMpeg2Subpic // pointer to the MPEG 2 subpic format block
  238. };
  239. //--- 98.06.01 S.Watanabe
  240. ////
  241. //// this structure indicates that stream 2 (as constructed in sscmd.c) supports
  242. //// the NTSC composite format. If stream 1 supported more formats, the
  243. //// addresses of these formats would be additional elements in this array.
  244. ////
  245. //
  246. //PKSDATAFORMAT NtscInfo[] = {
  247. // &hwfmtiNtscOut // pointer to the NTSC format block
  248. //};
  249. //--- End.
  250. PKSDATAFORMAT VPEInfo[] = {
  251. &hwfmtiVPEOut
  252. };
  253. PKSDATAFORMAT CCInfo[] = { // CC output formats array
  254. &hwfmtiCCOut
  255. };
  256. //--- 98.05.21 S.Watanabe
  257. PKSDATAFORMAT SSInfo[] = { // Special Stream formats array
  258. &hwfmtiSS
  259. };
  260. //--- End.
  261. /*****************************************************************************
  262. define the Individual property items for the video property sets
  263. *****************************************************************************/
  264. // Video
  265. static const KSPROPERTY_ITEM mpegVidPropItm[]={
  266. {KSPROPERTY_DVDSUBPIC_PALETTE,
  267. FALSE,
  268. sizeof(KSPROPERTY),
  269. sizeof(KSPROPERTY_SPPAL),
  270. (PFNKSHANDLER) FALSE,
  271. NULL,
  272. 0,
  273. NULL,
  274. NULL,
  275. 0
  276. }};
  277. // Audio
  278. static const KSPROPERTY_ITEM audPropItm[] = {
  279. {KSPROPERTY_AUDDECOUT_MODES,// available audio decoder output formats
  280. // property
  281. (PFNKSHANDLER) TRUE, // get available modes is supported
  282. sizeof(KSPROPERTY),
  283. sizeof(ULONG), // minimum size of data requested
  284. (PFNKSHANDLER) FALSE, // set available modes is not supported
  285. NULL,
  286. 0,
  287. NULL,
  288. NULL,
  289. 0
  290. },
  291. {KSPROPERTY_AUDDECOUT_CUR_MODE, // current audio decoder output format
  292. // property
  293. (PFNKSHANDLER) TRUE, // get current mode is supported
  294. sizeof(KSPROPERTY),
  295. sizeof(ULONG), // minimum size of data requested
  296. (PFNKSHANDLER) TRUE, // set current modes is supported
  297. NULL,
  298. 0,
  299. NULL,
  300. NULL,
  301. 0
  302. }
  303. };
  304. // Sub-pic
  305. static const KSPROPERTY_ITEM spPropItm[]={
  306. {KSPROPERTY_DVDSUBPIC_PALETTE,
  307. FALSE,
  308. sizeof (KSPROPERTY),
  309. sizeof (KSPROPERTY_SPPAL),
  310. (PFNKSHANDLER) TRUE,
  311. NULL,
  312. 0,
  313. NULL,
  314. NULL,
  315. 0
  316. },
  317. {KSPROPERTY_DVDSUBPIC_HLI,
  318. FALSE,
  319. sizeof (KSPROPERTY),
  320. sizeof (KSPROPERTY_SPHLI),
  321. (PFNKSHANDLER)TRUE,
  322. NULL,
  323. 0,
  324. NULL,
  325. NULL,
  326. 0
  327. },
  328. {KSPROPERTY_DVDSUBPIC_COMPOSIT_ON,
  329. FALSE,
  330. sizeof (KSPROPERTY),
  331. sizeof (KSPROPERTY_COMPOSIT_ON),
  332. (PFNKSHANDLER)TRUE,
  333. NULL,
  334. 0,
  335. NULL,
  336. NULL,
  337. 0
  338. }
  339. };
  340. // NTSC
  341. static const KSPROPERTY_ITEM MacroVisionPropItm[] = {
  342. {
  343. KSPROPERTY_COPY_MACROVISION, // support for setting macrovision level
  344. (PFNKSHANDLER) FALSE, // get not supported
  345. sizeof (KSPROPERTY),
  346. sizeof (KS_COPY_MACROVISION),
  347. (PFNKSHANDLER) TRUE, // set MACROVISION level supported
  348. NULL,
  349. 0,
  350. NULL,
  351. NULL,
  352. 0
  353. }
  354. };
  355. // VPE
  356. static /* const */ KSPROPERTY_ITEM VideoPortPropItm[]={
  357. {
  358. KSPROPERTY_VPCONFIG_NUMCONNECTINFO,
  359. (PFNKSHANDLER) TRUE,
  360. sizeof(KSPROPERTY),
  361. sizeof(ULONG),
  362. (PFNKSHANDLER) FALSE,
  363. NULL,
  364. 0,
  365. NULL,
  366. NULL,
  367. 0
  368. },
  369. {
  370. KSPROPERTY_VPCONFIG_NUMVIDEOFORMAT,
  371. (PFNKSHANDLER) TRUE,
  372. sizeof(KSPROPERTY),
  373. sizeof(ULONG),
  374. (PFNKSHANDLER) FALSE,
  375. NULL,
  376. 0,
  377. NULL,
  378. NULL,
  379. 0
  380. },
  381. {
  382. KSPROPERTY_VPCONFIG_GETCONNECTINFO,
  383. (PFNKSHANDLER) TRUE,
  384. sizeof (KSMULTIPLE_DATA_PROP), // minimum property input size
  385. sizeof (ULONG),
  386. (PFNKSHANDLER)FALSE,
  387. NULL,
  388. 0,
  389. NULL,
  390. NULL,
  391. 0
  392. },
  393. {
  394. KSPROPERTY_VPCONFIG_SETCONNECTINFO,
  395. (PFNKSHANDLER) FALSE,
  396. sizeof (KSPROPERTY), // minimum property input size
  397. sizeof (ULONG), // minimum buffer size
  398. (PFNKSHANDLER)TRUE,
  399. NULL,
  400. 0,
  401. NULL,
  402. NULL,
  403. 0
  404. },
  405. {
  406. KSPROPERTY_VPCONFIG_VPDATAINFO,
  407. (PFNKSHANDLER) TRUE,
  408. sizeof (KSPROPERTY),
  409. sizeof (KS_AMVPDATAINFO),
  410. (PFNKSHANDLER)FALSE,
  411. NULL,
  412. 0,
  413. NULL,
  414. NULL,
  415. 0
  416. },
  417. {
  418. KSPROPERTY_VPCONFIG_MAXPIXELRATE,
  419. (PFNKSHANDLER) TRUE,
  420. sizeof (KSVPSIZE_PROP),
  421. sizeof (KSVPMAXPIXELRATE),
  422. (PFNKSHANDLER)FALSE,
  423. NULL,
  424. 0,
  425. NULL,
  426. NULL,
  427. 0
  428. },
  429. {
  430. KSPROPERTY_VPCONFIG_INFORMVPINPUT,
  431. (PFNKSHANDLER) TRUE,
  432. sizeof (PKSPROPERTY),
  433. sizeof (DDPIXELFORMAT), // could be 0 too
  434. (PFNKSHANDLER)FALSE,
  435. NULL,
  436. 0,
  437. NULL,
  438. NULL,
  439. 0
  440. },
  441. {
  442. KSPROPERTY_VPCONFIG_DDRAWHANDLE,
  443. (PFNKSHANDLER)FALSE,
  444. sizeof (PKSPROPERTY),
  445. sizeof (ULONG), // could be 0 too
  446. (PFNKSHANDLER) TRUE,
  447. NULL,
  448. 0,
  449. NULL,
  450. NULL,
  451. 0
  452. },
  453. {
  454. KSPROPERTY_VPCONFIG_VIDEOPORTID,
  455. (PFNKSHANDLER)FALSE,
  456. sizeof (PKSPROPERTY),
  457. sizeof (ULONG), // could be 0 too
  458. (PFNKSHANDLER) TRUE,
  459. NULL,
  460. 0,
  461. NULL,
  462. NULL,
  463. 0
  464. },
  465. {
  466. KSPROPERTY_VPCONFIG_DDRAWSURFACEHANDLE,
  467. (PFNKSHANDLER)FALSE,
  468. sizeof (PKSPROPERTY),
  469. sizeof (ULONG), // could be 0 too
  470. (PFNKSHANDLER) TRUE,
  471. NULL,
  472. 0,
  473. NULL,
  474. NULL,
  475. 0
  476. },
  477. {
  478. KSPROPERTY_VPCONFIG_GETVIDEOFORMAT,
  479. (PFNKSHANDLER) TRUE,
  480. sizeof (KSMULTIPLE_DATA_PROP), // for _GET; KSPROPERTY for _SET
  481. sizeof (ULONG), // could be 4 or more
  482. (PFNKSHANDLER)FALSE,
  483. NULL,
  484. 0,
  485. NULL,
  486. NULL,
  487. 0
  488. },
  489. {
  490. KSPROPERTY_VPCONFIG_SETVIDEOFORMAT,
  491. (PFNKSHANDLER) FALSE,
  492. sizeof (KSPROPERTY), // minimum property input size
  493. sizeof (ULONG), // minimum buffer size
  494. (PFNKSHANDLER)TRUE,
  495. NULL,
  496. 0,
  497. NULL,
  498. NULL,
  499. 0
  500. },
  501. {
  502. KSPROPERTY_VPCONFIG_INVERTPOLARITY,
  503. (PFNKSHANDLER)TRUE,
  504. sizeof (KSPROPERTY),
  505. 0,
  506. (PFNKSHANDLER)FALSE,
  507. NULL,
  508. 0,
  509. NULL,
  510. NULL,
  511. 0
  512. },
  513. {
  514. KSPROPERTY_VPCONFIG_DECIMATIONCAPABILITY,
  515. (PFNKSHANDLER)TRUE,
  516. sizeof (KSPROPERTY),
  517. sizeof (BOOL),
  518. (PFNKSHANDLER)FALSE,
  519. NULL,
  520. 0,
  521. NULL,
  522. NULL,
  523. 0
  524. },
  525. {
  526. KSPROPERTY_VPCONFIG_SCALEFACTOR,
  527. (PFNKSHANDLER)TRUE,
  528. sizeof (KSPROPERTY),
  529. sizeof (KS_AMVPSIZE),
  530. (PFNKSHANDLER)FALSE,
  531. NULL,
  532. 0,
  533. NULL,
  534. NULL,
  535. 0
  536. }
  537. };
  538. // CC
  539. static /* const */ KSPROPERTY_ITEM CCPropItm[] = {
  540. {
  541. KSPROPERTY_CONNECTION_ALLOCATORFRAMING, // support for setting CC buffer size
  542. (PFNKSHANDLER) TRUE, // get supported
  543. sizeof (KSPROPERTY),
  544. sizeof (KSALLOCATOR_FRAMING),
  545. (PFNKSHANDLER) FALSE, // we only provide the allocator requirments
  546. NULL,
  547. 0,
  548. NULL,
  549. NULL,
  550. 0
  551. },
  552. {
  553. KSPROPERTY_CONNECTION_STATE, // support for setting CC buffer size
  554. (PFNKSHANDLER) TRUE, // get supported
  555. sizeof (KSPROPERTY),
  556. sizeof (KSSTATE),
  557. (PFNKSHANDLER) FALSE, // we only provide the allocator requirments
  558. NULL,
  559. 0,
  560. NULL,
  561. NULL,
  562. 0
  563. }
  564. };
  565. // Copy Protect
  566. static const KSPROPERTY_ITEM cppPropItm[]={
  567. {
  568. KSPROPERTY_DVDCOPY_CHLG_KEY,
  569. (PFNKSHANDLER) TRUE,
  570. sizeof( KSPROPERTY ),
  571. sizeof( KS_DVDCOPY_CHLGKEY ),
  572. (PFNKSHANDLER) TRUE,
  573. NULL,
  574. 0,
  575. NULL,
  576. NULL,
  577. 0
  578. },
  579. {
  580. KSPROPERTY_DVDCOPY_DVD_KEY1,
  581. FALSE,
  582. sizeof( KSPROPERTY ),
  583. sizeof( KS_DVDCOPY_BUSKEY ),
  584. (PFNKSHANDLER) TRUE,
  585. NULL,
  586. 0,
  587. NULL,
  588. NULL,
  589. 0
  590. },
  591. {
  592. KSPROPERTY_DVDCOPY_DEC_KEY2,
  593. (PFNKSHANDLER) TRUE,
  594. sizeof( KSPROPERTY ),
  595. sizeof( KS_DVDCOPY_BUSKEY ),
  596. (PFNKSHANDLER) FALSE,
  597. NULL,
  598. 0,
  599. NULL,
  600. NULL,
  601. 0
  602. },
  603. {
  604. KSPROPERTY_DVDCOPY_TITLE_KEY,
  605. FALSE,
  606. sizeof( KSPROPERTY ),
  607. sizeof( KS_DVDCOPY_TITLEKEY ),
  608. (PFNKSHANDLER) TRUE,
  609. NULL,
  610. 0,
  611. NULL,
  612. NULL,
  613. 0
  614. },
  615. {
  616. KSPROPERTY_DVDCOPY_DISC_KEY,
  617. FALSE,
  618. sizeof( KSPROPERTY ),
  619. sizeof( KS_DVDCOPY_DISCKEY ),
  620. (PFNKSHANDLER) TRUE,
  621. NULL,
  622. 0,
  623. NULL,
  624. NULL,
  625. 0
  626. },
  627. {
  628. KSPROPERTY_DVDCOPY_SET_COPY_STATE,
  629. (PFNKSHANDLER)TRUE,
  630. sizeof( KSPROPERTY ),
  631. sizeof( KS_DVDCOPY_SET_COPY_STATE ),
  632. (PFNKSHANDLER) TRUE,
  633. NULL,
  634. 0,
  635. NULL,
  636. NULL,
  637. 0
  638. },
  639. // {KSPROPERTY_DVDCOPY_REGION, // DVD region request
  640. // // the minidriver shall fit in exactly
  641. // // one region bit, corresponding to the region
  642. // // that the decoder is currently in
  643. // (PFNKSHANDLER)TRUE,
  644. // sizeof(KSPROPERTY),
  645. // sizeof(KS_DVDCOPY_REGION), // minimum size of data requested
  646. // (PFNKSHANDLER)FALSE, // set key is not valid
  647. // NULL,
  648. // 0,
  649. // NULL,
  650. // NULL,
  651. // 0
  652. // },
  653. //--- 97.11.27 S.Watanabe
  654. {
  655. KSPROPERTY_COPY_MACROVISION, // support for setting macrovision level
  656. (PFNKSHANDLER) FALSE, // get not supported
  657. sizeof (KSPROPERTY),
  658. sizeof (KS_COPY_MACROVISION),
  659. (PFNKSHANDLER) TRUE, // set MACROVISION level supported
  660. NULL,
  661. 0,
  662. NULL,
  663. NULL,
  664. 0
  665. },
  666. //--- End.
  667. };
  668. // Rate Change
  669. static const KSPROPERTY_ITEM RateChangePropItm[]={
  670. {
  671. KS_AM_RATE_SimpleRateChange,
  672. (PFNKSHANDLER) TRUE,
  673. sizeof (KSPROPERTY),
  674. sizeof (KS_AM_SimpleRateChange),
  675. (PFNKSHANDLER) TRUE,
  676. NULL,
  677. 0,
  678. NULL,
  679. NULL,
  680. 0,
  681. },
  682. {
  683. KS_AM_RATE_ExactRateChange,
  684. (PFNKSHANDLER) FALSE,
  685. sizeof (KSPROPERTY),
  686. sizeof (KS_AM_ExactRateChange),
  687. (PFNKSHANDLER) FALSE,
  688. NULL,
  689. 0,
  690. NULL,
  691. NULL,
  692. 0,
  693. },
  694. {
  695. KS_AM_RATE_MaxFullDataRate,
  696. (PFNKSHANDLER) TRUE,
  697. sizeof (KSPROPERTY),
  698. sizeof (KS_AM_MaxFullDataRate),
  699. (PFNKSHANDLER) FALSE,
  700. NULL,
  701. 0,
  702. NULL,
  703. NULL,
  704. 0,
  705. },
  706. {
  707. KS_AM_RATE_Step,
  708. (PFNKSHANDLER) FALSE,
  709. sizeof (KSPROPERTY),
  710. sizeof (KS_AM_Step),
  711. (PFNKSHANDLER) TRUE,
  712. NULL,
  713. 0,
  714. NULL,
  715. NULL,
  716. 0,
  717. }
  718. };
  719. /*****************************************************************************
  720. define the array of video property sets supported
  721. *****************************************************************************/
  722. //GUID Mpeg2Vid = {STATIC_KSPROPSETID_Mpeg2Vid};
  723. // original is const
  724. // modify for except warning
  725. static /* const*/ KSPROPERTY_SET mpegVidPropSet[] = {
  726. {
  727. &KSPROPSETID_Mpeg2Vid,
  728. SIZEOF_ARRAY(mpegVidPropItm),
  729. (PKSPROPERTY_ITEM)mpegVidPropItm
  730. },
  731. {
  732. &KSPROPSETID_CopyProt,
  733. SIZEOF_ARRAY(cppPropItm),
  734. (PKSPROPERTY_ITEM)cppPropItm
  735. },
  736. {
  737. &KSPROPSETID_TSRateChange,
  738. SIZEOF_ARRAY(RateChangePropItm),
  739. (PKSPROPERTY_ITEM)RateChangePropItm
  740. }
  741. };
  742. static /* const*/ KSPROPERTY_SET mpegAudioPropSet[] = {
  743. {
  744. &KSPROPSETID_AudioDecoderOut,
  745. SIZEOF_ARRAY(audPropItm),
  746. (PKSPROPERTY_ITEM) audPropItm
  747. },
  748. {
  749. &KSPROPSETID_CopyProt,
  750. SIZEOF_ARRAY(cppPropItm),
  751. (PKSPROPERTY_ITEM)cppPropItm
  752. },
  753. {
  754. &KSPROPSETID_TSRateChange,
  755. SIZEOF_ARRAY(RateChangePropItm),
  756. (PKSPROPERTY_ITEM)RateChangePropItm
  757. }
  758. };
  759. static KSPROPERTY_SET SPPropSet[] = {
  760. {
  761. &KSPROPSETID_DvdSubPic,
  762. SIZEOF_ARRAY(spPropItm),
  763. (PKSPROPERTY_ITEM)spPropItm
  764. },
  765. {
  766. &KSPROPSETID_CopyProt,
  767. SIZEOF_ARRAY(cppPropItm),
  768. (PKSPROPERTY_ITEM)cppPropItm
  769. },
  770. {
  771. &KSPROPSETID_TSRateChange,
  772. SIZEOF_ARRAY(RateChangePropItm),
  773. (PKSPROPERTY_ITEM)RateChangePropItm
  774. }
  775. };
  776. //--- 98.06.01 S.Watanabe
  777. //static KSPROPERTY_SET NTSCPropSet[] = {
  778. // &KSPROPSETID_CopyProt,
  779. // SIZEOF_ARRAY(MacroVisionPropItm),
  780. // (PKSPROPERTY_ITEM) MacroVisionPropItm
  781. //};
  782. //--- End.
  783. GUID vpePropSetid = {STATIC_KSPROPSETID_VPConfig};
  784. static /* const */ KSPROPERTY_SET VideoPortPropSet[] = {
  785. &vpePropSetid,
  786. SIZEOF_ARRAY(VideoPortPropItm),
  787. (PKSPROPERTY_ITEM)VideoPortPropItm
  788. };
  789. static /* const */ KSPROPERTY_SET CCPropSet[] = {
  790. &KSPROPSETID_Connection,
  791. SIZEOF_ARRAY(CCPropItm),
  792. (PKSPROPERTY_ITEM) CCPropItm
  793. };
  794. /*****************************************************************************
  795. other
  796. *****************************************************************************/
  797. static const KSTOPOLOGY Topology = {
  798. 1,
  799. (GUID *) & KSCATEGORY_DATADECOMPRESSOR,
  800. 0,
  801. NULL,
  802. 0,
  803. NULL
  804. };
  805. KSEVENT_ITEM VPEventItm[] =
  806. {
  807. {
  808. KSEVENT_VPNOTIFY_FORMATCHANGE,
  809. 0,
  810. 0,
  811. NULL,
  812. NULL,
  813. NULL
  814. }
  815. };
  816. GUID MY_KSEVENTSETID_VPNOTIFY = {STATIC_KSEVENTSETID_VPNotify};
  817. KSEVENT_SET VPEventSet[] =
  818. {
  819. {
  820. &MY_KSEVENTSETID_VPNOTIFY,
  821. SIZEOF_ARRAY(VPEventItm),
  822. VPEventItm,
  823. }
  824. };
  825. KSEVENT_ITEM ClockEventItm[] =
  826. {
  827. {
  828. KSEVENT_CLOCK_POSITION_MARK, // position mark event supported
  829. sizeof (KSEVENT_TIME_MARK), // requires this data as input
  830. sizeof (KSEVENT_TIME_MARK), // allocate space to copy the data
  831. NULL,
  832. NULL,
  833. NULL
  834. },
  835. {
  836. KSEVENT_CLOCK_INTERVAL_MARK, // interval mark event supported
  837. sizeof (KSEVENT_TIME_INTERVAL), // requires interval data as input
  838. sizeof (MYTIME), // we use an additional workspace of
  839. // size longlong for processing
  840. // this event
  841. NULL,
  842. NULL,
  843. NULL
  844. }
  845. };
  846. KSEVENT_SET ClockEventSet[] =
  847. {
  848. {
  849. &KSEVENTSETID_Clock,
  850. SIZEOF_ARRAY(ClockEventItm),
  851. ClockEventItm,
  852. }
  853. };
  854. // device property
  855. typedef struct _DevPropData {
  856. DWORD data;
  857. } DEVPROPDATA, *PDEVPROPDATA;
  858. static const KSPROPERTY_ITEM devicePropItm[]={
  859. {0,
  860. (PFNKSHANDLER)TRUE,
  861. sizeof(KSPROPERTY),
  862. sizeof(DEVPROPDATA),
  863. (PFNKSHANDLER)TRUE,
  864. NULL,
  865. 0,
  866. NULL,
  867. NULL,
  868. 0
  869. }};
  870. static /* const*/ KSPROPERTY_SET devicePropSet[] = {
  871. &GUID_NULL,
  872. SIZEOF_ARRAY(devicePropItm),
  873. (PKSPROPERTY_ITEM)devicePropItm
  874. };