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.

271 lines
4.7 KiB

  1. //===========================================================================
  2. //
  3. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  4. // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  5. // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  6. // PURPOSE.
  7. //
  8. // Copyright (c) 1996 - 1998 Microsoft Corporation. All Rights Reserved.
  9. //
  10. //===========================================================================
  11. /*++
  12. Module Name:
  13. dcampkt.h
  14. Abstract:
  15. Header file for dcampkt.c
  16. Author:
  17. Shaun Pierce 25-May-96
  18. Environment:
  19. Kernel mode only
  20. Revision History:
  21. --*/
  22. //
  23. // Function prototypes
  24. //
  25. void
  26. tmGetStreamTime(
  27. IN PHW_STREAM_REQUEST_BLOCK Srb,
  28. PSTREAMEX pStrmEx,
  29. ULONGLONG * ptmStream
  30. );
  31. BOOL
  32. DCamAllocateIrbAndIrp(
  33. PIRB * ppIrb,
  34. PIRP * ppIrp,
  35. CCHAR StackSize
  36. );
  37. BOOL
  38. DCamAllocateIrbIrpAndContext(
  39. PDCAM_IO_CONTEXT * ppDCamIoContext,
  40. PIRB * ppIrb,
  41. PIRP * ppIrp,
  42. CCHAR StackSize
  43. );
  44. void
  45. DCamFreeIrbIrpAndContext(
  46. PDCAM_IO_CONTEXT pDCamIoContext,
  47. PIRB pIrb,
  48. PIRP pIrp
  49. );
  50. BOOL
  51. DCamIsoEnable(
  52. PIRB pIrb,
  53. PDCAM_EXTENSION pDevExt,
  54. BOOL Enable
  55. );
  56. VOID
  57. DCamCancelAllPackets(
  58. PHW_STREAM_REQUEST_BLOCK pSrb,
  59. PDCAM_EXTENSION pDevExt,
  60. LONG *plPendingReadCount
  61. );
  62. VOID
  63. DCamSurpriseRemoval(
  64. IN PHW_STREAM_REQUEST_BLOCK pSrb
  65. );
  66. VOID
  67. DCamTimeoutHandler(
  68. IN PHW_STREAM_REQUEST_BLOCK Srb
  69. );
  70. VOID
  71. DCamReceivePacket(
  72. IN PHW_STREAM_REQUEST_BLOCK Srb
  73. );
  74. VOID
  75. DCamGetStreamInfo(
  76. IN PHW_STREAM_REQUEST_BLOCK Srb
  77. );
  78. NTSTATUS
  79. DCamAllocateIsochResource(
  80. PDCAM_EXTENSION pDevExt,
  81. PIRB Irb,
  82. BOOL bAllocateResource
  83. );
  84. NTSTATUS
  85. DCamFreeIsochResource(
  86. PDCAM_EXTENSION pDevExt,
  87. PIRB Irb,
  88. BOOL bFreeResource
  89. );
  90. VOID
  91. DCamOpenStream(
  92. IN PHW_STREAM_REQUEST_BLOCK Srb
  93. );
  94. VOID
  95. DCamCloseStream(
  96. IN PHW_STREAM_REQUEST_BLOCK Srb
  97. );
  98. VOID
  99. DCamReceiveDataPacket(
  100. IN PHW_STREAM_REQUEST_BLOCK Srb
  101. );
  102. VOID
  103. DCamReceiveCtrlPacket(
  104. IN PHW_STREAM_REQUEST_BLOCK Srb
  105. );
  106. VOID
  107. DCamReadStream(
  108. IN PHW_STREAM_REQUEST_BLOCK Srb
  109. );
  110. VOID
  111. DCamReadStreamWorker(
  112. IN PHW_STREAM_REQUEST_BLOCK Srb,
  113. IN PISOCH_DESCRIPTOR IsochDescriptor
  114. );
  115. VOID
  116. DCamIsochCallback(
  117. IN PVOID Context1,
  118. IN PVOID Context2
  119. );
  120. NTSTATUS
  121. DCamDetachBufferCR(
  122. IN PDEVICE_OBJECT DeviceObject,
  123. IN PIRP Irp,
  124. IN PVOID Context
  125. );
  126. NTSTATUS
  127. DCamStartListenCR(
  128. IN PDEVICE_OBJECT DeviceObject,
  129. IN PIRP Irp,
  130. IN PVOID SystemArgument
  131. );
  132. VOID
  133. DCamSetKSStateSTOP(
  134. IN PHW_STREAM_REQUEST_BLOCK Srb
  135. );
  136. BOOL
  137. AdapterCompareGUIDsAndFormatSize(
  138. IN PKSDATARANGE DataRange1,
  139. IN PKSDATARANGE DataRange2
  140. );
  141. BOOL
  142. AdapterVerifyFormat(
  143. ULONG VideoModesSupported,
  144. PKSDATAFORMAT *pDCamStrmModesSupported,
  145. PKS_DATAFORMAT_VIDEOINFOHEADER pKSDataFormatToVerify,
  146. int StreamNumber
  147. );
  148. BOOL
  149. AdapterFormatFromRange(
  150. IN PHW_STREAM_REQUEST_BLOCK Srb
  151. );
  152. VOID VideoGetProperty(PHW_STREAM_REQUEST_BLOCK Srb);
  153. VOID VideoGetState(PHW_STREAM_REQUEST_BLOCK Srb);
  154. VOID VideoStreamGetConnectionProperty (PHW_STREAM_REQUEST_BLOCK Srb);
  155. VOID VideoStreamGetDroppedFramesProperty(PHW_STREAM_REQUEST_BLOCK Srb);
  156. VOID VideoIndicateMasterClock (PHW_STREAM_REQUEST_BLOCK Srb);
  157. ULONGLONG GetSystemTime();
  158. VOID
  159. DCamSetKSStatePAUSE(
  160. IN PHW_STREAM_REQUEST_BLOCK pSrb
  161. );
  162. NTSTATUS
  163. DCamToRunStateCoR(
  164. IN PDEVICE_OBJECT DeviceObject,
  165. IN PIRP pIrp,
  166. IN PDCAM_IO_CONTEXT pDCamIoContext
  167. );
  168. VOID
  169. DCamSetKSStateRUN(
  170. PDCAM_EXTENSION pDevExt,
  171. IN PHW_STREAM_REQUEST_BLOCK pSrb
  172. );
  173. NTSTATUS
  174. DCamCancelBufferCR(
  175. IN PDEVICE_OBJECT DeviceObject,
  176. IN PIRP pIrp,
  177. IN PDCAM_IO_CONTEXT pDCamIoContext
  178. );
  179. BOOL
  180. DCamDeviceInUse(
  181. PIRB pIrb,
  182. PDCAM_EXTENSION pDevExt
  183. );
  184. void
  185. DCamProcessPnpIrp(
  186. IN PHW_STREAM_REQUEST_BLOCK Srb,
  187. PIO_STACK_LOCATION IrpStack,
  188. PDCAM_EXTENSION pDevExt
  189. );
  190. VOID
  191. InitializeStreamExtension(
  192. PDCAM_EXTENSION pDevExt,
  193. PHW_STREAM_OBJECT pStreamObject,
  194. PSTREAMEX pStrmEx
  195. );
  196. BOOL
  197. AdapterFormatFromRange(
  198. IN PHW_STREAM_REQUEST_BLOCK Srb
  199. );
  200. NTSTATUS
  201. DCamReSubmitPacket(
  202. HANDLE hOldResource,
  203. PDCAM_EXTENSION pDevExt,
  204. PSTREAMEX pStrmEx,
  205. LONG PendingReadCount
  206. );
  207. NTSTATUS
  208. DCamSetKSStateInitialize(
  209. PDCAM_EXTENSION pDevExt
  210. );
  211. VOID
  212. DCamChangePower(
  213. IN PHW_STREAM_REQUEST_BLOCK pSrb
  214. );