|
|
<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head> <meta http-equiv=Content-Type content="text/html; charset=windows-1252"> <meta name=ProgId content=Word.Document> <meta name=Generator content="Microsoft Word 10"> <meta name=Originator content="Microsoft Word 10"> <link rel=File-List href="BDATuner_files/filelist.xml"> <title>BDA Sample Generic Tuner Driver</title> <!--[if gte mso 9]><xml>
<w:WordDocument> <w:SpellingState>Clean</w:SpellingState> <w:GrammarState>Clean</w:GrammarState> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--> <style> <!--
/* Font Definitions */ @font-face {font-family:Verdana; panose-1:2 11 6 4 3 5 4 4 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:536871559 0 0 0 415 0;} @font-face {font-family:"MS Sans Serif"; panose-1:0 0 0 0 0 0 0 0 0 0; mso-font-alt:"Times New Roman"; mso-font-charset:0; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:auto; mso-font-signature:0 0 0 0 0 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} h2 {mso-margin-top-alt:auto; margin-right:0in; mso-margin-bottom-alt:auto; margin-left:0in; mso-pagination:widow-orphan; mso-outline-level:2; font-size:18.0pt; font-family:"Times New Roman"; font-weight:bold;} h3 {mso-margin-top-alt:auto; margin-right:0in; mso-margin-bottom-alt:auto; margin-left:0in; mso-pagination:widow-orphan; mso-outline-level:3; font-size:13.5pt; font-family:"Times New Roman"; font-weight:bold;} p {mso-margin-top-alt:auto; margin-right:0in; mso-margin-bottom-alt:auto; margin-left:0in; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} pre {margin-top:0in; margin-bottom:0in; margin-bottom:.0001pt; font-size:10.0pt; font-family:"Courier New"; mso-fareast-font-family:"Times New Roman";} span.SpellE {mso-style-name:""; mso-spl-e:yes;} span.GramE {mso-style-name:""; mso-gram-e:yes;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> </style> <!--[if gte mso 10]>
<style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman";} </style> <![endif]--> <meta name=Template content="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot"> </head>
<body lang=EN-US link=blue vlink=blue style='tab-interval:.5in' topmargin=0>
<div class=Section1>
<h2><a name=MYSAMPLE><span style='font-family:Verdana'>BDA Sample Generic Tuner Driver</span></a><span style='font-family:Verdana'> <o:p></o:p></span></h2>
<h3><span style='font-family:Verdana'>SUMMARY<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>This sample is the source code for a generic tuner sample Broadcast Driver Architecture (BDA) driver for Windows� XP. It is provided as an example of a BDA device <span class=SpellE>minidriver</span> for the <span class=SpellE>AVStream</span> class of kernel streaming and to give hardware vendors assistance in writing their own BDA <span class=SpellE>minidrivers</span>. This sample does not have any associated hardware.<span style='mso-spacerun:yes'>� </span>The driver is designed to work the sample BDA Capture driver.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>BUILDING THE SAMPLE<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>To build the sample, open a DDK command window, change to the BDA directory, and use the <b>build</b> command. The build command gets instructions on how to build from the <a href="#sources">Sources file</a>. <o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>This sample can be built as either an ATSC sample or a DVB-S sample.<span style='mso-spacerun:yes'>� </span>To select the flavor of sample simply uncomment the appropriate MACRO definition (ATSC_RECEIVER or DVBS_RECEIVER) in <span class=SpellE>BDATuner.h</span>.<span style='mso-spacerun:yes'>�� </span>Make sure only one of the receiver type <span class=SpellE>MACROs</span> is defined.<span style='mso-spacerun:yes'>� </span>Building this sample produces one file: <span class=SpellE>BDATuner.sys</span>. Both free and checked versions can be built.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The best way to use the sample BDA tuner driver is to build both <span class=SpellE>BDATuner.sys</span> and <span class=SpellE>BDACap.sys</span>.<span style='mso-spacerun:yes'>� </span>Copy these to a directory along with the sample BDA tuner INF (<span class=SpellE>BDATuner.inf</span>), sample BDA capture <span class=GramE>INF(</span><span class=SpellE>BDACap.inf</span>), and software receiver INF (<span class=SpellE>BDASWRcv.inf</span>).<span style='mso-spacerun:yes'>� </span>Start the installation by right clicking <span class=SpellE>BDASWRcv.inf</span> and then left clicking Install.<span style='mso-spacerun:yes'>� </span>Follow the direction to complete installation of both the sample BDA tuner and sample BDA capture drivers.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>TOOLS<o:p></o:p></span></h3>
<p><span class=SpellE><span style='font-size:10.0pt;font-family:Verdana'>GraphEdit</span></span><span style='font-size:10.0pt;font-family:Verdana'> uses the BDA sample generic tuner driver to configure a filter for the driver in a filter graph. This BDA sample generic tuner filter does not perform any specific functions. You can connect the BDA ATSC or DVB-S network provider filters to the input pin of the generic filter. You can connect the BDA capture filter to the output pin of the BDA tuner filter.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>The sample BDA capture appears under "BDA Receiver Components" as "Sample BDA Capture".<span style='mso-spacerun:yes'>� </span>The sample BDA tuner appears under �BDA Source Filters� as �Sample BDA Tuner Filter�.<span style='mso-spacerun:yes'>� </span>The ATSC Network Provider appears under �BDA Network Providers� as �Microsoft ATSC Network Provider�.<span style='mso-spacerun:yes'>� </span>The DVB-S Network Provider appears under �BDA Network Providers� as �Microsoft DVBS Network Provider�.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Many properties can be set on your filter by right-clicking the Network Provider filter in <span class=SpellE>GraphEdt</span> and selecting Properties.<span style='mso-spacerun:yes'>� </span>The displayed property pages allow for the creation and submission of tune requests that ultimately result in properties being set on your driver.<span style='mso-spacerun:yes'>� </span>Note that, if you are testing a DVB-S driver, you should use the DVBS Network Provider property pages to create ad DVB-S tuning space called �MYDVB�. To access these properties you must first run Regsvr32 on PropPage.dll which is delivered in the Direct Show SDK. <span style='mso-spacerun:yes'>�</span>You can also create a <span class=SpellE>plugin</span> to directly access and configure the BDA sample generic tuner filter.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>RESOURCES<o:p></o:p></span></h3>
<p><span style='font-size:10.0pt;font-family:Verdana'>To get a logo for your device, consult the <a href="http://www.microsoft.com/hwtest">WHQL Web site</a> for information and test suites.<o:p></o:p></span></p>
<p><span style='font-size:10.0pt;font-family:Verdana'>Your device should support Plug and Play. Download Plug and Play specs from their <a href="http://www.microsoft.com/hwdev/respec/pnpspecs.htm">Web site</a>.<o:p></o:p></span></p>
<h3><span style='font-family:Verdana'>CODE TOUR<o:p></o:p></span></h3>
<h4><span style='font-family:Verdana'>File Manifest<o:p></o:p></span></h4>
<pre><u>File<span style='mso-tab-count:2'>���������� </span><span style='mso-spacerun:yes'>���� </span>Description<o:p></o:p></u></pre><pre><o:p> </o:p></pre><pre><span class=SpellE>Bdadebug.h</span><span style='mso-tab-count:1'>���� </span>Contains macros that the driver uses for debugging</pre><pre>BdaTuner.htm<span style='mso-tab-count:1'>�� </span>The documentation for this sample (this file)</pre><pre><span class=SpellE>Bdaguid.c</span><span style='mso-tab-count:1'>����� </span>Includes header files used for defining <span class=SpellE>GUIDs</span></pre><pre><span class=SpellE>BDATuner.h</span><span style='mso-tab-count:1'>���� </span>Defines classes for filter, device, and filter I/O pins.</pre><pre><span class=SpellE>BDATuner.inf</span><span style='mso-tab-count:1'>�� </span>Installation information for the sample</pre><pre><span class=SpellE>BDATuner.rc</span><span style='mso-tab-count:1'>��� </span>Version information resource</pre><pre><span class=SpellE>Common.h</span><span style='mso-tab-count:1'>������ </span>Includes necessary header files, like <span class=SpellE>Bdasup.h</span></pre><pre><span class=SpellE>Device.cpp</span><span style='mso-tab-count:1'>���� </span>Main code of BDA device, including driver-entry point</pre><pre><span class=SpellE>Filter.cpp</span><span style='mso-tab-count:1'>���� </span>Implements methods of the filter class </pre><pre><span class=SpellE>Inpin.cpp</span><span style='mso-tab-count:1'>����� </span>Implements the class for the input pin</pre><pre><span class=SpellE>Makefile</span><span style='mso-tab-count:1'>������ </span>The <span class=SpellE>makefile</span> for the project; do not edit.</pre><pre><span class=SpellE>ObjDesc.cpp</span><span style='mso-tab-count:1'>��� </span>Defines automation and dispatch tables and template structures</pre><pre><span class=SpellE>Outpin.cpp</span><span style='mso-tab-count:1'>���� </span>Implements the class for the output pin</pre><pre>Sources<span style='mso-tab-count:1'> </span><span style='mso-spacerun:yes'>������� </span>DDK build instructions</pre><pre><span class=SpellE>Splmedia.h</span><span style='mso-tab-count:1'>���� </span>Defines properties, methods, and events for </pre><pre><span style='mso-spacerun:yes'>���������������</span><span style='mso-spacerun:yes'>����</span><span class=GramE>the</span> sample's nodes</pre><pre><span class=SpellE>Wdmdebug.h</span><span style='mso-tab-count:1'>���� </span>Contains macros for WDM debugging</pre><pre><o:p> </o:p></pre>
<h4><span style='font-family:Verdana'>Programming Tour<o:p></o:p></span></h4>
<p><span style='font-size:10.0pt;font-family:Verdana'>The <span class=SpellE>ObjDesc.cpp</span> file contains definitions and templates that the network provider filter can use to determine topology, to configure and change a filter instance, and to manipulate the sample's nodes. The BDA sample software tuner driver registers these definitions and templates with the BDA support library so the library can handle most aspects of these operations. Other files of this sample define constants, structures, and classes and implement methods for those classes. <o:p></o:p></span></p>
<h4><a name=sources><span style='font-family:Verdana'>Sources File</span></a><span style='font-family:Verdana'><o:p></o:p></span></h4>
<p><span style='font-size:10.0pt;font-family:Verdana'>The <!--A HREF="sources"-->Sources<!--/a--> file contains instructions on how to build the BDA sample software tuner driver. The following code shows the macros used in the Sources file along with comments that explain what those macros do.<o:p></o:p></span></p>
<pre><o:p> </o:p></pre><pre><span style='mso-tab-count:1'>������� </span>TARGETNAME=<span class=SpellE><span class=GramE>BDATuner</span></span><span class=GramE><span style='mso-spacerun:yes'>� </span>#</span> Set driver's name</pre><pre><span style='mso-tab-count:1'>������� </span>TARGETTYPE=DRIVER<span style='mso-spacerun:yes'>��� </span># Set type of file built, for example, program, DLL, or driver</pre><pre><span style='mso-tab-count:1'>������� </span><span style='mso-spacerun:yes'>�������������������� </span># For BDA <span class=SpellE><span class=GramE>minidriver</span></span><span class=GramE>,</span> set to DRIVER.</pre><pre><span style='mso-tab-count:1'>������� </span>TARGETPATH=<span class=SpellE>obj</span>$(BUILD_ALT_DIR<span class=GramE>)<span style='mso-spacerun:yes'>� </span>#</span> Set destination directory for the built file</pre><pre><span style='mso-tab-count:1'>������� </span> # Depending on whether your build environment is "free" or "checked",</pre><pre><span style='mso-tab-count:1'>������� </span> # the BUILD_ALT_DIR variable appends "<span class=SpellE>fre</span>" or "<span class=SpellE>chk</span>" to the \<span class=SpellE>obj</span> subdirectory.</pre><pre><span style='mso-tab-count: 1'>������� </span>DRIVERTYPE=<span class=GramE>WDM<span style='mso-spacerun:yes'>� </span>#</span> Set type of driver, can be set to either WDM or VXD.</pre><pre><span style='mso-tab-count:1'>������� </span><span style='mso-spacerun:yes'>��������������� </span># For <span class=GramE>BDA,</span> set to WDM.</pre><pre><o:p> </o:p></pre><pre><span style='mso-tab-count:1'>������� </span># Generate .SYM and .PDB (map) files.<span style='mso-spacerun:yes'>� </span>These files map names to addresses. </pre><pre><span style='mso-tab-count:1'>������� </span># <span class=GramE>Required</span> to debug on Win9x.</pre><pre><span style='mso-tab-count:1'>������� </span>USE_MAPSYM=1<span style='mso-spacerun:yes'>� </span></pre><pre><o:p> </o:p></pre><pre><span style='mso-tab-count:1'>������� </span># Point to the header files that the sample source requires. </pre><pre><span style='mso-tab-count:1'>������� </span>INCLUDES=<span class=GramE>..</span>\..\..\..\inc; \</pre><pre><span style='mso-tab-count:1'>������� </span><span style='mso-spacerun:yes'>� </span>$(DDK_INC_PATH)\<span class=SpellE>wdm</span>; </pre><pre><o:p> </o:p></pre><pre><span style='mso-tab-count:1'>������� </span># Point to the library files that the sample source requires. </pre><pre><span style='mso-tab-count:1'>������� </span>TARGETLIBS=<span class=GramE>..</span>\..\..\..\lib\<span class=SpellE>ks.lib</span> \</pre><pre><span style='mso-tab-count:1'>������� </span><span style='mso-spacerun:yes'>���� </span>..\..\..\..\lib\<span class=SpellE>ksguid.lib</span> \</pre><pre><span style='mso-tab-count:1'>������� </span><span style='mso-spacerun:yes'>����� </span>..\..\..\..\lib\<span class=SpellE>BdaSup.lib</span></pre><pre><o:p> </o:p></pre><pre><span style='mso-tab-count:1'>������� </span># <span class=GramE>The</span> following macros are used with the Soft-ICE debugging tool.</pre><pre><span style='mso-tab-count:1'>������� </span>!<span class=SpellE>ifdef</span> BUILD_SOFTICE_SYMBOLS</pre><pre><span style='mso-tab-count:1'>������� </span>TARGETPATHEX=$(TARGETPATH)\$(TARGET_DIRECTORY)</pre><pre><o:p> </o:p></pre><pre><span style='mso-tab-count:1'>������� </span>NTTARGETFILES=$(TARGETPATH)\$(TARGETNAME).<span class=SpellE>dbg</span></pre><pre><o:p> </o:p></pre><pre><span style='mso-tab-count:1'>������� </span>NTTARGETFILES=$(TARGETPATHEX)\$(TARGETNAME).<span class=SpellE>nms</span> $(NTTARGETFILES)</pre><pre><span style='mso-tab-count: 1'>������� </span>!<span class=SpellE>endif</span></pre><pre><o:p> </o:p></pre><pre><span style='mso-tab-count:1'>������� </span><span class=GramE># Sample source files that must be compiled.</span></pre><pre><span style='mso-tab-count:1'>������� </span>SOURCES= \</pre><pre><span style='mso-tab-count:1'>������� </span><span style='mso-spacerun:yes'>��� </span><span class=SpellE>ObjDesc.cpp</span><span style='mso-spacerun:yes'>���� </span>\</pre><pre><span style='mso-tab-count:1'>������� </span><span style='mso-spacerun:yes'>��� </span><span class=SpellE>inpin.cpp</span><span style='mso-spacerun:yes'>���� </span>\</pre><pre><span style='mso-tab-count:1'>������� </span><span style='mso-spacerun:yes'>��� </span><span class=SpellE>outpin.cpp</span><span style='mso-spacerun:yes'>��� </span>\</pre><pre><span style='mso-tab-count:1'>������� </span><span style='mso-spacerun:yes'>��� </span><span class=SpellE>Filter.cpp</span><span style='mso-spacerun:yes'>����� </span>\</pre><pre><span style='mso-tab-count:1'>������� </span><span style='mso-spacerun:yes'>��� </span><span class=SpellE>Device.cpp</span><span style='mso-spacerun:yes'>����� </span>\</pre><pre><span style='mso-tab-count:1'>������� </span><span style='mso-spacerun:yes'>��� </span><span class=SpellE>bdaguid.c</span><span style='mso-spacerun:yes'>������ </span>\</pre><pre><span style='mso-tab-count:1'>������� </span><span style='mso-spacerun:yes'>��� </span><span class=SpellE>BDATuner.rc</span></pre>
<p align=center style='text-align:center'><span style='font-size:10.0pt; font-family:Verdana'><a href="#top">Top of page</a> <o:p></o:p></span></p>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=624 style='width:6.5in;mso-cellspacing:0in'> <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes;height:1.5pt'> <td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:1.5pt'> <p class=MsoNormal><o:p> </o:p></p> </td> </tr> </table>
<p><span style='font-size:7.5pt;font-family:"MS Sans Serif"'>� 2000 Microsoft Corporation</span><span style='font-size:10.0pt;font-family:Verdana'> <o:p></o:p></span></p>
</div>
</body>
</html>
|