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.

152 lines
8.9 KiB

  1. <HTML>
  2. <HEAD>
  3. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
  4. <META NAME="Generator" CONTENT="Microsoft FrontPage 4.0">
  5. <TITLE>atiwdm</TITLE>
  6. <META NAME="Template" CONTENT="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">
  7. </HEAD>
  8. <BODY TEXT="#000000" LINK="#0000ff" VLINK="#800080" BGCOLOR="#ffffff" leftmargin="8">
  9. <FONT FACE="Verdana"><H2><A NAME="MYSAMPLE">ATIWDM �</A> WDM Streaming Video Capture Drivers
  10. for the ATI All-In-Wonder and ATI All-In-Wonder Pro</H2>
  11. <H3>SUMMARY</H3>
  12. </FONT><FONT FACE="Verdana" SIZE=2><P>The ATIWDM project creates four separate
  13. drivers which control the ATI All-In-Wonder video capture hardware.&nbsp;&nbsp; </P>
  14. <UL>
  15. <LI>ATIBT829.sys, the main video capture driver which controls the Brooktree
  16. BT829 video digitizer </LI>
  17. <LI>ATIXBar.sys, controls the board level audio and video routing </LI>
  18. <LI>ATITuneP.sys, controls the TVTuner subsystem </LI>
  19. <LI>ATITvSnd.sys, controls the TV audio decoder subsystem</LI></UL>
  20. <B><P>General</P>
  21. </B><P>The ATIWDM drivers control the All-In-Wonder (Pro) videoport based
  22. capture device.&nbsp; This driver contains sample implementations for almost all of the property sets involved in WDM video capture.&nbsp;&nbsp; </P>
  23. <P>The ATIWDM driver set allows for easy replacement of a single subsystem
  24. without requiring complete recompilation and redistribution of the entire driver
  25. set.&nbsp; For example, the supplied TvTuner driver for the Philips FR1236 tuner
  26. could be replaced by a tuner from another vendor, without affecting the drivers
  27. for the other hardware components.&nbsp;&nbsp; </P>
  28. <P>All of the drivers are children of a parent device, either the Rage2 or
  29. Rage128 graphics chip.&nbsp; The children query their parent for an I2C access
  30. table and then make calls into the parent to perform I2C I/O operations. </P>
  31. <B><P>ATIBT829.sys</P>
  32. </B>
  33. <blockquote>
  34. <P>ATIBT829.sys appears as two separate filters in a DirectShow graph:&nbsp;
  35. &quot;AtiBt829 Capture&quot; and &quot;AtiBt829 Crossbar&quot;.&nbsp; Together
  36. these two filters control all of the functionality present in the Brooktree 829
  37. chip and control the capture process via the VPE Kernel mode
  38. transport.&nbsp;&nbsp;</P>
  39. <P>ATIBT829.sys is a fairly complex driver, in that it supports an input stream
  40. representing analog video, two capture streams for video and VBI data, and two output connection points for DDraw surface allocation filters "Overlay
  41. Mixer", and "VBI Surface Allocator". It also supports input selection via "BT829 Crossbar".<br>
  42. <br>
  43. The actual capture operation is implemented by an interface to Kernel DirectDraw. Capture buffers are passed to KDDraw, where they are filled
  44. by a bus master operation.</P>
  45. <P>The capture filter exposes four output streams and a single input
  46. stream.&nbsp; The output streams are labeled Capture, VP (videoport), VPVBI (videoport
  47. VBI) and VBI.&nbsp; The input stream is labeled AnalogVideoIn and represents the
  48. analog video signal to be digitized.&nbsp; The crossbar portion represents the
  49. input selection multiplexer built into the Brooktree 829 device.</P>
  50. <P>The videoport driver is responsible for enumerating this device which causes
  51. the device driver to be loaded.&nbsp;</P>
  52. </blockquote>
  53. <B><P>ATIXBar.sys</P>
  54. </B>
  55. <blockquote>
  56. <p> ATIXBAR is a sample WDM stream class Crossbar driver for the ATI All-In-Wonder and All-In-Wonder PRO devices. It manifests itself in&nbsp;
  57. a DirectShow graph as "ATI Crossbar", and controls the routing of analog video and audio signals prior to digitization.
  58. It also handles audio muting. Note that the All-In-Wonder exposes two crossbar filters. One is
  59. contained with the BT829 video digitizer minidriver (ATIBT829.SYS), and controls video input selection. ATIXBAR controls all of the board
  60. specific video routing and is a separate crossbar filter.</p>
  61. <p>The videoport driver is responsible for enumerating this device which causes
  62. the device driver to be loaded.&nbsp;<br>
  63. </p>
  64. </blockquote>
  65. <p>
  66. <B>ATITuneP.sys</p>
  67. </B>
  68. <blockquote>
  69. <p> ATITUNEP is a sample WDM stream class TVTuner driver for the ATI All-In-Wonder and All-In-Wonder PRO
  70. devices. It manifests itself in a DShow graph as "ATI TVTuner". It controls the following tuner
  71. hardware (and any other hardware/software compatible devices):<br>
  72. <br>
  73. FR1236 - Philips FR1200 series TV and FM tuner family, including:<br>
  74. FI1216 - CCIR B, G System (Western Europe)<br>
  75. FI1216J - RTMA M+N System (Japan)<br>
  76. FI1236 - RTMA M+N System (USA)<br>
  77. FI1246 - CCIR I System (UK, Ireland, SA, H.K.)<br>
  78. FI1256 - OIRT System (China, Russia, E. Europe)<br>
  79. FI1216 - CCIR B,G, L, L1 System (W. Europe, SE Asia, OZ, NZ)<br>
  80. FR1236MK2 - RTMN M+N System + FM (USA)<br>
  81. </p>
  82. <p>The videoport driver is responsible for enumerating this device which causes
  83. the device driver to be loaded.&nbsp;<br>
  84. </p>
  85. </blockquote>
  86. <B><P>ATITvSnd.sys</P>
  87. </B>
  88. <blockquote>
  89. <p> ATITVSND is a sample WDM stream class TVSound driver for the ATI All-In-Wonder and All-In-Wonder PRO
  90. devices. It manifests itself in a DShow graph as "ATI TVSound". It controls selection of audio
  91. subchannels (SAP) as well as mono/stereo audio decoding.</p>
  92. <p>The videoport driver is responsible for enumerating this device which causes
  93. the device driver to be loaded.&nbsp;<br>
  94. </p>
  95. </blockquote>
  96. <B><P>Keywords</B>: Video capture, WDM, stream class, TvTuner, crossbar, driver,
  97. BT829, ATI.</P>
  98. </FONT><FONT FACE="Verdana"><H3>BUILDING THE SAMPLE</H3>
  99. <P><! ---------------- Snip Snip ---------------- ></FONT><FONT FACE="Verdana" SIZE=2>The sample is built with the standard DDK BUILD utility in the standard checked or free DDK build environment.
  100. To build all drivers, change to the ATIWDM directory and type &quot;build -cez&quot;.&nbsp;&nbsp;
  101. </FONT></P>
  102. <FONT FACE="Verdana"><H3>RESOURCES</H3>
  103. </FONT><FONT FACE="Verdana" SIZE=2><P>This driver has been tested with the following applicatons: Graphedt.exe, AMCap.exe, WebTV for Windows.</P>
  104. <P>This website contains general information on driver and hardware development:</P><DIR>
  105. <DIR>
  106. </FONT><P><A HREF="http://www.microsoft.com/hwdev">http://www.microsoft.com/hwdev</A><FONT FACE="Verdana" SIZE=2> </P></DIR>
  107. </DIR>
  108. <P>This website contains information on DirectShow:</P><DIR>
  109. <DIR>
  110. </FONT><P><A HREF="http://www.microsoft.com/directx">http://www.microsoft.com/directx</A> </P>
  111. <FONT FACE="Verdana"><H3>&nbsp;</H3></DIR>
  112. </DIR>
  113. <H3>CODE TOUR</H3>
  114. <H4>File Manifest</H4>
  115. </FONT><U><PRE>File Description
  116. </U><FONT FACE="Verdana"> </PRE>
  117. </FONT><H4>Programming Tour</H4>
  118. <FONT FACE="Verdana" SIZE=2><P>DriverEntry() is the initial point of entry for the driver. It initializes the hardware initialization structure and registers the secondary entry point functions. </P>
  119. <P>HwReceivePacket field describes the entry point for receiving SRBs (Stream Request Packet) from stream class driver. Here is a possible sequence of SRBs that this driver may receive.</P>
  120. <OL>
  121. <LI>SRB_INITIALIZE_DEVICE to initialize the device, and called after DriverEntry().</LI>
  122. <LI>SRB_GET_STREAM_INFO to get supported stream format.</LI>
  123. <LI>SRB_GET_DATA_INTERSECTION to query a supported format given some key fields.</LI>
  124. <LI>SRB_OPEN_STREAM to open a stream with supply format from SRB_GET_DATA_INTERSECTION. Two additional entry point functions are register for this stream for controlling the streaming state (Srb-&gt;StreamObject-&gt;ReceiveControlPacket) and for streaming data (Srb-&gt;StreamObject-&gt;ReceiveDataPacket). </LI>
  125. <LI>SRB_CLOSE_STREAM to close the open stream.</LI>
  126. <LI>SRB_UNINITIALIZE_DEVICE to indicate that a device has been unloaded or removed.</LI></OL>
  127. <P>This driver also register entry points for canceling packets (HwCancelPacket) and for notifying if a packet has timeout (HwRequestTimeoutHandler). </P>
  128. <B><P>Clocks</P>
  129. </B><P>ATIBT829.sys, like most video capture drivers, does not act as clock source for a filter graph. </P>
  130. <B><P>Frame rate and dropped frames</P>
  131. </B><P>Digital cameras support discrete frame rates; however, a client application can request to stream at any rate. It is required by WDM video capture driver to either match or select the next lower frame rate available. Over sampling can cause synchronization problems. </P>
  132. <P>The dropped frame information is calculated instead of actual count, and it is based on the capture rate and the actual counts of frames captured. </P>
  133. <P>&nbsp;<B>Work items</P>
  134. </B><P>&nbsp;</P>
  135. </FONT><P ALIGN="CENTER"><A HREF="#top"><FONT FACE="Verdana" SIZE=2>Top of page</FONT></A><FONT FACE="Verdana" SIZE=2> </P></FONT>
  136. <TABLE CELLSPACING=0 BORDER=0 WIDTH=624>
  137. <TR><TD VALIGN="MIDDLE" BGCOLOR="#00ffff" HEIGHT=2>
  138. <P></TD>
  139. </TR>
  140. </TABLE>
  141. <FONT FACE="MS Sans Serif" SIZE=1><P>&copy; 2002 Microsoft Corporation</FONT><FONT FACE="Verdana" SIZE=2> </P></FONT></BODY>
  142. </HTML>