libdc1394 API Version 2 calls absent from 2.1.2

Asked by Thomson Comer

I currently use libdc1394-2.0.2 for firewire camera control. I have a Point Grey Research (PGR) Firefly MV camera which is USB, but allows the use of libusb and libdc1394-2.1.2 to control this camera. I've installed version 2.1.2 and am attempting to use the PGR example files for this configuration. They, by default, import libdc1394 .h files with a strange filename - each is referenced in the code as <dc1394/dc1394_*.h>, unlike the actual headers in the libdc1394 distribution that are simply <dc1394/*.h>. Resolving that file naming problem, I can't build the examples because a bunch of methods are absent from my libdc1394 installation. These methods do appear in Douxchamps's libdc1394 documentation (http://damien.douxchamps.net/ieee1394/libdc1394/v2.x/api/system/) so where are they in my distribution?

An example of a failed build:

~/Desktop/grabdma# make
g++ -c -I. -Wall -g -DLINUX grabdma.cpp
grabdma.cpp:71: error: ‘FORMAT_VGA_NONCOMPRESSED’ was not declared in this scope
grabdma.cpp:72: error: ‘MODE_640x480_MONO’ was not declared in this scope
grabdma.cpp:73: error: ‘FRAMERATE_30’ was not declared in this scope
grabdma.cpp:116: error: ‘dc1394_cameracapture’ does not name a type
grabdma.cpp: In function ‘void cleanup()’:
grabdma.cpp:136: error: ‘dc1394Camera’ was not declared in this scope
grabdma.cpp:136: error: ‘dc1394_dma_unlisten’ was not declared in this scope
grabdma.cpp:137: error: ‘dc1394_dma_release_camera’ was not declared in this scope
grabdma.cpp: In function ‘int main(int, char**)’:
grabdma.cpp:155: error: ‘dc1394_create_handle’ was not declared in this scope
grabdma.cpp:176: error: ‘dc1394_get_camera_nodes’ was not declared in this scope
grabdma.cpp:233: error: ‘dc1394_get_iso_channel_and_speed’ was not declared in this scope
grabdma.cpp:251: error: ‘SPEED_400’ was not declared in this scope
grabdma.cpp:256: error: ‘dc1394Camera’ was not declared in this scope
grabdma.cpp:256: error: ‘dc1394_dma_setup_capture’ was not declared in this scope
grabdma.cpp:274: error: ‘dc1394_start_iso_transmission’ was not declared in this scope
grabdma.cpp:290: error: ‘dc1394_dma_single_capture’ was not declared in this scope
grabdma.cpp:296: error: ‘dc1394_dma_done_with_buffer’ was not declared in this scope
grabdma.cpp:313: error: ‘dc1394_dma_single_capture’ was not declared in this scope
grabdma.cpp:356: error: ‘dc1394_dma_done_with_buffer’ was not declared in this scope
grabdma.cpp:361: error: ‘dc1394_stop_iso_transmission’ was not declared in this scope
make: *** [grabdma.o] Error 1

The checksum for the libdc1394-2.1.2 distro I'm trying to use:
~/Desktop# md5sum libdc1394-2.1.2.tar.gz
b85f1ade88d8d96688d5965ed8603d53 libdc1394-2.1.2.tar.gz

