This is a hints page for btvid and video projects


Last Update:11-23-04

You will find a copy of btvid.c in the BT878_Video directory on the course website. Please use btvid.c, NOT btvid2.c until further notice. This is a core file you can use with your project in order to get video working (you will need to add to /modify this to fit your project's specific needs.) There are lots of things in this file that are less than obvious, my recommendation is to take a look at it with the BT878 Chipset datasheet open as a reference.

The notes at the top of the bt878.c file tell you how to get started in order to demonstrate functionality and test hardware. Call the functions specified in the order specified and look for frame_acq_cnt to increase.

Note that on this particular version, you need the card to be in the PCI slot furthest away from the processor on the motherboard, or closest to the ISA slots. This will hopefully be fixed in a later revision.

You can use the function write_save_buffer() to write your captured frame to the target. The target server provides a file I/O interface which allows the target to write to a file on your host computer through a file descriptor. This is setup with the -R command line argument for the tgtsrvr.exe file. See the last line in starttgtsrvr.bat for this

C:\Tornado2.0.2\host\x86-win32\bin\tgtsvr.exe %targetip% -n %targetname% -A -V -B wdbrpc -R C:\vxworks\labbench\default\target -RW -redirectIO -c C:\vxworks\wind\vxWorks.%targetname%

Notice that the -R command specifies the path c:\vxworks\labbench\default\target. write_save_buffer() writes a .ppm format image to this directory.

Note that if you use btvid.c to write the frame, this will take several (probably 10 or more) minutes to complete. I have a revised write_save_buffer function here which should write the buffer in a few seconds. You can copy the write_save_buffer from this file to speed up the process.

To view the image you can use the Irfanview freeware image viewer program, which you can find here or here. This viewer is also installed on the lab computers.


Frequently Asked Questions Regarding Video


Why isn't my video card capturing color?
See the answer from Sam here.