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.

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