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.

1570 lines
66 KiB

  1. /*++
  2. Copyright (C) Microsoft Corporation, 1999 - 2001
  3. Module Name:
  4. StrmData.h
  5. Abstract:
  6. Header file for supporting SD DV over 1394;
  7. Last changed by:
  8. Author: Yee J. Wu
  9. --*/
  10. #ifndef _DVSTRM_INC
  11. #define _DVSTRM_INC
  12. #define STATIC_KSCATEGORY_RENDER_EXTERNAL \
  13. 0xcc7bfb41L, 0xf175, 0x11d1, 0xa3, 0x92, 0x00, 0xe0, 0x29, 0x1f, 0x39, 0x59
  14. DEFINE_GUIDSTRUCT("cc7bfb41-f175-11d1-a392-00e0291f3959", KSCATEGORY_RENDER_EXTERNAL);
  15. #define KSCATEGORY_RENDER_EXTERNAL DEFINE_GUIDNAMED(KSCATEGORY_RENDER_EXTERNAL)
  16. // stream topology stuff
  17. static GUID Categories[] = {
  18. STATIC_KSCATEGORY_VIDEO, // Output pin
  19. STATIC_KSCATEGORY_CAPTURE, // Output pin
  20. STATIC_KSCATEGORY_RENDER, // Input pin
  21. STATIC_KSCATEGORY_RENDER_EXTERNAL, // Input pin
  22. };
  23. #define NUMBER_OF_CATEGORIES SIZEOF_ARRAY (Categories)
  24. static KSTOPOLOGY Topology = {
  25. NUMBER_OF_CATEGORIES, // CategoriesCount
  26. Categories, // Categories
  27. 0, // TopologyNodesCount
  28. NULL, // TopologyNodes
  29. 0, // TopologyConnectionsCount
  30. NULL, // TopologyConnections
  31. NULL, // TopologyNodesNames
  32. 0, // Reserved
  33. };
  34. #ifndef mmioFOURCC
  35. #define mmioFOURCC( ch0, ch1, ch2, ch3 ) \
  36. ( (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ) | \
  37. ( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) )
  38. #endif
  39. #define FOURCC_DVSD mmioFOURCC('d', 'v', 's', 'd')
  40. #define FOURCC_DVSL mmioFOURCC('d', 'v', 's', 'l')
  41. #define FOURCC_DVHD mmioFOURCC('d', 'v', 'h', 'd')
  42. #undef D_X_NTSC
  43. #undef D_Y_NTSC
  44. #undef D_X_NTSC_MIN
  45. #undef D_Y_NTSC_MIN
  46. #undef D_X_PAL
  47. #undef D_Y_PAL
  48. #undef D_X_PAL_MIN
  49. #undef D_Y_PAL_MIN
  50. #define D_X_NTSC 720
  51. #define D_Y_NTSC 480
  52. #define D_X_NTSC_MIN 360
  53. #define D_Y_NTSC_MIN 240
  54. #define D_X_PAL 720
  55. #define D_Y_PAL 576
  56. #define D_X_PAL_MIN 360
  57. #define D_Y_PAL_MIN 288
  58. // ------------------------------------------------------------------------
  59. // External Device PROPERTY
  60. // ------------------------------------------------------------------------
  61. DEFINE_KSPROPERTY_TABLE(ExternalDeviceProperties)
  62. {
  63. DEFINE_KSPROPERTY_ITEM
  64. (
  65. KSPROPERTY_EXTDEVICE_CAPABILITIES,
  66. TRUE, // GetSupported or Handler
  67. sizeof(KSPROPERTY), // MinProperty
  68. sizeof(KSPROPERTY_EXTDEVICE_S), // MinData
  69. FALSE, // SetSupported or Handler
  70. NULL, // Values
  71. 0, // RelationsCount
  72. NULL, // Relations
  73. NULL, // SupportHandler
  74. sizeof(ULONG) // SerializedSize
  75. ),
  76. DEFINE_KSPROPERTY_ITEM
  77. (
  78. KSPROPERTY_EXTDEVICE_PORT,
  79. TRUE, // GetSupported or Handler
  80. sizeof(KSPROPERTY), // MinProperty
  81. sizeof(KSPROPERTY_EXTDEVICE_S), // MinData
  82. FALSE, // SetSupported or Handler
  83. NULL, // Values
  84. 0, // RelationsCount
  85. NULL, // Relations
  86. NULL, // SupportHandler
  87. sizeof(ULONG) // SerializedSize
  88. ),
  89. DEFINE_KSPROPERTY_ITEM
  90. (
  91. KSPROPERTY_EXTDEVICE_POWER_STATE,
  92. TRUE, // GetSupported or Handler
  93. sizeof(KSPROPERTY), // MinProperty
  94. sizeof(KSPROPERTY_EXTDEVICE_S), // MinData
  95. FALSE, // SetSupported or Handler
  96. NULL, // Values
  97. 0, // RelationsCount
  98. NULL, // Relations
  99. NULL, // SupportHandler
  100. sizeof(ULONG) // SerializedSize
  101. ),
  102. DEFINE_KSPROPERTY_ITEM
  103. (
  104. KSPROPERTY_EXTDEVICE_ID,
  105. TRUE, // GetSupported or Handler
  106. sizeof(KSPROPERTY), // MinProperty
  107. sizeof(KSPROPERTY_EXTDEVICE_S), // MinData
  108. FALSE, // SetSupported or Handler
  109. NULL, // Values
  110. 0, // RelationsCount
  111. NULL, // Relations
  112. NULL, // SupportHandler
  113. sizeof(ULONG) // SerializedSize
  114. ),
  115. DEFINE_KSPROPERTY_ITEM
  116. (
  117. KSPROPERTY_EXTDEVICE_VERSION,
  118. TRUE, // GetSupported or Handler
  119. sizeof(KSPROPERTY), // MinProperty
  120. sizeof(KSPROPERTY_EXTDEVICE_S), // MinData
  121. FALSE, // SetSupported or Handler
  122. NULL, // Values
  123. 0, // RelationsCount
  124. NULL, // Relations
  125. NULL, // SupportHandler
  126. sizeof(ULONG) // SerializedSize
  127. ),
  128. };
  129. DEFINE_KSPROPERTY_TABLE(ExternalTransportProperties)
  130. {
  131. DEFINE_KSPROPERTY_ITEM
  132. (
  133. KSPROPERTY_EXTXPORT_CAPABILITIES,
  134. TRUE, // GetSupported or Handler
  135. sizeof(KSPROPERTY), // MinProperty
  136. sizeof(KSPROPERTY_EXTXPORT_S), // MinData
  137. FALSE, // SetSupported or Handler
  138. NULL, // Values
  139. 0, // RelationsCount
  140. NULL, // Relations
  141. NULL, // SupportHandler
  142. sizeof(ULONG) // SerializedSize
  143. ),
  144. DEFINE_KSPROPERTY_ITEM
  145. (
  146. KSPROPERTY_EXTXPORT_INPUT_SIGNAL_MODE,
  147. TRUE, // GetSupported or Handler
  148. sizeof(KSPROPERTY), // MinProperty
  149. sizeof(KSPROPERTY_EXTXPORT_S), // MinData
  150. FALSE, // SetSupported or Handler
  151. NULL, // Values
  152. 0, // RelationsCount
  153. NULL, // Relations
  154. NULL, // SupportHandler
  155. sizeof(ULONG) // SerializedSize
  156. ),
  157. DEFINE_KSPROPERTY_ITEM
  158. (
  159. KSPROPERTY_EXTXPORT_OUTPUT_SIGNAL_MODE,
  160. TRUE, // GetSupported or Handler
  161. sizeof(KSPROPERTY), // MinProperty
  162. sizeof(KSPROPERTY_EXTXPORT_S), // MinData
  163. FALSE, // SetSupported or Handler
  164. NULL, // Values
  165. 0, // RelationsCount
  166. NULL, // Relations
  167. NULL, // SupportHandler
  168. sizeof(ULONG) // SerializedSize
  169. ),
  170. DEFINE_KSPROPERTY_ITEM
  171. (
  172. KSPROPERTY_EXTXPORT_LOAD_MEDIUM,
  173. FALSE, // GetSupported or Handler
  174. sizeof(KSPROPERTY), // MinProperty
  175. sizeof(KSPROPERTY_EXTXPORT_S), // MinData
  176. TRUE, // SetSupported or Handler
  177. NULL, // Values
  178. 0, // RelationsCount
  179. NULL, // Relations
  180. NULL, // SupportHandler
  181. sizeof(ULONG) // SerializedSize
  182. ),
  183. DEFINE_KSPROPERTY_ITEM
  184. (
  185. KSPROPERTY_EXTXPORT_MEDIUM_INFO,
  186. TRUE, // GetSupported or Handler
  187. sizeof(KSPROPERTY), // MinProperty
  188. sizeof(KSPROPERTY_EXTXPORT_S), // MinData
  189. FALSE, // SetSupported or Handler
  190. NULL, // Values
  191. 0, // RelationsCount
  192. NULL, // Relations
  193. NULL, // SupportHandler
  194. sizeof(ULONG) // SerializedSize
  195. ),
  196. DEFINE_KSPROPERTY_ITEM
  197. (
  198. KSPROPERTY_EXTXPORT_STATE,
  199. TRUE, // GetSupported or Handler
  200. sizeof(KSPROPERTY), // MinProperty
  201. sizeof(KSPROPERTY_EXTXPORT_S), // MinData
  202. TRUE, // SetSupported or Handler
  203. NULL, // Values
  204. 0, // RelationsCount
  205. NULL, // Relations
  206. NULL, // SupportHandler
  207. sizeof(ULONG) // SerializedSize
  208. ),
  209. DEFINE_KSPROPERTY_ITEM
  210. (
  211. // If this is an asychronous operation, we need to set and then get in separate calls.
  212. KSPROPERTY_EXTXPORT_STATE_NOTIFY,
  213. TRUE, // GetSupported or Handler
  214. sizeof(KSPROPERTY), // MinProperty
  215. sizeof(KSPROPERTY_EXTXPORT_S), // MinData
  216. TRUE, // SetSupported or Handler
  217. NULL, // Values
  218. 0, // RelationsCount
  219. NULL, // Relations
  220. NULL, // SupportHandler
  221. sizeof(ULONG) // SerializedSize
  222. ),
  223. DEFINE_KSPROPERTY_ITEM
  224. (
  225. KSPROPERTY_EXTXPORT_TIMECODE_SEARCH,
  226. FALSE, // GetSupported or Handler
  227. sizeof(KSPROPERTY), // MinProperty
  228. sizeof(KSPROPERTY_EXTXPORT_S), // MinData
  229. TRUE, // SetSupported or Handler
  230. NULL, // Values
  231. 0, // RelationsCount
  232. NULL, // Relations
  233. NULL, // SupportHandler
  234. sizeof(ULONG) // SerializedSize
  235. ),
  236. DEFINE_KSPROPERTY_ITEM
  237. (
  238. KSPROPERTY_EXTXPORT_ATN_SEARCH,
  239. FALSE, // GetSupported or Handler
  240. sizeof(KSPROPERTY), // MinProperty
  241. sizeof(KSPROPERTY_EXTXPORT_S), // MinData
  242. TRUE, // SetSupported or Handler
  243. NULL, // Values
  244. 0, // RelationsCount
  245. NULL, // Relations
  246. NULL, // SupportHandler
  247. sizeof(ULONG) // SerializedSize
  248. ),
  249. DEFINE_KSPROPERTY_ITEM
  250. (
  251. KSPROPERTY_EXTXPORT_RTC_SEARCH,
  252. FALSE, // GetSupported or Handler
  253. sizeof(KSPROPERTY), // MinProperty
  254. sizeof(KSPROPERTY_EXTXPORT_S), // MinData
  255. TRUE, // SetSupported or Handler
  256. NULL, // Values
  257. 0, // RelationsCount
  258. NULL, // Relations
  259. NULL, // SupportHandler
  260. sizeof(ULONG) // SerializedSize
  261. ),
  262. //
  263. // Allow any RAW AVC to go through including Vendor dependent
  264. //
  265. DEFINE_KSPROPERTY_ITEM
  266. (
  267. KSPROPERTY_RAW_AVC_CMD,
  268. TRUE, // GetSupported or Handler
  269. sizeof(KSPROPERTY), // MinProperty
  270. sizeof(KSPROPERTY_EXTXPORT_S), // MinData
  271. TRUE, // SetSupported or Handler
  272. NULL, // Values
  273. 0, // RelationsCount
  274. NULL, // Relations
  275. NULL, // SupportHandler
  276. sizeof(ULONG) // SerializedSize
  277. ),
  278. };
  279. DEFINE_KSPROPERTY_TABLE(TimeCodeReaderProperties)
  280. {
  281. DEFINE_KSPROPERTY_ITEM
  282. (
  283. KSPROPERTY_TIMECODE_READER,
  284. TRUE, // GetSupported or Handler
  285. sizeof(KSPROPERTY), // MinProperty
  286. sizeof(KSPROPERTY_TIMECODE_S), // MinData
  287. FALSE, // SetSupported or Handler
  288. NULL, // Values
  289. 0, // RelationsCount
  290. NULL, // Relations
  291. NULL, // SupportHandler
  292. sizeof(ULONG) // SerializedSize
  293. ),
  294. DEFINE_KSPROPERTY_ITEM
  295. (
  296. KSPROPERTY_ATN_READER,
  297. TRUE, // GetSupported or Handler
  298. sizeof(KSPROPERTY), // MinProperty
  299. sizeof(KSPROPERTY_TIMECODE_S), // MinData
  300. FALSE, // SetSupported or Handler
  301. NULL, // Values
  302. 0, // RelationsCount
  303. NULL, // Relations
  304. NULL, // SupportHandler
  305. sizeof(ULONG) // SerializedSize
  306. ),
  307. DEFINE_KSPROPERTY_ITEM
  308. (
  309. KSPROPERTY_RTC_READER,
  310. TRUE, // GetSupported or Handler
  311. sizeof(KSPROPERTY), // MinProperty
  312. sizeof(KSPROPERTY_TIMECODE_S), // MinData
  313. FALSE, // SetSupported or Handler
  314. NULL, // Values
  315. 0, // RelationsCount
  316. NULL, // Relations
  317. NULL, // SupportHandler
  318. sizeof(ULONG) // SerializedSize
  319. ),
  320. };
  321. DEFINE_KSPROPERTY_TABLE(MediaSeekingProperties)
  322. {
  323. DEFINE_KSPROPERTY_ITEM
  324. (
  325. // Corresponding to IMediaSeeking::IsFormatSupported()
  326. KSPROPERTY_MEDIASEEKING_FORMATS,
  327. TRUE, // GetSupported or Handler
  328. sizeof(KSPROPERTY), // MinProperty
  329. 0, // MinData; MULTIPLE_ITEM, 2 step process to get data
  330. FALSE, // SetSupported or Handler
  331. NULL, // Values
  332. 0, // RelationsCount
  333. NULL, // Relations
  334. NULL, // SupportHandler
  335. sizeof(ULONG) // SerializedSize
  336. ),
  337. };
  338. KSPROPERTY_SET VideoDeviceProperties[] =
  339. {
  340. DEFINE_KSPROPERTY_SET
  341. (
  342. &PROPSETID_EXT_DEVICE, // Set
  343. SIZEOF_ARRAY(ExternalDeviceProperties), // PropertiesCount
  344. ExternalDeviceProperties, // PropertyItem
  345. 0, // FastIoCount
  346. NULL // FastIoTable
  347. ),
  348. DEFINE_KSPROPERTY_SET
  349. (
  350. &PROPSETID_EXT_TRANSPORT, // Set
  351. SIZEOF_ARRAY(ExternalTransportProperties), // PropertiesCount
  352. ExternalTransportProperties, // PropertyItem
  353. 0, // FastIoCount
  354. NULL // FastIoTable
  355. ),
  356. DEFINE_KSPROPERTY_SET
  357. (
  358. &PROPSETID_TIMECODE_READER, // Set
  359. SIZEOF_ARRAY(TimeCodeReaderProperties), // PropertiesCount
  360. TimeCodeReaderProperties, // PropertyItem
  361. 0, // FastIoCount
  362. NULL // FastIoTable
  363. ),
  364. DEFINE_KSPROPERTY_SET
  365. (
  366. &KSPROPSETID_MediaSeeking, // Set
  367. SIZEOF_ARRAY(MediaSeekingProperties), // PropertiesCount
  368. MediaSeekingProperties, // PropertyItem
  369. 0, // FastIoCount
  370. NULL // FastIoTable
  371. ),
  372. };
  373. #define NUMBER_VIDEO_DEVICE_PROPERTIES (SIZEOF_ARRAY(VideoDeviceProperties))
  374. // ------------------------------------------------------------------------
  375. // External Device Events
  376. // ------------------------------------------------------------------------
  377. KSEVENT_ITEM ExtDevCommandItm[] =
  378. {
  379. {
  380. KSEVENT_EXTDEV_COMMAND_NOTIFY_INTERIM_READY,
  381. 0, // sizeof(KSEVENT_ITEM),
  382. 0,
  383. NULL,
  384. NULL,
  385. NULL
  386. },
  387. {
  388. KSEVENT_EXTDEV_COMMAND_CONTROL_INTERIM_READY,
  389. 0, // sizeof(KSEVENT_ITEM),
  390. 0,
  391. NULL,
  392. NULL,
  393. NULL
  394. },
  395. #ifdef MSDVDV_SUPPORT_BUSRESET_EVENT
  396. // Application cares about this since AVC command will be ABORTED!
  397. {
  398. KSEVENT_EXTDEV_COMMAND_BUSRESET,
  399. 0, // sizeof(KSEVENT_ITEM),
  400. 0,
  401. NULL,
  402. NULL,
  403. NULL
  404. },
  405. #endif
  406. // Tell client this device is being removed.
  407. {
  408. KSEVENT_EXTDEV_NOTIFY_REMOVAL,
  409. 0, // sizeof(KSEVENT_ITEM),
  410. 0,
  411. NULL,
  412. NULL,
  413. NULL
  414. },
  415. };
  416. // define event set related with streams
  417. KSEVENT_SET VideoDeviceEvents[] =
  418. {
  419. {
  420. &KSEVENTSETID_EXTDEV_Command,
  421. SIZEOF_ARRAY(ExtDevCommandItm),
  422. ExtDevCommandItm,
  423. },
  424. };
  425. #define NUMBER_VIDEO_DEVICE_EVENTS (SIZEOF_ARRAY(VideoDeviceEvents))
  426. // ------------------------------------------------------------------------
  427. // Stream Property sets for all video capture streams
  428. // ------------------------------------------------------------------------
  429. DEFINE_KSPROPERTY_TABLE(VideoStreamConnectionProperties)
  430. {
  431. DEFINE_KSPROPERTY_ITEM
  432. (
  433. KSPROPERTY_CONNECTION_ALLOCATORFRAMING,
  434. TRUE, // GetSupported or Handler
  435. sizeof(KSPROPERTY), // MinProperty
  436. sizeof(KSALLOCATOR_FRAMING), // MinData
  437. FALSE, // SetSupported or Handler
  438. NULL, // Values
  439. 0, // RelationsCount
  440. NULL, // Relations
  441. NULL, // SupportHandler
  442. sizeof(ULONG) // SerializedSize
  443. ),
  444. };
  445. DEFINE_KSPROPERTY_TABLE(VideoStreamDroppedFramesProperties)
  446. {
  447. DEFINE_KSPROPERTY_ITEM
  448. (
  449. KSPROPERTY_DROPPEDFRAMES_CURRENT,
  450. TRUE, // GetSupported or Handler
  451. sizeof(KSPROPERTY_DROPPEDFRAMES_CURRENT_S),// MinProperty
  452. sizeof(KSPROPERTY_DROPPEDFRAMES_CURRENT_S),// MinData
  453. FALSE, // SetSupported or Handler
  454. NULL, // Values
  455. 0, // RelationsCount
  456. NULL, // Relations
  457. NULL, // SupportHandler
  458. 0 // SerializedSize
  459. ),
  460. };
  461. #ifdef SUPPORT_QUALITY_CONTROL
  462. DEFINE_KSPROPERTY_TABLE(VideoStreamQualityControlProperties)
  463. {
  464. DEFINE_KSPROPERTY_ITEM
  465. (
  466. KSPROPERTY_STREAM_QUALITY,
  467. TRUE, // GetSupported or Handler
  468. sizeof(KSPROPERTY), // MinProperty
  469. sizeof(KSQUALITY), // MinData
  470. FALSE, // SetSupported or Handler
  471. NULL, // Values
  472. 0, // RelationsCount
  473. NULL, // Relations
  474. NULL, // SupportHandler
  475. 0 // SerializedSize
  476. ),
  477. };
  478. #endif
  479. #ifdef SUPPORT_NEW_AVC
  480. DEFINE_KSPROPERTY_TABLE(VideoStreamStreamAllocatorStatusProperties)
  481. {
  482. DEFINE_KSPROPERTY_ITEM
  483. (
  484. KSPROPERTY_STREAMALLOCATOR_STATUS,
  485. TRUE, // GetSupported or Handler
  486. sizeof(KSPROPERTY), // MinProperty
  487. sizeof(KSSTREAMALLOCATOR_STATUS), // MinData
  488. FALSE, // SetSupported or Handler
  489. NULL, // Values
  490. 0, // RelationsCount
  491. NULL, // Relations
  492. NULL, // SupportHandler
  493. 0, // SerializedSize
  494. ),
  495. };
  496. DEFINE_KSPROPERTY_TABLE(VideoStreamMediumsProperties)
  497. {
  498. DEFINE_KSPROPERTY_ITEM
  499. (
  500. KSPROPERTY_PIN_MEDIUMS,
  501. TRUE, // GetSupported or Handler
  502. sizeof(KSPROPERTY), // MinProperty
  503. 0, // MinData; MULTIPLE_ITEM, 2 step process to get data
  504. FALSE, // SetSupported or Handler
  505. NULL, // Values
  506. 0, // RelationsCount
  507. NULL, // Relations
  508. NULL, // SupportHandler
  509. 0, // SerializedSize
  510. ),
  511. };
  512. #endif
  513. KSPROPERTY_SET VideoStreamProperties[] =
  514. {
  515. DEFINE_KSPROPERTY_SET
  516. (
  517. &KSPROPSETID_Connection, // Set
  518. SIZEOF_ARRAY(VideoStreamConnectionProperties), // PropertiesCount
  519. VideoStreamConnectionProperties, // PropertyItem
  520. 0, // FastIoCount
  521. NULL // FastIoTable
  522. ),
  523. DEFINE_KSPROPERTY_SET
  524. (
  525. &PROPSETID_VIDCAP_DROPPEDFRAMES, // Set
  526. SIZEOF_ARRAY(VideoStreamDroppedFramesProperties), // PropertiesCount
  527. VideoStreamDroppedFramesProperties, // PropertyItem
  528. 0, // FastIoCount
  529. NULL // FastIoTable
  530. ),
  531. #ifdef SUPPORT_NEW_AVC
  532. // Apply only to INPIN????
  533. DEFINE_KSPROPERTY_SET
  534. (
  535. &KSPROPSETID_StreamAllocator, // Set
  536. SIZEOF_ARRAY(VideoStreamStreamAllocatorStatusProperties), // PropertiesCount
  537. VideoStreamStreamAllocatorStatusProperties, // PropertyItem
  538. 0, // FastIoCount
  539. NULL // FastIoTable
  540. ),
  541. DEFINE_KSPROPERTY_SET
  542. (
  543. &KSPROPSETID_Pin, // Set
  544. SIZEOF_ARRAY(VideoStreamMediumsProperties), // PropertiesCount
  545. VideoStreamMediumsProperties, // PropertyItem
  546. 0, // FastIoCount
  547. NULL // FastIoTable
  548. ),
  549. #endif
  550. };
  551. #define NUMBER_VIDEO_STREAM_PROPERTIES (SIZEOF_ARRAY(VideoStreamProperties))
  552. KSPROPERTY_SET VideoStreamPropertiesInPin[] =
  553. {
  554. DEFINE_KSPROPERTY_SET
  555. (
  556. &KSPROPSETID_Connection, // Set
  557. SIZEOF_ARRAY(VideoStreamConnectionProperties), // PropertiesCount
  558. VideoStreamConnectionProperties, // PropertyItem
  559. 0, // FastIoCount
  560. NULL // FastIoTable
  561. ),
  562. DEFINE_KSPROPERTY_SET
  563. (
  564. &PROPSETID_VIDCAP_DROPPEDFRAMES, // Set
  565. SIZEOF_ARRAY(VideoStreamDroppedFramesProperties), // PropertiesCount
  566. VideoStreamDroppedFramesProperties, // PropertyItem
  567. 0, // FastIoCount
  568. NULL // FastIoTable
  569. ),
  570. #ifdef SUPPORT_QUALITY_CONTROL
  571. // Apply only to INPIN
  572. DEFINE_KSPROPERTY_SET
  573. (
  574. &KSPROPSETID_Stream, // Set
  575. SIZEOF_ARRAY(VideoStreamQualityControlProperties), // PropertiesCount
  576. VideoStreamQualityControlProperties, // PropertyItem
  577. 0, // FastIoCount
  578. NULL // FastIoTable
  579. ),
  580. #endif
  581. #ifdef SUPPORT_NEW_AVC
  582. // Apply only to INPIN
  583. DEFINE_KSPROPERTY_SET
  584. (
  585. &KSPROPSETID_StreamAllocator, // Set
  586. SIZEOF_ARRAY(VideoStreamStreamAllocatorStatusProperties), // PropertiesCount
  587. VideoStreamStreamAllocatorStatusProperties, // PropertyItem
  588. 0, // FastIoCount
  589. NULL // FastIoTable
  590. ),
  591. DEFINE_KSPROPERTY_SET
  592. (
  593. &KSPROPSETID_Pin, // Set
  594. SIZEOF_ARRAY(VideoStreamMediumsProperties), // PropertiesCount
  595. VideoStreamMediumsProperties, // PropertyItem
  596. 0, // FastIoCount
  597. NULL // FastIoTable
  598. ),
  599. #endif
  600. };
  601. #define NUMBER_VIDEO_STREAM_PROPERTIES_INPIN (SIZEOF_ARRAY(VideoStreamPropertiesInPin))
  602. // ----------------------------------------------------------------------
  603. // Stream events
  604. // ------------------------------------------------------------------------
  605. // FORMAT_DVInfo
  606. //
  607. // Create a local copy of this GUID and make sure that it is not in the PAGED segment
  608. //
  609. const
  610. GUID
  611. KSEVENTSETID_Connection_Local = {STATICGUIDOF(KSEVENTSETID_Connection)};
  612. const
  613. GUID
  614. KSEVENTSETID_Clock_Local = {STATICGUIDOF(KSEVENTSETID_Clock)};
  615. // Isoch transmit End of stream event item
  616. KSEVENT_ITEM EndOfStreamEventItm[] =
  617. {
  618. {
  619. KSEVENT_CONNECTION_ENDOFSTREAM,
  620. 0,
  621. 0,
  622. NULL,
  623. NULL,
  624. NULL
  625. }
  626. };
  627. // Clock event item
  628. KSEVENT_ITEM ClockEventItm[] =
  629. {
  630. {
  631. KSEVENT_CLOCK_POSITION_MARK, // position mark event supported
  632. sizeof (KSEVENT_TIME_MARK), // requires this data as input
  633. sizeof (KSEVENT_TIME_MARK), // allocate space to copy the data
  634. NULL,
  635. NULL,
  636. NULL
  637. },
  638. };
  639. KSEVENT_SET ClockEventSet[] =
  640. {
  641. {
  642. &KSEVENTSETID_Clock,
  643. SIZEOF_ARRAY(ClockEventItm),
  644. ClockEventItm,
  645. }
  646. };
  647. // define event set related with streams
  648. // Output pin event set
  649. KSEVENT_SET StreamEventsOutPin[] =
  650. {
  651. {
  652. &KSEVENTSETID_Clock_Local,
  653. SIZEOF_ARRAY(ClockEventItm),
  654. ClockEventItm,
  655. },
  656. };
  657. // Input pin events set
  658. KSEVENT_SET StreamEventsInPin[] =
  659. {
  660. {
  661. &KSEVENTSETID_Connection_Local,
  662. SIZEOF_ARRAY(EndOfStreamEventItm),
  663. EndOfStreamEventItm,
  664. },
  665. {
  666. &KSEVENTSETID_Clock_Local,
  667. SIZEOF_ARRAY(ClockEventItm),
  668. ClockEventItm,
  669. },
  670. };
  671. #define NUMBER_STREAM_EVENTS_OUT_PIN (SIZEOF_ARRAY(StreamEventsOutPin))
  672. #define NUMBER_STREAM_EVENTS_IN_PIN (SIZEOF_ARRAY(StreamEventsInPin))
  673. // ----------------------------------------------------------------------
  674. // Stream data ranges
  675. // ------------------------------------------------------------------------
  676. //
  677. // AAUX Source Pack:
  678. // (SDDV_NTSC)
  679. // PC4: d1 1101 0001 [EF:1:On];[TC:1:50/15us];[SMP:010:32KHz];[QU:001:12bit-nonlinear];
  680. //*PC3: c0 1100 0000 [ML:1:NotMulti-language];[50/60:0:NTSC];[STYPE:0000:SD]
  681. // PC2: 30 0011 0000 [SM:0:Multiple-Stereo];[CHN:01:two channels per an audio block];[PA:1:independent channel];[AudMode:0000:...]
  682. // PC1: cf 1100 1111 [LF:1:Unlocked];[AFSize:1111:???]
  683. //
  684. // (SDDV_PAL)
  685. //*PC3: c0 1110 0000 [ML:1:NotMulti-language];[50/60:1:PAL];[STYPE:0000:SD]
  686. //
  687. #define AAUXSRC_DEFAULT 0xd1c030cf // ox PC4:PC3:PC2:PC1
  688. #define AAUXSRC_AMODE_F 0x00000f00 // Set the AUDIO MODE of the 2nd AAUXSRC to 1111
  689. #define AUXSRC_NTSC 0x00000000
  690. #define AUXSRC_PAL 0x00200000
  691. #define AUXSRC_STYPE_SD 0x00000000
  692. #define AUXSRC_STYPE_SD_DVCPRO 0x000e0000
  693. #define AUXSRC_STYPE_SDL 0x00010000
  694. #define AUXSRC_STYPE_HD 0x00020000
  695. #define AAUXSRC_SD_NTSC AAUXSRC_DEFAULT | AUXSRC_NTSC | AUXSRC_STYPE_SD // 0xd1c030cf
  696. #define AAUXSRC_SD_PAL AAUXSRC_DEFAULT | AUXSRC_PAL | AUXSRC_STYPE_SD // 0xd1e030d0
  697. #define AAUXSRC_SD_NTSC_DVCPRO AAUXSRC_DEFAULT | AUXSRC_NTSC | AUXSRC_STYPE_SD_DVCPRO // 0xd1de30cf
  698. #define AAUXSRC_SD_PAL_DVCPRO AAUXSRC_DEFAULT | AUXSRC_PAL | AUXSRC_STYPE_SD_DVCPRO // 0xd1fe30d0
  699. #define AAUXSRC_SDL_NTSC AAUXSRC_DEFAULT | AUXSRC_NTSC | AUXSRC_STYPE_SDL // 0xd1c130cf
  700. #define AAUXSRC_SDL_PAL AAUXSRC_DEFAULT | AUXSRC_PAL | AUXSRC_STYPE_SDL // 0xd1e130d0
  701. #define AAUXSRC_HD_NTSC AAUXSRC_DEFAULT | AUXSRC_NTSC | AUXSRC_STYPE_HD // 0xd1c230cf
  702. #define AAUXSRC_HD_PAL AAUXSRC_DEFAULT | AUXSRC_PAL | AUXSRC_STYPE_HD // 0xd1e230d0
  703. //
  704. // AAUX Source Control
  705. //
  706. // PC4:ff:1111 1111 [1];[Genere:111 1111:NoInfo]
  707. // PC3:a0:1010 0000 [DRF:1:Forward direction];[Speed:010 0000:normal recording]
  708. // PC2:cf:1100 1111 [RecSt:1:NoRecStPt];[RedEd:1:NoRecEdPt];[RecMode:001:Original];[InsCh:111:NoInfo]
  709. // PC1:3f:0011 1111 [CMGS:00:CopyGMS];[ISR:11:NoInfo];[CMP:11:NoInfo];[SS:11:NoInfo]
  710. #define AAUXSRCCTL_DEFAULT 0xffa0cf3f // ox PC4:PC3:PC2:PC1
  711. //
  712. // VAUX Source
  713. //
  714. // PC4:ff [TunderCat:1111 1111:NoInfo]
  715. // PC3:00 [SrcCode:00:Camera];[50/60:0:NTSC];[STYPE:0000:SD]
  716. // PC2:ff [BW:1:Color];[EN:ColorFrameEnable:1:Invalid];[CLF:11:"Invalid"];[TV Ch:1111:NoInfo]
  717. // PC1:ff:[TCChannel:1111 1111:NoInfo]
  718. #define VAUXSRC_DEFAULT 0xff00ffff // ox PC4:PC3:PC2:PC1
  719. //
  720. // VAUX Source Control
  721. //
  722. // PC4:ff 1111 1111 [1];[Genere:111 1111:NoInfo]
  723. // PC3:fc 1111 1100 [FF:1:BothFields];[FS:1:Field1];[FC:1:DiffPic];[IL:1:Interlaced];
  724. // [ST:1:1001/60 or 1/50];[SC:1:NotStillPic];[BCSYS:00:type0]
  725. // PC2:c8 1100 1000 [RecSt:1:NoRecStPt];[1];[RecMode:001:Original];[1];[DISP:000:(4:3) full fmt]
  726. // PC1:3f:0011 1111 [CMGS:00:CopyGMS];[ISR:11:NoInfo];[CMP:11:NoInfo];[SS:11:NoInfo]
  727. #define VAUXSRCCTL_DEFAULT_EIA 0xfffcc83f // for NTSC(?)
  728. #define VAUXSRCCTL_DEFAULT_ETS 0xfffdc83f // for PAL (?)
  729. // SD DV VidOnly NTSC Stream
  730. KS_DATARANGE_VIDEO SDDV_VidOnlyNTSCStream =
  731. {
  732. // KSDATARANGE
  733. {
  734. sizeof (KS_DATARANGE_VIDEO), // FormatSize
  735. 0, // Flags
  736. FRAME_SIZE_SD_DVCR_NTSC, // SampleSize
  737. 0, // Reserved
  738. STATIC_KSDATAFORMAT_TYPE_VIDEO,
  739. STATIC_KSDATAFORMAT_SUBTYPE_DVSD,
  740. STATIC_KSDATAFORMAT_SPECIFIER_VIDEOINFO,
  741. },
  742. TRUE, // BOOL, bFixedSizeSamples (all samples same size?)
  743. FALSE, // BOOL, bTemporalCompression (all I frames?)
  744. KS_VIDEOSTREAM_CAPTURE, // StreamDescriptionFlags (KS_VIDEO_DESC_*)
  745. 0, // MemoryAllocationFlags (KS_VIDEO_ALLOC_*)
  746. // KS_VIDEO_STREAM_CONFIG_CAPS
  747. {
  748. STATIC_KSDATAFORMAT_SPECIFIER_VIDEOINFO, //MEDIATYPE_Video
  749. KS_AnalogVideo_NTSC_M, // AnalogVideoStandard
  750. D_X_NTSC, D_Y_NTSC, // InputSize, (the inherent size of the incoming signal
  751. // with every digitized pixel unique)
  752. D_X_NTSC_MIN, D_Y_NTSC_MIN, // MinCroppingSize, smallest rcSrc cropping rect allowed
  753. D_X_NTSC, D_Y_NTSC, // MaxCroppingSize, largest rcSrc cropping rect allowed
  754. 1, // CropGranularityX, granularity of cropping size
  755. 1, // CropGranularityY
  756. 1, // CropAlignX, alignment of cropping rect
  757. 1, // CropAlignY;
  758. D_X_NTSC_MIN, D_Y_NTSC_MIN, // MinOutputSize, smallest bitmap stream can produce
  759. D_X_NTSC, D_Y_NTSC, // MaxOutputSize, largest bitmap stream can produce
  760. 1, // OutputGranularityX, granularity of output bitmap size
  761. 1, // OutputGranularityY;
  762. 0, // StretchTapsX (0 no stretch, 1 pix dup, 2 interp...)
  763. 0, // StretchTapsY
  764. 0, // ShrinkTapsX
  765. 0, // ShrinkTapsY
  766. 333667, // MinFrameInterval, 100 nS units// MinFrameInterval, 100 nS units
  767. 333667, // MaxFrameInterval, 100 nS units
  768. (FRAME_SIZE_SD_DVCR_NTSC * 8)*30, // MinBitsPerSecond;
  769. (FRAME_SIZE_SD_DVCR_NTSC * 8)*30, // MaxBitsPerSecond;
  770. },
  771. // KS_VIDEOINFOHEADER (default format)
  772. {
  773. 0,0,0,0, //D_X_NTSC,D_Y_NTSC, // 0,0,720,480
  774. 0,0,0,0, // RECT rcTarget; // Where the video should go
  775. (FRAME_SIZE_SD_DVCR_NTSC * 8 * 30), // DWORD dwBitRate; // Approximate bit data rate
  776. 0L, // DWORD dwBitErrorRate; // Bit error rate for this stream
  777. 333667, // REFERENCE_TIME AvgTimePerFrame; // Average time per frame (100ns units)
  778. sizeof (KS_BITMAPINFOHEADER), // DWORD biSize;
  779. D_X_NTSC, // LONG biWidth;
  780. D_Y_NTSC, // LONG biHeight;
  781. 1, // WORD biPlanes;
  782. 24, // WORD biBitCount;
  783. FOURCC_DVSD, // DWORD biCompression;
  784. FRAME_SIZE_SD_DVCR_NTSC, // DWORD biSizeImage;
  785. 0, // LONG biXPelsPerMeter;
  786. 0, // LONG biYPelsPerMeter;
  787. 0, // DWORD biClrUsed;
  788. 0, // DWORD biClrImportant;
  789. },
  790. };
  791. // SD DV VidOnly PAL Stream
  792. KS_DATARANGE_VIDEO SDDV_VidOnlyPALStream =
  793. {
  794. // KSDATARANGE
  795. {
  796. sizeof (KS_DATARANGE_VIDEO), // FormatSize
  797. 0, // Flags
  798. FRAME_SIZE_SD_DVCR_PAL, // SampleSize
  799. 0, // Reserved
  800. STATIC_KSDATAFORMAT_TYPE_VIDEO,
  801. STATIC_KSDATAFORMAT_SUBTYPE_DVSD,
  802. STATIC_KSDATAFORMAT_SPECIFIER_VIDEOINFO,
  803. },
  804. TRUE, // BOOL, bFixedSizeSamples (all samples same size?)
  805. FALSE, // BOOL, bTemporalCompression (all I frames?)
  806. KS_VIDEOSTREAM_CAPTURE, // StreamDescriptionFlags (KS_VIDEO_DESC_*)
  807. 0, // MemoryAllocationFlags (KS_VIDEO_ALLOC_*)
  808. // _KS_VIDEO_STREAM_CONFIG_CAPS
  809. {
  810. STATIC_KSDATAFORMAT_SPECIFIER_VIDEOINFO, //MEDIATYPE_Video
  811. KS_AnalogVideo_PAL_B, // AnalogVideoStandard
  812. D_X_PAL, D_Y_PAL, // InputSize, (the inherent size of the incoming signal
  813. // with every digitized pixel unique)
  814. D_X_PAL_MIN, D_Y_PAL_MIN, // MinCroppingSize, smallest rcSrc cropping rect allowed
  815. D_X_PAL, D_Y_PAL, // MaxCroppingSize, largest rcSrc cropping rect allowed
  816. 1, // CropGranularityX, granularity of cropping size
  817. 1, // CropGranularityY
  818. 1, // CropAlignX, alignment of cropping rect
  819. 1, // CropAlignY;
  820. D_X_PAL_MIN, D_Y_PAL_MIN, // MinOutputSize, smallest bitmap stream can produce
  821. D_X_PAL, D_Y_PAL, // MaxOutputSize, largest bitmap stream can produce
  822. 1, // OutputGranularityX, granularity of output bitmap size
  823. 1, // OutputGranularityY;
  824. 0, // StretchTapsX (0 no stretch, 1 pix dup, 2 interp...)
  825. 0, // StretchTapsY
  826. 0, // ShrinkTapsX
  827. 0, // ShrinkTapsY
  828. 400000, // MinFrameInterval, 100 nS units
  829. 400000, // MaxFrameInterval, 100 nS units
  830. (FRAME_SIZE_SD_DVCR_PAL * 8)*25, // MinBitsPerSecond;
  831. (FRAME_SIZE_SD_DVCR_PAL * 8)*25, // MaxBitsPerSecond;
  832. },
  833. // KS_VIDEOINFOHEADER (default format)
  834. {
  835. 0,0,0,0, // D_X_PAL,D_Y_PAL, // 0,0,720,480
  836. 0,0,0,0, // RECT rcTarget; // Where the video should go
  837. (FRAME_SIZE_SD_DVCR_PAL * 8 * 25), // DWORD dwBitRate; // Approximate bit data rate
  838. 0L, // DWORD dwBitErrorRate; // Bit error rate for this stream
  839. 400000, // REFERENCE_TIME AvgTimePerFrame; // Average time per frame (100ns units)
  840. sizeof (KS_BITMAPINFOHEADER), // DWORD biSize;
  841. D_X_PAL, // LONG biWidth;
  842. D_Y_PAL, // LONG biHeight;
  843. 1, // WORD biPlanes;
  844. 24, // WORD biBitCount;
  845. FOURCC_DVSD, // DWORD biCompression;
  846. FRAME_SIZE_SD_DVCR_PAL, // DWORD biSizeImage;
  847. 0, // LONG biXPelsPerMeter;
  848. 0, // LONG biYPelsPerMeter;
  849. 0, // DWORD biClrUsed;
  850. 0, // DWORD biClrImportant;
  851. },
  852. };
  853. #ifdef MSDV_SUPPORT_SDL_DVCR
  854. // SDL DV VidOnly NTSC Stream
  855. KS_DATARANGE_VIDEO SDLDV_VidOnlyNTSCStream =
  856. {
  857. // KSDATARANGE
  858. {
  859. sizeof (KS_DATARANGE_VIDEO), // FormatSize
  860. 0, // Flags
  861. FRAME_SIZE_SDL_DVCR_NTSC, // SampleSize
  862. 0, // Reserved
  863. STATIC_KSDATAFORMAT_TYPE_VIDEO,
  864. STATIC_KSDATAFORMAT_SUBTYPE_DVSL,
  865. STATIC_KSDATAFORMAT_SPECIFIER_VIDEOINFO,
  866. },
  867. TRUE, // BOOL, bFixedSizeSamples (all samples same size?)
  868. FALSE, // BOOL, bTemporalCompression (all I frames?)
  869. KS_VIDEOSTREAM_CAPTURE, // StreamDescriptionFlags (KS_VIDEO_DESC_*)
  870. 0, // MemoryAllocationFlags (KS_VIDEO_ALLOC_*)
  871. // KS_VIDEO_STREAM_CONFIG_CAPS
  872. {
  873. STATIC_KSDATAFORMAT_SPECIFIER_VIDEOINFO, //MEDIATYPE_Video
  874. KS_AnalogVideo_NTSC_M, // AnalogVideoStandard
  875. D_X_NTSC, D_Y_NTSC, // InputSize, (the inherent size of the incoming signal
  876. // with every digitized pixel unique)
  877. D_X_NTSC_MIN, D_Y_NTSC_MIN, // MinCroppingSize, smallest rcSrc cropping rect allowed
  878. D_X_NTSC, D_Y_NTSC, // MaxCroppingSize, largest rcSrc cropping rect allowed
  879. 1, // CropGranularityX, granularity of cropping size
  880. 1, // CropGranularityY
  881. 1, // CropAlignX, alignment of cropping rect
  882. 1, // CropAlignY;
  883. D_X_NTSC_MIN, D_Y_NTSC_MIN, // MinOutputSize, smallest bitmap stream can produce
  884. D_X_NTSC, D_Y_NTSC, // MaxOutputSize, largest bitmap stream can produce
  885. 1, // OutputGranularityX, granularity of output bitmap size
  886. 1, // OutputGranularityY;
  887. 0, // StretchTapsX (0 no stretch, 1 pix dup, 2 interp...)
  888. 0, // StretchTapsY
  889. 0, // ShrinkTapsX
  890. 0, // ShrinkTapsY
  891. 333667, // MinFrameInterval, 100 nS units// MinFrameInterval, 100 nS units
  892. 333667, // MaxFrameInterval, 100 nS units
  893. (FRAME_SIZE_SDL_DVCR_NTSC * 8)*30, // MinBitsPerSecond;
  894. (FRAME_SIZE_SDL_DVCR_NTSC * 8)*30, // MaxBitsPerSecond;
  895. },
  896. // KS_VIDEOINFOHEADER (default format)
  897. {
  898. 0,0,0,0, //D_X_NTSC,D_Y_NTSC, // 0,0,720,480
  899. 0,0,0,0, // RECT rcTarget; // Where the video should go
  900. (FRAME_SIZE_SDL_DVCR_NTSC * 8 * 30), // DWORD dwBitRate; // Approximate bit data rate
  901. 0L, // DWORD dwBitErrorRate; // Bit error rate for this stream
  902. 333667, // REFERENCE_TIME AvgTimePerFrame; // Average time per frame (100ns units)
  903. sizeof (KS_BITMAPINFOHEADER), // DWORD biSize;
  904. D_X_NTSC, // LONG biWidth;
  905. D_Y_NTSC, // LONG biHeight;
  906. 1, // WORD biPlanes;
  907. 24, // WORD biBitCount;
  908. FOURCC_DVSL, // DWORD biCompression;
  909. FRAME_SIZE_SDL_DVCR_NTSC, // DWORD biSizeImage;
  910. 0, // LONG biXPelsPerMeter;
  911. 0, // LONG biYPelsPerMeter;
  912. 0, // DWORD biClrUsed;
  913. 0, // DWORD biClrImportant;
  914. },
  915. };
  916. // SDL DV VidOnly PAL Stream
  917. KS_DATARANGE_VIDEO SDLDV_VidOnlyPALStream =
  918. {
  919. // KSDATARANGE
  920. {
  921. sizeof (KS_DATARANGE_VIDEO), // FormatSize
  922. 0, // Flags
  923. FRAME_SIZE_SDL_DVCR_PAL, // SampleSize
  924. 0, // Reserved
  925. STATIC_KSDATAFORMAT_TYPE_VIDEO,
  926. STATIC_KSDATAFORMAT_SUBTYPE_DVSL,
  927. STATIC_KSDATAFORMAT_SPECIFIER_VIDEOINFO,
  928. },
  929. TRUE, // BOOL, bFixedSizeSamples (all samples same size?)
  930. FALSE, // BOOL, bTemporalCompression (all I frames?)
  931. KS_VIDEOSTREAM_CAPTURE, // StreamDescriptionFlags (KS_VIDEO_DESC_*)
  932. 0, // MemoryAllocationFlags (KS_VIDEO_ALLOC_*)
  933. // _KS_VIDEO_STREAM_CONFIG_CAPS
  934. {
  935. STATIC_KSDATAFORMAT_SPECIFIER_VIDEOINFO, //MEDIATYPE_Video
  936. KS_AnalogVideo_PAL_B, // AnalogVideoStandard
  937. D_X_PAL, D_Y_PAL, // InputSize, (the inherent size of the incoming signal
  938. // with every digitized pixel unique)
  939. D_X_PAL_MIN, D_Y_PAL_MIN, // MinCroppingSize, smallest rcSrc cropping rect allowed
  940. D_X_PAL, D_Y_PAL, // MaxCroppingSize, largest rcSrc cropping rect allowed
  941. 1, // CropGranularityX, granularity of cropping size
  942. 1, // CropGranularityY
  943. 1, // CropAlignX, alignment of cropping rect
  944. 1, // CropAlignY;
  945. D_X_PAL_MIN, D_Y_PAL_MIN, // MinOutputSize, smallest bitmap stream can produce
  946. D_X_PAL, D_Y_PAL, // MaxOutputSize, largest bitmap stream can produce
  947. 1, // OutputGranularityX, granularity of output bitmap size
  948. 1, // OutputGranularityY;
  949. 0, // StretchTapsX (0 no stretch, 1 pix dup, 2 interp...)
  950. 0, // StretchTapsY
  951. 0, // ShrinkTapsX
  952. 0, // ShrinkTapsY
  953. 400000, // MinFrameInterval, 100 nS units
  954. 400000, // MaxFrameInterval, 100 nS units
  955. (FRAME_SIZE_SDL_DVCR_PAL * 8)*25, // MinBitsPerSecond;
  956. (FRAME_SIZE_SDL_DVCR_PAL * 8)*25, // MaxBitsPerSecond;
  957. },
  958. // KS_VIDEOINFOHEADER (default format)
  959. {
  960. 0,0,0,0, // D_X_PAL,D_Y_PAL, // 0,0,720,480
  961. 0,0,0,0, // RECT rcTarget; // Where the video should go
  962. (FRAME_SIZE_SDL_DVCR_PAL * 8 * 25), // DWORD dwBitRate; // Approximate bit data rate
  963. 0L, // DWORD dwBitErrorRate; // Bit error rate for this stream
  964. 400000, // REFERENCE_TIME AvgTimePerFrame; // Average time per frame (100ns units)
  965. sizeof (KS_BITMAPINFOHEADER), // DWORD biSize;
  966. D_X_PAL, // LONG biWidth;
  967. D_Y_PAL, // LONG biHeight;
  968. 1, // WORD biPlanes;
  969. 24, // WORD biBitCount;
  970. FOURCC_DVSL, // DWORD biCompression;
  971. FRAME_SIZE_SDL_DVCR_PAL, // DWORD biSizeImage;
  972. 0, // LONG biXPelsPerMeter;
  973. 0, // LONG biYPelsPerMeter;
  974. 0, // DWORD biClrUsed;
  975. 0, // DWORD biClrImportant;
  976. },
  977. };
  978. #endif // MSDV_SUPPORT_SDL_DVCR
  979. // SD DV IAV NTSC Stream
  980. #ifdef SUPPORT_NEW_AVC
  981. KS_DATARANGE_DV_AVC
  982. SDDV_IavNtscStreamAVC =
  983. {
  984. // KSDATARANGE
  985. {
  986. sizeof (KS_DATARANGE_DV_AVC), // FormatSize
  987. 0, // Flags
  988. FRAME_SIZE_SD_DVCR_NTSC, // SampleSize
  989. 0, // Reserved
  990. STATIC_KSDATAFORMAT_TYPE_INTERLEAVED,
  991. STATIC_KSDATAFORMAT_SUBTYPE_DVSD,
  992. // Indicate that an AVC structure is included and this is used for direct DV to DV connection.
  993. STATIC_KSDATAFORMAT_SPECIFIER_DV_AVC, // STATIC_KSDATAFORMAT_SPECIFIER_DVINFO,
  994. },
  995. // DVINFO
  996. // Note: audio is set for 32khz
  997. {
  998. //for 1st 5/6 DIF seq.
  999. AAUXSRC_SD_NTSC, // DWORD dwDVAAuxSrc;
  1000. AAUXSRCCTL_DEFAULT, // DWORD dwDVAAuxCtl;
  1001. // for 2nd 5/6 DIF seq.
  1002. AAUXSRC_SD_NTSC | AAUXSRC_AMODE_F, // DWORD dwDVAAuxSrc1;
  1003. AAUXSRCCTL_DEFAULT, // DWORD dwDVAAuxCtl1;
  1004. //for video information
  1005. VAUXSRC_DEFAULT | AUXSRC_NTSC | AUXSRC_STYPE_SD, // DWORD dwDVVAuxSrc;
  1006. VAUXSRCCTL_DEFAULT_EIA, // DWORD dwDVVAuxCtl;
  1007. 0, // DWORD dwDVReserved[2];
  1008. 0, //
  1009. },
  1010. // AVCPRECONNECTINFO
  1011. {
  1012. 0, // Device ID
  1013. 0, // Subunit address
  1014. 0, // Subunit Plug number
  1015. 0, // Data Flow
  1016. 0, // Flag/Plug Handle
  1017. 0, // UnitPlugNumber
  1018. },
  1019. };
  1020. // SDL DV IAV PAL Stream
  1021. KS_DATARANGE_DV_AVC
  1022. SDDV_IavPalStreamAVC =
  1023. {
  1024. // KSDATARANGE
  1025. {
  1026. sizeof (KS_DATARANGE_DV_AVC), // FormatSize
  1027. 0, // Flags
  1028. FRAME_SIZE_SD_DVCR_PAL, // SampleSize
  1029. 0, // Reserved
  1030. STATIC_KSDATAFORMAT_TYPE_INTERLEAVED,
  1031. STATIC_KSDATAFORMAT_SUBTYPE_DVSD,
  1032. // Indicate that an AVC structure is included and this is used for direct DV to DV connection.
  1033. STATIC_KSDATAFORMAT_SPECIFIER_DV_AVC, // STATIC_KSDATAFORMAT_SPECIFIER_DVINFO,
  1034. },
  1035. // DVINFO
  1036. // Note: Audio is set for 32khz.
  1037. {
  1038. //for 1st 5/6 DIF seq.
  1039. AAUXSRC_SD_PAL, // DWORD dwDVAAuxSrc;
  1040. AAUXSRCCTL_DEFAULT, // DWORD dwDVAAuxCtl;
  1041. // for 2nd 5/6 DIF seq.
  1042. AAUXSRC_SD_PAL | AAUXSRC_AMODE_F, // DWORD dwDVAAuxSrc1;
  1043. AAUXSRCCTL_DEFAULT, // DWORD dwDVAAuxCtl1;
  1044. //for video information
  1045. VAUXSRC_DEFAULT | AUXSRC_PAL | AUXSRC_STYPE_SD, // DWORD dwDVVAuxSrc;
  1046. VAUXSRCCTL_DEFAULT_ETS, // DWORD dwDVVAuxCtl;
  1047. 0, // DWORD dwDVReserved[2];
  1048. 0, //
  1049. },
  1050. // AVCPRECONNECTINFO
  1051. {
  1052. 0, // Device ID
  1053. 0, // Subunit address
  1054. 0, // Subunit Plug number
  1055. 0, // Data Flow
  1056. 0, // Flag/Plug Handle
  1057. 0, // UnitPlugNumber
  1058. },
  1059. };
  1060. #endif
  1061. // SD DV IAV NTSC Stream
  1062. KS_DATARANGE_DVVIDEO
  1063. SDDV_IavNtscStream =
  1064. {
  1065. // KSDATARANGE
  1066. {
  1067. sizeof (KS_DATARANGE_DVVIDEO), // FormatSize
  1068. 0, // Flags
  1069. FRAME_SIZE_SD_DVCR_NTSC, // SampleSize
  1070. 0, // Reserved
  1071. STATIC_KSDATAFORMAT_TYPE_INTERLEAVED,
  1072. STATIC_KSDATAFORMAT_SUBTYPE_DVSD,
  1073. STATIC_KSDATAFORMAT_SPECIFIER_DVINFO, // DV to DShow filter connection
  1074. },
  1075. // DVINFO
  1076. // Note: audio is set for 32khz
  1077. {
  1078. //for 1st 5/6 DIF seq.
  1079. AAUXSRC_SD_NTSC, // DWORD dwDVAAuxSrc;
  1080. AAUXSRCCTL_DEFAULT, // DWORD dwDVAAuxCtl;
  1081. // for 2nd 5/6 DIF seq.
  1082. AAUXSRC_SD_NTSC | AAUXSRC_AMODE_F, // DWORD dwDVAAuxSrc1;
  1083. AAUXSRCCTL_DEFAULT, // DWORD dwDVAAuxCtl1;
  1084. //for video information
  1085. VAUXSRC_DEFAULT | AUXSRC_NTSC | AUXSRC_STYPE_SD, // DWORD dwDVVAuxSrc;
  1086. VAUXSRCCTL_DEFAULT_EIA, // DWORD dwDVVAuxCtl;
  1087. 0, // DWORD dwDVReserved[2];
  1088. 0, //
  1089. },
  1090. };
  1091. // SDL DV IAV PAL Stream
  1092. KS_DATARANGE_DVVIDEO
  1093. SDDV_IavPalStream =
  1094. {
  1095. // KSDATARANGE
  1096. {
  1097. sizeof (KS_DATARANGE_DVVIDEO), // FormatSize
  1098. 0, // Flags
  1099. FRAME_SIZE_SD_DVCR_PAL, // SampleSize
  1100. 0, // Reserved
  1101. STATIC_KSDATAFORMAT_TYPE_INTERLEAVED,
  1102. STATIC_KSDATAFORMAT_SUBTYPE_DVSD,
  1103. STATIC_KSDATAFORMAT_SPECIFIER_DVINFO, // DV to DShow filter connection
  1104. },
  1105. // DVINFO
  1106. // Note: Audio is set for 32khz.
  1107. {
  1108. //for 1st 5/6 DIF seq.
  1109. AAUXSRC_SD_PAL, // DWORD dwDVAAuxSrc;
  1110. AAUXSRCCTL_DEFAULT, // DWORD dwDVAAuxCtl;
  1111. // for 2nd 5/6 DIF seq.
  1112. AAUXSRC_SD_PAL | AAUXSRC_AMODE_F, // DWORD dwDVAAuxSrc1;
  1113. AAUXSRCCTL_DEFAULT, // DWORD dwDVAAuxCtl1;
  1114. //for video information
  1115. VAUXSRC_DEFAULT | AUXSRC_PAL | AUXSRC_STYPE_SD, // DWORD dwDVVAuxSrc;
  1116. VAUXSRCCTL_DEFAULT_ETS, // DWORD dwDVVAuxCtl;
  1117. 0, // DWORD dwDVReserved[2];
  1118. 0, //
  1119. },
  1120. };
  1121. #ifdef MSDV_SUPPORT_SDL_DVCR
  1122. // SDL DV IAV NTSC Stream
  1123. KS_DATARANGE_DVVIDEO SDLDV_IavNtscStream =
  1124. {
  1125. // KSDATARANGE
  1126. {
  1127. sizeof (KS_DATARANGE_DVVIDEO), // FormatSize
  1128. 0, // Flags
  1129. FRAME_SIZE_SDL_DVCR_NTSC, // SampleSize
  1130. 0, // Reserved
  1131. STATIC_KSDATAFORMAT_TYPE_INTERLEAVED,
  1132. STATIC_KSDATAFORMAT_SUBTYPE_DVSL,
  1133. STATIC_KSDATAFORMAT_SPECIFIER_DVINFO,
  1134. },
  1135. // DVINFO
  1136. // Note: audio is set for 32khz
  1137. {
  1138. //for 1st 5/6 DIF seq.
  1139. AAUXSRC_SDL_NTSC, // DWORD dwDVAAuxSrc;
  1140. AAUXSRCCTL_DEFAULT, // DWORD dwDVAAuxCtl;
  1141. // for 2nd 5/6 DIF seq; SDL only have 5 dif seqs..
  1142. 0x0, // DWORD dwDVAAuxSrc1;
  1143. 0x0, // DWORD dwDVAAuxCtl1;
  1144. //for video information
  1145. VAUXSRC_DEFAULT | AUXSRC_NTSC | AUXSRC_STYPE_SDL, // DWORD dwDVVAuxSrc;
  1146. VAUXSRCCTL_DEFAULT_EIA, // DWORD dwDVVAuxCtl;
  1147. 0, // DWORD dwDVReserved[2];
  1148. 0, //
  1149. },
  1150. };
  1151. // SDL DV VidOnly NTSC Stream
  1152. KS_DATARANGE_DVVIDEO SDLDV_IavPalStream =
  1153. {
  1154. // KSDATARANGE
  1155. {
  1156. sizeof (KS_DATARANGE_DVVIDEO), // FormatSize
  1157. 0, // Flags
  1158. FRAME_SIZE_SDL_DVCR_PAL, // SampleSize
  1159. 0, // Reserved
  1160. STATIC_KSDATAFORMAT_TYPE_INTERLEAVED,
  1161. STATIC_KSDATAFORMAT_SUBTYPE_DVSL,
  1162. STATIC_KSDATAFORMAT_SPECIFIER_DVINFO,
  1163. },
  1164. // DVINFO
  1165. // Note: Audio is set for 32khz.
  1166. {
  1167. //for 1st 5/6 DIF seq.
  1168. AAUXSRC_SDL_PAL, // DWORD dwDVAAuxSrc;
  1169. AAUXSRCCTL_DEFAULT, // DWORD dwDVAAuxCtl;
  1170. // for 2nd 5/6 DIF seq; SDL only have 5 dif seqs..
  1171. 0x0, // DWORD dwDVAAuxSrc1;
  1172. 0x0, // DWORD dwDVAAuxCtl1;
  1173. //for video information
  1174. VAUXSRC_DEFAULT | AUXSRC_PAL | AUXSRC_STYPE_SDL, // DWORD dwDVVAuxSrc;
  1175. VAUXSRCCTL_DEFAULT_ETS, // DWORD dwDVVAuxCtl;
  1176. 0, // DWORD dwDVReserved[2];
  1177. 0, //
  1178. },
  1179. };
  1180. #endif // MSDV_SUPPORT_SDL_DVCR
  1181. //
  1182. // A device cannot support all these formats at the same time. All
  1183. // formats are advertise since the "current format" of the device can
  1184. // dynamically changing (NTSC/PAL or SD/SDL); however, duraing data
  1185. // intersection and stram opening, only the currently support format
  1186. // will be accepted.
  1187. //
  1188. PKSDATAFORMAT DVCRStream0Formats[] =
  1189. {
  1190. (PKSDATAFORMAT) &SDDV_VidOnlyNTSCStream,
  1191. (PKSDATAFORMAT) &SDDV_VidOnlyPALStream,
  1192. #ifdef MSDV_SUPPORT_SDL_DVCR
  1193. (PKSDATAFORMAT) &SDLDV_VidOnlyNTSCStream,
  1194. (PKSDATAFORMAT) &SDLDV_VidOnlyPALStream,
  1195. #endif
  1196. };
  1197. #define NUM_DVCR_STREAM0_FORMATS (SIZEOF_ARRAY(DVCRStream0Formats))
  1198. PKSDATAFORMAT DVCRStream1Formats[] =
  1199. {
  1200. #ifdef SUPPORT_NEW_AVC
  1201. (PKSDATAFORMAT) &SDDV_IavNtscStreamAVC, // DV to DV connection
  1202. (PKSDATAFORMAT) &SDDV_IavPalStreamAVC, // DV to DV connection
  1203. #endif
  1204. (PKSDATAFORMAT) &SDDV_IavNtscStream,
  1205. (PKSDATAFORMAT) &SDDV_IavPalStream,
  1206. #ifdef MSDV_SUPPORT_SDL_DVCR
  1207. (PKSDATAFORMAT) &SDLDV_IavNtscStream,
  1208. (PKSDATAFORMAT) &SDLDV_IavPalStream,
  1209. #endif
  1210. };
  1211. #define NUM_DVCR_STREAM1_FORMATS (SIZEOF_ARRAY(DVCRStream1Formats))
  1212. //---------------------------------------------------------------------------
  1213. // Create an array that holds the list of all of the streams supported
  1214. //---------------------------------------------------------------------------
  1215. // If the minidriver does not specify a medium,
  1216. // the class driver uses the KSMEDIUMSETID_Standard,
  1217. // KSMEDIUM_TYPE_ANYINSTANCE medium as the default.
  1218. KSPIN_MEDIUM DVVidonlyMediums[] =
  1219. {
  1220. { STATIC_KSMEDIUMSETID_Standard, 0, 0 },
  1221. };
  1222. #define NUM_VIDONLY_MEDIUMS (SIZEOF_ARRAY(DVVidonlyMediums))
  1223. KSPIN_MEDIUM DVIavMediums[] =
  1224. {
  1225. #ifdef SUPPORT_NEW_AVC
  1226. { STATIC_KSMEDIUMSETID_1394SerialBus, 1394, 0 }, // ID=1394 (?); Flag=?
  1227. #endif
  1228. { STATIC_KSMEDIUMSETID_Standard, 0, 0 },
  1229. };
  1230. #define NUM_IAV_MEDIUMS (SIZEOF_ARRAY(DVIavMediums))
  1231. static GUID guidPinCategoryCapture = {STATIC_PINNAME_VIDEO_CAPTURE};
  1232. static GUID guidPinNameDVVidOutput = {STATIC_PINNAME_DV_VID_OUTPUT};
  1233. static GUID guidPinNameDVAVOutput = {STATIC_PINNAME_DV_AV_OUTPUT};
  1234. static GUID guidPinNameDVAVInput = {STATIC_PINNAME_DV_AV_INPUT};
  1235. ALL_STREAM_INFO DVStreams [] =
  1236. {
  1237. // -----------------------------------------------------------------
  1238. // Stream 0, DV coming from the camcorder
  1239. // -----------------------------------------------------------------
  1240. {
  1241. // HW_STREAM_INFORMATION -------------------------------------------
  1242. {
  1243. 1, // NumberOfPossibleInstances
  1244. KSPIN_DATAFLOW_OUT, // DataFlow
  1245. TRUE, // DataAccessible
  1246. NUM_DVCR_STREAM0_FORMATS, // NumberOfFormatArrayEntries
  1247. DVCRStream0Formats, // StreamFormatsArray
  1248. 0, // ClassReserved[0]
  1249. 0, // ClassReserved[1]
  1250. 0, // ClassReserved[2]
  1251. 0, // ClassReserved[3]
  1252. NUMBER_VIDEO_STREAM_PROPERTIES, // NumStreamPropArrayEntries
  1253. VideoStreamProperties, // StreamPropertiesArray
  1254. NUMBER_STREAM_EVENTS_OUT_PIN, // NumStreamEventArrayEntries
  1255. StreamEventsOutPin, // StreamEventsArray
  1256. &guidPinCategoryCapture, // Category
  1257. &guidPinNameDVVidOutput, // Name
  1258. NUM_VIDONLY_MEDIUMS, // Mediums count
  1259. DVVidonlyMediums, // Mediums
  1260. FALSE, // BridgeStream
  1261. 0, // Reserved[0]
  1262. 0, // Reserved[1]
  1263. },
  1264. // HW_STREAM_OBJECT ------------------------------------------------
  1265. {
  1266. sizeof(HW_STREAM_OBJECT),
  1267. 0, // StreamNumber
  1268. 0, // HwStreamExtension
  1269. DVRcvDataPacket, // ReceiveDataPacket
  1270. DVRcvControlPacket, // ReceiveControlPacket
  1271. {
  1272. (PHW_CLOCK_FUNCTION) StreamClockRtn, // HW_CLOCK_OBJECT.HWClockFunction
  1273. CLOCK_SUPPORT_CAN_RETURN_STREAM_TIME, // HW_CLOCK_OBJECT.ClockSupportFlags
  1274. 0, // HW_CLOCK_OBJECT.Reserved[0]
  1275. 0, // HW_CLOCK_OBJECT.Reserved[1]
  1276. },
  1277. FALSE, // Dma
  1278. FALSE, // Pio
  1279. 0, // HwDeviceExtension
  1280. sizeof(KS_FRAME_INFO), // StreamHeaderMediaSpecific
  1281. 0, // StreamHeaderWorkspace
  1282. FALSE, // Allocator
  1283. DVEventHandler, // HwEventRoutine
  1284. 0, // Reserved[0]
  1285. 0, // Reserved[1]
  1286. },
  1287. },
  1288. // -----------------------------------------------------------------
  1289. // Stream 1, DV coming from the camcorder (interleaved format)
  1290. // -----------------------------------------------------------------
  1291. {
  1292. // HW_STREAM_INFORMATION -------------------------------------------
  1293. {
  1294. 1, // NumberOfPossibleInstances
  1295. KSPIN_DATAFLOW_OUT, // DataFlow
  1296. TRUE, // DataAccessible
  1297. NUM_DVCR_STREAM1_FORMATS, // NumberOfFormatArrayEntries
  1298. DVCRStream1Formats, // StreamFormatsArrayf
  1299. 0, // ClassReserved[0]
  1300. 0, // ClassReserved[1]
  1301. 0, // ClassReserved[2]
  1302. 0, // ClassReserved[3]
  1303. NUMBER_VIDEO_STREAM_PROPERTIES, // NumStreamPropArrayEntries
  1304. VideoStreamProperties, // StreamPropertiesArray
  1305. NUMBER_STREAM_EVENTS_OUT_PIN, // NumStreamEventArrayEntries
  1306. StreamEventsOutPin, // StreamEventsArray
  1307. &guidPinCategoryCapture, // Category
  1308. &guidPinNameDVAVOutput, // Name
  1309. NUM_IAV_MEDIUMS, // Mediums count
  1310. DVIavMediums, // Mediums
  1311. FALSE, // BridgeStream
  1312. 0, // Reserved[0]
  1313. 0, // Reserved[1]
  1314. },
  1315. // HW_STREAM_OBJECT ------------------------------------------------
  1316. {
  1317. sizeof(HW_STREAM_OBJECT),
  1318. 1, // StreamNumber
  1319. 0, // HwStreamExtension
  1320. DVRcvDataPacket, // ReceiveDataPacket
  1321. DVRcvControlPacket, // ReceiveControlPacket
  1322. {
  1323. (PHW_CLOCK_FUNCTION) StreamClockRtn, // HW_CLOCK_OBJECT.HWClockFunction
  1324. CLOCK_SUPPORT_CAN_RETURN_STREAM_TIME, // HW_CLOCK_OBJECT.ClockSupportFlags
  1325. 0, // HW_CLOCK_OBJECT.Reserved[0]
  1326. 0, // HW_CLOCK_OBJECT.Reserved[1]
  1327. },
  1328. FALSE, // Dma
  1329. FALSE, // Pio
  1330. 0, // HwDeviceExtension
  1331. 0, // StreamHeaderMediaSpecific
  1332. 0, // StreamHeaderWorkspace
  1333. FALSE, // Allocator
  1334. DVEventHandler, // HwEventRoutine
  1335. 0, // Reserved[0]
  1336. 0, // Reserved[1]
  1337. },
  1338. },
  1339. // -----------------------------------------------------------------
  1340. // Stream 2, DV flows out of the adapter (interleaved)
  1341. // -----------------------------------------------------------------
  1342. {
  1343. // HW_STREAM_INFORMATION -------------------------------------------
  1344. {
  1345. 1, // NumberOfPossibleInstances
  1346. KSPIN_DATAFLOW_IN, // DataFlow
  1347. TRUE, // DataAccessible
  1348. NUM_DVCR_STREAM1_FORMATS, // NumberOfFormatArrayEntries
  1349. DVCRStream1Formats, // StreamFormatsArray
  1350. 0, // ClassReserved[0]
  1351. 0, // ClassReserved[1]
  1352. 0, // ClassReserved[2]
  1353. 0, // ClassReserved[3]
  1354. NUMBER_VIDEO_STREAM_PROPERTIES_INPIN, // NumStreamPropArrayEntries
  1355. VideoStreamPropertiesInPin, // StreamPropertiesArray
  1356. NUMBER_STREAM_EVENTS_IN_PIN, // NumStreamEventArrayEntries
  1357. StreamEventsInPin, // StreamEventsArray
  1358. NULL, // Category
  1359. &guidPinNameDVAVInput, // Name
  1360. NUM_IAV_MEDIUMS, // Mediums count
  1361. DVIavMediums, // Mediums
  1362. FALSE, // BridgeStream
  1363. 0, // Reserved[0]
  1364. 0, // Reserved[1]
  1365. },
  1366. // HW_STREAM_OBJECT ------------------------------------------------
  1367. {
  1368. sizeof( HW_STREAM_OBJECT ),
  1369. 2, // StreamNumber
  1370. 0, // HwStreamExtension
  1371. DVRcvDataPacket, // ReceiveDataPacket
  1372. DVRcvControlPacket, // ReceiveControlPacket
  1373. {
  1374. (PHW_CLOCK_FUNCTION) StreamClockRtn, // HW_CLOCK_OBJECT.HWClockFunction
  1375. CLOCK_SUPPORT_CAN_RETURN_STREAM_TIME, // HW_CLOCK_OBJECT.ClockSupportFlags
  1376. 0, // HW_CLOCK_OBJECT.Reserved[0]
  1377. 0, // HW_CLOCK_OBJECT.Reserved[1]
  1378. },
  1379. FALSE, // Dma
  1380. FALSE, // Pio
  1381. 0, // HwDeviceExtension
  1382. 0, // StreamHeaderMediaSpecific
  1383. 0, // StreamHeaderWorkspace
  1384. #ifdef SUPPORT_NEW_AVC
  1385. // Testing: Input pin as the allocator.
  1386. TRUE, // Allocator
  1387. #else
  1388. FALSE, // Allocator
  1389. #endif
  1390. DVEventHandler, // HwEventRoutine
  1391. 0, // Reserved[0]
  1392. 0, // Reserved[1]
  1393. }
  1394. }
  1395. };
  1396. #define DV_STREAM_COUNT (SIZEOF_ARRAY(DVStreams))
  1397. #endif // _DVSTRM_INC