ZBar is an open source software suite for reading bar codes from various sources, such as video streams, image files and raw intensity sensors. It supports many popular symbologies (types of bar codes) including EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 39 and Interleaved 2 of 5.
This is a small application that can be fed the output video stream of a webcam, in which it can recognise and decode code-39 barcodes. It is simply a console application that is limited to parsing an input raw ppm stream, outputting the barcodes to the stdout.