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.

296 lines
16 KiB

  1. /******************************************************************************\
  2. * *
  3. * STRMINFO.H - All streams deskription for the device. *
  4. * *
  5. * Copyright (c) C-Cube Microsystems 1996 *
  6. * All Rights Reserved. *
  7. * *
  8. * Use of C-Cube Microsystems code is governed by terms and conditions *
  9. * stated in the accompanying licensing statement. *
  10. * *
  11. \******************************************************************************/
  12. #ifndef _STRMINFO_H_
  13. #define _STRMINFO_H_
  14. #include <strmini.h>
  15. //---------------------------------------------------------------------------
  16. // Create an array that holds the list of all of the streams supported
  17. //---------------------------------------------------------------------------
  18. typedef struct _ALL_STREAM_INFO {
  19. HW_STREAM_INFORMATION hwStreamInfo;
  20. HW_STREAM_OBJECT hwStreamObject;
  21. } ALL_STREAM_INFO, *PALL_STREAM_INFO;
  22. static ALL_STREAM_INFO Streams [] =
  23. {
  24. // -----------------------------------------------------------------
  25. // The MPEG Video input stream
  26. // -----------------------------------------------------------------
  27. {
  28. // HW_STREAM_INFORMATION -------------------------------------------
  29. {
  30. 1, // NumberOfPossibleInstances
  31. KSPIN_DATAFLOW_IN, // DataFlow
  32. TRUE, // DataAccessible
  33. NUM_VIDEO_IN_FORMATS, // NumberOfFormatArrayEntries
  34. ZivaVideoInFormatArray, // StreamFormatsArray
  35. 0, // ClassReserved[0]
  36. 0, // ClassReserved[1]
  37. 0, // ClassReserved[2]
  38. 0, // ClassReserved[3]
  39. 2, // NumStreamPropArrayEntries
  40. (PKSPROPERTY_SET)mpegVidPropSet, // StreamPropertiesArray
  41. 0, // NumStreamEventArrayEntries;
  42. 0, // StreamEventsArray;
  43. NULL, // Category
  44. NULL, // Name
  45. 0, // MediumsCount
  46. NULL, // Mediums
  47. },
  48. // HW_STREAM_OBJECT ------------------------------------------------
  49. {
  50. sizeof (HW_STREAM_OBJECT), // SizeOfThisPacket
  51. 0, // StreamNumber
  52. 0, // HwStreamExtension
  53. VideoReceiveDataPacket, // HwReceiveDataPacket
  54. VideoReceiveCtrlPacket, // HwReceiveControlPacket
  55. { NULL, 0 }, // HW_CLOCK_OBJECT
  56. TRUE, // Dma
  57. TRUE, // Pio
  58. 0, // HwDeviceExtension
  59. 0, // StreamHeaderMediaSpecific
  60. 0, // StreamHeaderWorkspace
  61. FALSE, // Allocator
  62. NULL, // HwEventRoutine
  63. { 0, 0 }, // Reserved[2]
  64. }
  65. },
  66. // -----------------------------------------------------------------
  67. // The compressed Audio input stream
  68. // -----------------------------------------------------------------
  69. {
  70. // HW_STREAM_INFORMATION -------------------------------------------
  71. {
  72. 1, // NumberOfPossibleInstances
  73. KSPIN_DATAFLOW_IN, // DataFlow
  74. TRUE, // DataAccessible.
  75. NUM_AUDIO_IN_FORMATS, // NumberOfFormatArrayEntries
  76. ZivaAudioInFormatArray, // StreamFormatsArray
  77. 0, // ClassReserved[0]
  78. 0, // ClassReserved[1]
  79. 0, // ClassReserved[2]
  80. 0, // ClassReserved[3]
  81. 2, // cool. Fix hardcoded value // NumStreamPropArrayEntries
  82. (PKSPROPERTY_SET)audPropSet, // StreamPropertiesArray
  83. 0, // NumStreamEventArrayEntries
  84. 0, // StreamEventsArray
  85. NULL, // Category
  86. NULL, // Name
  87. 0, // MediumsCount
  88. NULL, // Mediums
  89. },
  90. // HW_STREAM_OBJECT ------------------------------------------------
  91. {
  92. sizeof (HW_STREAM_OBJECT), // SizeOfThisPacket
  93. 0, // StreamNumber
  94. 0, // HwStreamExtension
  95. AudioReceiveDataPacket, // HwReceiveDataPacket
  96. AudioReceiveCtrlPacket, // HwReceiveControlPacket
  97. { AudioClockFunction, // HW_CLOCK_OBJECT
  98. CLOCK_SUPPORT_CAN_SET_ONBOARD_CLOCK |
  99. CLOCK_SUPPORT_CAN_READ_ONBOARD_CLOCK |
  100. CLOCK_SUPPORT_CAN_RETURN_STREAM_TIME,
  101. {0,0} },
  102. TRUE, // Dma
  103. TRUE, // Pio
  104. 0, // HwDeviceExtension
  105. 0, // StreamHeaderMediaSpecific
  106. 0, // StreamHeaderWorkspace
  107. FALSE, // Allocator
  108. (PHW_EVENT_ROUTINE) AudioEventFunction, // HwEventRoutine
  109. { 0, 0 }, // Reserved[2]
  110. }
  111. },
  112. // -----------------------------------------------------------------
  113. // The Subpicture input stream
  114. // -----------------------------------------------------------------
  115. {
  116. // HW_STREAM_INFORMATION -------------------------------------------
  117. {
  118. 1, // NumberOfPossibleInstances
  119. KSPIN_DATAFLOW_IN, // DataFlow
  120. TRUE, // DataAccessible
  121. NUM_SUBPICTURE_IN_FORMATS, // NumberOfFormatArrayEntries
  122. ZivaSubPictureInFormatArray, // StreamFormatsArray
  123. 0, // ClassReserved[0]
  124. 0, // ClassReserved[1]
  125. 0, // ClassReserved[2]
  126. 0, // ClassReserved[3]
  127. 2, // NumStreamPropArrayEntries
  128. (PKSPROPERTY_SET)SPPropSet, // StreamPropertiesArray
  129. 0, // NumStreamEventArrayEntries;
  130. 0, // StreamEventsArray;
  131. NULL, // Category
  132. NULL, // Name
  133. 0, // MediumsCount
  134. NULL, // Mediums
  135. },
  136. // HW_STREAM_OBJECT ------------------------------------------------
  137. {
  138. sizeof (HW_STREAM_OBJECT), // SizeOfThisPacket
  139. 0, // StreamNumber
  140. 0, // HwStreamExtension
  141. SubpictureReceiveDataPacket, // HwReceiveDataPacket
  142. SubpictureReceiveCtrlPacket, // HwReceiveControlPacket
  143. { NULL, 0 }, // HW_CLOCK_OBJECT
  144. TRUE, // Dma
  145. TRUE, // Pio
  146. 0, // HwDeviceExtension
  147. 0, // StreamHeaderMediaSpecific
  148. 0, // StreamHeaderWorkspace
  149. FALSE, // Allocator
  150. NULL, // HwEventRoutine
  151. { 0, 0 }, // Reserved[2]
  152. }
  153. },
  154. // -----------------------------------------------------------------
  155. // The TV Video Output Stream
  156. // -----------------------------------------------------------------
  157. {
  158. // HW_STREAM_INFORMATION -------------------------------------------
  159. {
  160. 1, // NumberOfPossibleInstances
  161. KSPIN_DATAFLOW_OUT, // DataFlow
  162. FALSE, // DataAccessible
  163. NUM_ANALOG_VIDEO_FORMATS, // NumberOfFormatArrayEntries
  164. AnalogVideoFormats, // StreamFormatsArray
  165. 0, // ClassReserved[0]
  166. 0, // ClassReserved[1]
  167. 0, // ClassReserved[2]
  168. 0, // ClassReserved[3]
  169. 0, // NumStreamPropArrayEntries
  170. 0, // StreamPropertiesArray
  171. 0, // NumStreamEventArrayEntries;
  172. 0, // StreamEventsArray;
  173. &AnalogVideoStreamPinName, // Category
  174. &AnalogVideoStreamPinName, // Name
  175. 1, // MediumsCount
  176. &CrossbarMediums[3], // Mediums
  177. },
  178. // HW_STREAM_OBJECT ------------------------------------------------
  179. {
  180. sizeof (HW_STREAM_OBJECT), // SizeOfThisPacket
  181. 0, // StreamNumber
  182. 0, // HwStreamExtension
  183. VideoReceiveDataPacket, // HwReceiveDataPacket
  184. VideoReceiveCtrlPacket, // HwReceiveControlPacket
  185. NULL, // HW_CLOCK_OBJECT.HWClockFunction
  186. 0, // HW_CLOCK_OBJECT.ClockSupportFlags
  187. FALSE, // Dma
  188. TRUE, // Pio
  189. 0, // HwDeviceExtension
  190. 0, // StreamHeaderMediaSpecific
  191. 0, // StreamHeaderWorkspace
  192. FALSE, // Allocator
  193. NULL, // HwEventRoutine
  194. },
  195. }
  196. // -----------------------------------------------------------------
  197. // The TV Port output stream
  198. // -----------------------------------------------------------------
  199. {
  200. // HW_STREAM_INFORMATION -------------------------------------------
  201. {
  202. 1, // NumberOfPossibleInstances
  203. KSPIN_DATAFLOW_OUT, // DataFlow
  204. FALSE, // DataAccessible.
  205. NUM_NTSC_OUT_FORMATS, // NumberOfFormatArrayEntries
  206. ZivaNTSCOutFormatArray, // StreamFormatsArray
  207. 0, // ClassReserved[0]
  208. 0, // ClassReserved[1]
  209. 0, // ClassReserved[2]
  210. 0, // ClassReserved[3]
  211. 0, // cool. Fix hardcoded value // NumStreamPropArrayEntries
  212. NULL, // StreamPropertiesArray
  213. SIZEOF_ARRAY(VPVBIEventSet), // NumStreamEventArrayEntries
  214. VPVBIEventSet, // StreamEventsArray
  215. &VPVBIPinName, // Category
  216. &VPVBIPinName, // Name
  217. 0, // MediumsCount
  218. NULL, // Mediums
  219. },
  220. // HW_STREAM_OBJECT ------------------------------------------------
  221. {
  222. sizeof (HW_STREAM_OBJECT), // SizeOfThisPacket
  223. 0, // StreamNumber
  224. 0, // HwStreamExtension
  225. VideoReceiveDataPacket, // HwReceiveDataPacket
  226. VideoReceiveCtrlPacket, // HwReceiveControlPacket
  227. { NULL, 0 }, // HW_CLOCK_OBJECT
  228. FALSE, // Dma
  229. FALSE, // Pio
  230. 0, // HwDeviceExtension
  231. 0, // StreamHeaderMediaSpecific
  232. 0, // StreamHeaderWorkspace
  233. FALSE, // Allocator
  234. VPVBIStreamEventProc, // HwEventRoutine;
  235. { 0, 0 }, // Reserved[2]
  236. }
  237. },
  238. };
  239. #define DRIVER_STREAM_COUNT (sizeof (Streams) / sizeof (ALL_STREAM_INFO))
  240. //---------------------------------------------------------------------------
  241. // Topology
  242. //---------------------------------------------------------------------------
  243. // Categories define what the device does.
  244. static GUID Categories[] = {
  245. STATIC_KSCATEGORY_VIDEO,
  246. STATIC_KSCATEGORY_CAPTURE,
  247. STATIC_KSCATEGORY_CROSSBAR,
  248. };
  249. #define NUMBER_OF_CATEGORIES SIZEOF_ARRAY (Categories)
  250. static KSTOPOLOGY Topology = {
  251. NUMBER_OF_CATEGORIES, // CategoriesCount
  252. (GUID*) &Categories, // Categories
  253. 0, // TopologyNodesCount
  254. NULL, // TopologyNodes
  255. 0, // TopologyConnectionsCount
  256. NULL, // TopologyConnections
  257. NULL, // TopologyNodesNames
  258. 0, // Reserved
  259. };
  260. //---------------------------------------------------------------------------
  261. // The Main stream header
  262. //---------------------------------------------------------------------------
  263. static HW_STREAM_HEADER StreamHeader =
  264. {
  265. DRIVER_STREAM_COUNT, // NumberOfStreams
  266. sizeof (HW_STREAM_INFORMATION), // Future proofing
  267. 0, // NumDevPropArrayEntries set at init time
  268. NULL, // DevicePropertiesArray set at init time
  269. 0, // NumDevEventArrayEntries;
  270. NULL, // DeviceEventsArray;
  271. &Topology // Pointer to Device Topology
  272. };
  273. #endif // _STRMINFO_H_