And the source files that, supposedly, should contain the above methods:
~/Desktop/libdc1394-2.1.2/dc1394# ll *.h
-rw-rw-r-- 1 500 500 8281 2009-06-10 22:05 camera.h
-rw-rw-r-- 1 500 500 3921 2009-06-10 22:05 capture.h
-rw-rw-r-- 1 500 500 14422 2009-06-10 22:05 control.h
-rw-rw-r-- 1 500 500 9398 2009-06-10 22:05 conversions.h
-rw-rw-r-- 1 500 500 1911 2009-06-10 22:05 dc1394.h
-rw-rw-r-- 1 500 500 7844 2009-06-10 22:05 format7.h
-rw-rw-r-- 1 500 500 7625 2009-06-10 22:05 internal.h
-rw-rw-r-- 1 500 500 6940 2009-06-10 22:05 iso.h
-rw-rw-r-- 1 500 500 11281 2009-06-10 22:05 log.h
-rw-rw-r-- 1 500 500 5577 2009-06-10 22:05 offsets.h
-rw-rw-r-- 1 500 500 3342 2009-06-10 22:05 platform.h
-rw-rw-r-- 1 500 500 6477 2009-06-10 22:05 register.h
-rw-rw-r-- 1 500 500 5361 2009-06-10 22:05 types.h
-rw-rw-r-- 1 500 500 3541 2009-06-10 22:05 utils.h
-rw-rw-r-- 1 500 500 10789 2009-06-10 22:05 video.h
~/Desktop/libdc1394-2.1.2/dc1394# ll *.c
-rw-rw-r-- 1 500 500 83294 2009-06-10 22:05 bayer.c
-rw-rw-r-- 1 500 500 3076 2009-06-10 22:05 capture.c
-rw-rw-r-- 1 500 500 71935 2009-06-10 22:05 control.c
-rw-rw-r-- 1 500 500 31998 2009-06-10 22:05 conversions.c
-rw-rw-r-- 1 500 500 9348 2009-06-10 22:05 enumeration.c
-rw-rw-r-- 1 500 500 34381 2009-06-10 22:05 format7.c
-rw-rw-r-- 1 500 500 10241 2009-06-10 22:05 internal.c
-rw-rw-r-- 1 500 500 4310 2009-06-10 22:05 iso.c
-rw-rw-r-- 1 500 500 4262 2009-06-10 22:05 log.c
-rw-rw-r-- 1 500 500 10644 2009-06-10 22:05 register.c
-rw-rw-r-- 1 500 500 11974 2009-06-10 22:05 utils.c

Can you help me find these methods?

Thanks!

Thomson

Question information

Language:
English Edit question
Status:
Solved
For:
libdc1394 Edit question
Assignee:
No assignee Edit question
Solved by:
Thomson Comer
Solved:
Last query:
Last reply:
Revision history for this message
Peter Antoniac (pan1nx) said :
#1

First, I need to make sure that you have the header files installed. How did you install the libdc1394-22? Via aptitude or from source? The headers are in libdc1394-22-dev package which depends also on libraw1394-dev. The utils are in libdc1394-utils. Please let us know if you still have a problem.

Revision history for this message
Thomson Comer (tcomer) said :
#2

I'm installing the newer version (2.1.2) from source. 2.0.2 is already installed in the source tree of a subversion repository for my camera control project without any trouble. I didn't expect there to be any dependency changes from 2.0.2 to 2.1.2. Aside from libraw, what other project would I need to compile the dependencies from source? Are there headers in the libdc1394-22-dev and libdc1394-utils packages that aren't included in libdc1394-2.1.2.tar.gz?

Revision history for this message
Peter Antoniac (pan1nx) said :
#3

There are no headers in the packages that are not already in the tar.gz (upstream). I just asked the question as I needed to find the source of your error.
Now that I know that you are not from packages, I guess your error is caused by the installation. The default install of the libdc1394 from sources will make it into the /usr/local/include. You can run:
$ find /usr -name dc1394
and report back the result. That directory contains the header files. If you find two directories, that means that you had the old install being found first and used and hence the conflict.

Solution, either dist-uninstall the old version or make sure that the new one is taking precendence.

Revision history for this message
Thomson Comer (tcomer) said :
#4

Hi Peter,

It looks like there are major undocumented API differences between 2.0.0-rc3 and 2.0.0. The above undeclared methods appear in 2.0.0-rc3 but not in 2.0.0, 2.0.2, 2.1.0, or 2.1.2.

Almost the entire dma-related nomenclature is gone from 2.0.0, such as ‘dc1394_dma_setup_capture’, ‘dc1394_start_iso_transmission’, ‘dc1394_dma_single_capture’, ‘dc1394_dma_done_with_buffer’, and ‘dc1394_stop_iso_transmission’.

PGR has a major mismatch for their libdc1394 compatibility claims (libdc1394 2.1.0 required). I'll have to find another way to get this camera talking to my software.

Thanks for your assistance.

Revision history for this message
Peter Antoniac (pan1nx) said :
#5

Hi,

Well, I that 2.0.0-rc3 is so long time ago code that I even forgot what it was... If you have any suggestions of improving the documentation, please let me know. I will make sure to embed them in the man pages/pdfs...