B2C2, Inc. - Software Development Kit

Code Sample Applications > TestDataFilter

TestDataFilter (Windows Only)

TestDataFilter is a Windows command-line application that tests the Data PID interface to the B2C2 MPEG-2 filter. The desired tuner parameters and data PIDs are set via command-line arguments.

Before Running the Application

Dump.ax (located in the B2C2 SDK\Filters directory) is a DirectShow filter required for running the sample Microsoft Visual C++ project Test Data Filter. The Dump.ax filter can be installed as follows:

  1. In a Windows command window, change directory to <B2C2 SDK Root>\Filters.
  2. Run following command: regsvr32 Dump.ax

Dump.ax

File dump filter Dump.ax is a useful debugging tool. You can build a filter graph using the Filter Graph Editor and connect the Dump filter to the output of a transform filter or any other output pin. You can also connect a tee filter and put the Dump filter on one leg of the tee filter and the typical output on another leg to monitor the results in a real-time scenario. Dump.ax uses base filter class CBaseFilter, rendered input pin class CRenderedInputPin, and the IFileSinkFilter interface.

Dump.ax is classified a "renderer” filter in that it has no output pins; it has only a single input pin, which is dumped to a file. Dump.ax prompts the user for a filename when it is instantiated and closes the file when it is freed.

Dump.ax is installed with the Microsoft® DirectShow® run time (a set of DLLs used for playing back supported media) and is available through the Filter Graph Editor when you choose Insert Filters from the Graph menu, and select the DirectShow Filters category. Microsoft® DirectShow® samples are part of the Microsoft® DirectX® Media Software Development Kit (SDK).

Running the Application

Run TestDataFilter directly from the command prompt by typing TestDataFilter followed by the required command-line arguments. Note: Settings provided are for example only. Actual Tuner and PID settings vary with the local network.

Satellite Example:

TestDataFilter -i s -f 12384 -s 20000 -l 11250 -e auto -o h -k 0 -d a/a -p0 0x1623

To run TestDataFilter from script, edit a *.bat file script such as run_tavf_sat.bat using required command-line arguments. Run the *.bat file by typing its name (run_tavf_sat.bat) at the command prompt.

Command-line Arguments

Required Arguments

 

Description

 

Example

      Note: Some arguments are only required if a certain tuner type is used. For these cases, tuner type will be noted as follows: c (cable), s (satellite), t (terrestrial DVB), a (terrestrial ATSC).    
 

-a

  Adapter name.  

-a eth1

 

-i

  Tuner type. Valid values are: c (cable), s (satellite), t (terrestrial DVB), a (terrestrial ATSC).  

-i s

 

-f

  Transponder Frequency in MHz (c, s, t, a).  

-f 12426

  -s   Symbol Rate in KS/s (c, s).  

-s 27500

  -m   Modulation in QAM (c). Valid values are: 4, 16, 32, 64, 128, 256.  

-m 16

  -l   LNB Frequency in MHz (s). Note: must be less than Transponder Frequency specified with -f.  

-l 11250

  -e   FEC (s). Valid values are: 1/2, 2/3, 3/4, 5/6, 7/8, auto.  

-e auto

  -o   Polarity (s). Valid values are: h (horizontal), v (vertical).  

-o h

  -k   LNB Selection in KHz(s). Valid values are: 0, 22, 33, 44.  

-k 22

  -d   DiSEqC (s). Valid values are: n (none), a, b, a/a, a/b, b/a, b/b.  

-d b/a

  -g   Guard interval (t). Valid values are: 1/4, 1/8, 1/16, 1/32.  

-g 1/16

  -p0   For Filter Pin 0, assign data PID as integer or hex. (c, s); e.g. 164, 0xa4 or 0XA4. For multiple data PIDs, specify a separate -p0 option;  

-p0 17

  -p1   For Filter Pin 1, assign data PID.  

-p1 0xa3

  -p2   For Filter Pin 2, assign data PID.  

-p2 0xa4

  -p3   For Filter Pin 3, assign data PID.  

-p3 0xa5

Optional Arguments

     

  -t   Time duration in seconds for dumping to file; default is 10 seconds.    
  -h   Help.    

Code Discussion

What does the TestDataFilter do?

  1. Applies the tuner setting as given at the command line arguments.
  2. Connects one dump.x filter to each of the 4 TS pins at the B2C2MPEG2Filter output.
  3. Sets the PID for each pin.
  4. Captures for 10 seconds, or the time specified at the -t argument, all packets on the pins to the corresponding files (PIN0.ts ... PIN3.ts) at the current directory.

Return to Top


Copyright © 1998-2002 B2C2, Inc. Proprietary and Confidential