=================================================================== RCS file: /export/cvsroot/artoolkit-gray-2-60/lib/SRC/VideoLinux1394Cam/video.c,v retrieving revision 1.6 retrieving revision 1.13 diff -u -p -r1.6 -r1.13 --- artoolkit-gray-2-60/lib/SRC/VideoLinux1394Cam/video.c 2002/05/22 06:48:54 1.6 +++ artoolkit-gray-2-60/lib/SRC/VideoLinux1394Cam/video.c 2003/02/12 04:12:44 1.13 @@ -22,6 +22,11 @@ #include +/* This define controls if we use the new or old libDC1394 API functions. The new code is much + more stable for multiple cameras and so is recommended */ +#define LIBDC_NEW + + static AR2VideoParamT *vid = NULL; int arVideoDispOption( void ) @@ -314,12 +319,21 @@ AR2VideoParamT *ar2VideoOpen( char *conf /*-----------------------------------------------------------------------*/ if( dc1394_dma_setup_capture(arV1394.handle, vid->node, - vid->channel, +#ifdef LIBDC_NEW +#warning Compiling using newer 0.9.1 libDC library (multiple camera support) + vid->node, +#else +#warning Compiling using original 0.8.3 libDC library (single camera only) + vid->channel, +#endif vid->format, vid->int_mode, vid->speed, vid->int_rate, vid->dma_buf_num, +#ifdef LIBDC_NEW + 1, "/dev/video1394/0", +#endif &(vid->camera)) != DC1394_SUCCESS ) { fprintf( stderr,"unable to setup camera-\n" "check if you did 'insmod video1394' or,\n" @@ -380,12 +394,19 @@ int ar2VideoCapStart( AR2VideoParamT *vi if( vid->status == 3 ) { if( dc1394_dma_setup_capture(arV1394.handle, vid->node, - vid->channel, +#ifdef LIBDC_NEW + vid->node, +#else + vid->channel, +#endif vid->format, vid->int_mode, vid->speed, vid->int_rate, vid->dma_buf_num, +#ifdef LIBDC_NEW + 1, "/dev/video1394/0", +#endif &(vid->camera)) != DC1394_SUCCESS ) { fprintf( stderr,"unable to setup camera-\n" "check if you did 'insmod video1394' or,\n"