[Fwd: Camwire - generic camera API]

Johann Schoonees j.schoonees at irl.cri.nz
Thu Mar 25 06:05:39 EET 2004

Dear FreeDesktop

Nanoseconds after posting the announcement of Camwire's release 
(below), Behdad Esfahbod fired back:

 > Seems like your project has a lot of things in common with the
 > HAL project:
 > http://pdx.freedesktop.org/Software/hal
 > Many people would appreciate it if you join their mailing list
 > and send your announcement there too.

I therefore post it here too in the hope that it is appropriate and 
interesting to someone.

I did not know about HAL before.  I have now subscribed to the list 
and read some of the archive.  I admit that not much of it means 
anything to me because I am not a desktop expert.


-------- Original Message --------
Subject: Camwire - generic camera API
Date: Thu, 25 Mar 2004 15:01:36 +1200
From: Johann Schoonees <j.schoonees at irl.cri.nz>
To: linux1394-user at lists.sourceforge.net, 
libdc1394-devel at lists.sourceforge.net
CC: Dan Dennedy <dan at dennedy.org>,  Damien Douxchamps 
<ddouxcha at tele.ucl.ac.be>
References: <E1B5zl8-0001uL-Sr at sc8-sf-list1.sourceforge.net>

Hi List

I have today released Camwire under LGPL:


Camwire defines a set of C functions that provides the basic functions 
needed to control a digital camera from a computer. It is primarily 
intended for C programmers who would like to work at a higher level of 
abstraction than the low-level camera libraries and drivers.

The main functions are:

     * Run/stop camera
     * Single-shot/continuous mode
     * Trigger source internal/external
     * External trigger polarity rising/falling
     * Frame rate
     * Shutter speed
     * Frame dimensions width/height/depth
     * Frame offset left/top
     * Number of frame buffers
     * Capture a frame by waiting/polling/copying
     * Get time stamp of last frame
     * Get serial number of last frame
     * Flush frame buffers
     * Reset camera
     * etc.

I wrote Camwire because I found that libdc1394 is very closely wrapped 
around the IIDC DCAM spec and I needed something simpler.  Eventually 
it was over 7000 lines of code.  Camwire hides a lot of libdc1394's 
internal details.

Camwire's interface is implementation-independent in the sense that 
the user (mostly) need not know or care whether the camera is on a 
Firewire, USB, CameraLink, or whatever.  Of course it uses 1394 under 
the covers but almost nothing in the interface mentions that.

Camwire reads simple text files for initial camera configurations and 
settings.  Camwire tries to autodetect the supported formats, modes 
and features of the camera, and it suggests best-guess DCAM CSR 
configuration and camera settings.  No more guessing which format/mode 
to try just to get a new camera going.

There is an extended example of how to use Camwire in the examples 
subdirectory, called cammonitor. It is a command-line-based camera 
monitor which is useful in its own right. It even has a man page.

Please send suggestions, bug reports and fixes to me. Developers are 
invited to extend Camwire to other buses like USB and CameraLink. If 
that happens we may decide to put the project on Sourceforge.

Thanks to Damien Douxchamps and Dan Dennedy for applying my libdc1394 
patches to get Camwire working the way I like it.


Johann Schoonees                         Imaging & Sensing Team
Industrial Research Limited, PO Box 2225, Auckland, New Zealand
Phone +64 9 9203679 Fax +64 9 3028106 http://www.is.irl.cri.nz/

More information about the xdg mailing list