Libraw1394 on FreeBSD
buzz at gaia.arc.nasa.gov
Wed Oct 11 10:03:45 PDT 2006
We have been using the libraw1394 and libdc1394 successfully
on FreeBSD for several years now. Libdc1394 is easily ported from
Linux to FreeBSD. However, the Linux libraw1394 should be completely
scrapped as the ioctl's and underlying support are completely different.
Main.c, iso.c, and readwrite.c must be rewritten.
Fortunately, this is much easier to do on BSD. For example, the
incoming packets may handled with (suprise) a read. Following is an
example of iso.c.
Code: SGE / 242-4
NASA - Ames Research Center
Moffett Field, CA 94035
* libraw1394 - library for raw access to the 1394 bus with the Linux subsystem.
* Copyright (C) 1999,2000,2001,2002 Andreas Bombe
* new ISO API by Dan Maas
* This library is licensed under the GNU Lesser General Public License (LGPL),
* version 2.1 or later. See the file COPYING.LIB in the distribution for
* Rewritten for FreeBSD - R E Slye - 6/23/04
* Most of the original code for Linux is not supported and is deleted.
* This code may be used for receiving the iso stream download of a single
* image from a digital camera. Stream xmit is not supported.
int channel, size_t length, quadlet_t *data);
* raw1394_start_iso_rcv - enable isochronous receiving
* @channel: channel number to start receiving on
* Enables the reception of isochronous packets in @channel on @handle.
* Isochronous packets are then passed to the callback specified with
int raw1394_start_iso_rcv(struct raw1394_handle *handle, unsigned int channel)
int size, rc;
if ((size = read(handle->fd, fwbuf, sizeof(fwbuf))) < 0)
printf(" rv = %d errno = %d\n", size, errno);
rc = _dc1394_video_iso_handler(handle, channel, size, fwbuf);
if (rc < 0)
else if (rc > 0)
* raw1394_stop_iso_rcv - stop isochronous receiving
* @channel: channel to stop receiving on
* Stops the reception of isochronous packets in @channel on @handle.
int raw1394_stop_iso_rcv(struct raw1394_handle *handle, unsigned int channel)
/* I don't know how to stop receiving on channel */
More information about the freebsd-firewire