gqcam 0.7
---------

At the moment this program is not at all fit to be installed.  So, this
file is a little bit misnamed.  However, I will tell you how to build it
here.

Required
--------
First off, you need a QuickCam.  As of version 0.5, both the color and
greyscale QuickCam will work.  As of version 0.6, many other cameras may
or may not work.  In theory, any camera who's driver uses the read() call 
to grab images will work.  I severly doubt any other version of the
QuickCam will work, as Connectix/Logitech don't want to let Linux
developers in on how their cameras work.  That includes the QuickCam VC.
You also need Linux, probably with kernal of 2.2.x or above.  Whatever
kernel it is, it needs to have Video4Linux support for your camera either
built in or built as a module.  (I use the bw-qcam and c-qcam drivers 
built as modules on kernel 2.2.12) You will also need libjpeg installed so
it can save stuff to jpeg format. In the future I will make this an
option, but it is needed at the moment. Last you will need GTK+
(www.gtk.org), probably version 1.2.x or above. (Mine is 1.2.6)

If you have all of that collected, run the magical command:
make

A few moments and you should have a nice binary called gqcam in the
directory you typed make in.  To run it, type ./gqcam.  If you have
loaded any needed kernel modules and have permission to read from
/dev/video, you should have a window appear before you showing whatever
your camera is pointed at and some lovely controls.  Have fun!

System Setup
------------
Following is a very nice walkthrough on setting up the kernel to use
Video4Linux.  It was sent to me by James Sizemore (James@deny.org), and
covers things quite nicely.  He originally wrote it with the greyscale
camer in mind, and I updated it a little to apply to any camera, but the
procedure is the same.  Thank, James!

======================================================================
Gqcam  needs the Video4Linux API and the proper video drivers  loaded
in the kernel;  either as a module or  compiled in.  Provided you have a
modern kernel 2.2.x, you may already have the two modules you need to
load.

Type either " modprobe -l -t misc " or  " modprobe -l -t video"  This will
list all the modules you have in these categories on your screen. You
should find "videodev" in the list as well as the driver you plan to use    
for your camera.  For example, with my greyscale Quickcam I need the
module "bw-qcam" along with "videodev" as seen below:

/lib/modules/2.2.12-20/misc/videodev.o
/lib/modules/2.2.12-20/misc/bw-qcam.o 
(Of course, there will more than likely be many more files listed along
with these.)

If they are there, using modprobe and lsmod you can load these on your 
system.

Type su and your root password; you will need to be root.
Type "modprobe -a videodev"
Type "modprobe -a <your camera's driver>"
(in my example case, that would be "modprobe -a bw-qcam"
This should have loaded the drivers you needed.

To check use lsmod:
After typing "lsmod" you should see something like this:

bw-qcam                 6964   0  (unused)
videodev                  2368   1  [bw-qcam]

If not you may have to compile the kernel modules by hand.  You can
find them at : http://www.exploits.org/v4l/
See "man modprobe" and "man lsmod" for more options.

After you load the modules You may need to create the /dev files
for Gqcam to access the drivers. Check to see if you have                 
"/dev/video0" or "/dev/video" if not you will need to use "mknod"
to create these files.  The Video4Linus API recommends you have these
/dev's on you system:

  Device Name       Minor Range      Function
 /dev/video             0-63                     Video Capture Interface
 /dev/radio             64-127                 AM/FM Radio Devices
 /dev/vtx                 192-223               Teletext Interface Chips
 /dev/vbi                 224-239                Raw VBI Data
(Intercast/telete$
And  /dev/bttv should be a symlink to /dev/video0 for most people.
You can find the Major numbers here:
ftp://ftp.kernel.org/pub/linux/docs/device-list/

If they don't exist (There is a good chance that they will already be
there with the latest distributions) use these commands to create them:

Type "mknod /dev/video0 c 81 0".
Type "mknod /dev/video1 c 81 1".
Type "mknod /dev/radio0 c 81 64".
Type "mknod /dev/radio1 c 81 65".
Type "mknod /dev/vtx0 c 81 192".
Type "mknod /dev/vtx1 c 81 193".
Type "mknod /dev/vbi0 c 81 224".
Type "mknod /dev/vbi1 c 81 225 ".
Type "ln -s video0 bttv".
Type "ln -s video0 video"
You will also need to "chmod 666 " all these files.
So Gqcam can read and write to the QuickCam.
Creating the devices only needs to be done once and they may already
exist.  Check to make sure they really aren't there before creating them
as shown above.

You can find more information on this subject here:
http://roadrunner.swansea.uk.linux.org/v4lapi.shtml
and by typing "man mknod" and "man ln" and "chmod"

That is all you should need to do to get things working.  After everything
is set up, run gqcam and watch those pretty pictures flip across your
screen.  Enjoy!

