|
|
@ -296,11 +296,7 @@ static CvCaptureCAM_DC1394 * icvCaptureFromCAM_DC1394 (int index) |
|
|
|
if (pcap->format!=FORMAT_SCALABLE_IMAGE_SIZE) { // everything except Format 7
|
|
|
|
if (pcap->format!=FORMAT_SCALABLE_IMAGE_SIZE) { // everything except Format 7
|
|
|
|
if (dc1394_dma_setup_capture(pcap->handle, pcap->camera->node, index+1 /*channel*/, |
|
|
|
if (dc1394_dma_setup_capture(pcap->handle, pcap->camera->node, index+1 /*channel*/, |
|
|
|
pcap->format, pcap->mode, SPEED_400, |
|
|
|
pcap->format, pcap->mode, SPEED_400, |
|
|
|
pcap->frame_rate, NUM_BUFFERS, |
|
|
|
pcap->frame_rate, NUM_BUFFERS, 1 /*drop_frames*/, |
|
|
|
#ifdef HAVE_DC1394_095 |
|
|
|
|
|
|
|
0 /*do_extra_buffering*/, |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
1 /*DROP_FRAMES*/, |
|
|
|
|
|
|
|
pcap->device_name, pcap->camera) != DC1394_SUCCESS) { |
|
|
|
pcap->device_name, pcap->camera) != DC1394_SUCCESS) { |
|
|
|
fprintf(stderr,"%s:%d: Failed to setup DMA capture with VIDEO1394\n",__FILE__,__LINE__); |
|
|
|
fprintf(stderr,"%s:%d: Failed to setup DMA capture with VIDEO1394\n",__FILE__,__LINE__); |
|
|
|
goto ERROR; |
|
|
|
goto ERROR; |
|
|
@ -311,11 +307,7 @@ static CvCaptureCAM_DC1394 * icvCaptureFromCAM_DC1394 (int index) |
|
|
|
pcap->mode, SPEED_400, QUERY_FROM_CAMERA, |
|
|
|
pcap->mode, SPEED_400, QUERY_FROM_CAMERA, |
|
|
|
(unsigned int)QUERY_FROM_CAMERA, (unsigned int)QUERY_FROM_CAMERA, |
|
|
|
(unsigned int)QUERY_FROM_CAMERA, (unsigned int)QUERY_FROM_CAMERA, |
|
|
|
(unsigned int)QUERY_FROM_CAMERA, (unsigned int)QUERY_FROM_CAMERA, |
|
|
|
(unsigned int)QUERY_FROM_CAMERA, (unsigned int)QUERY_FROM_CAMERA, |
|
|
|
NUM_BUFFERS, |
|
|
|
NUM_BUFFERS, 1 /*drop_frames*/, |
|
|
|
#ifdef HAVE_DC1394_095 |
|
|
|
|
|
|
|
0 /*do_extra_buffering*/, |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
1 /*DROP_FRAMES*/, |
|
|
|
|
|
|
|
pcap->device_name, pcap->camera) != DC1394_SUCCESS) { |
|
|
|
pcap->device_name, pcap->camera) != DC1394_SUCCESS) { |
|
|
|
fprintf(stderr,"%s:%d: Failed to setup DMA capture with VIDEO1394\n",__FILE__,__LINE__); |
|
|
|
fprintf(stderr,"%s:%d: Failed to setup DMA capture with VIDEO1394\n",__FILE__,__LINE__); |
|
|
|
goto ERROR; |
|
|
|
goto ERROR; |
|
|
@ -661,11 +653,7 @@ icvSetModeCAM_DC1394( CvCaptureCAM_DC1394 * capture, int mode ){ |
|
|
|
dc1394_dma_unlisten(capture->handle, capture->camera); |
|
|
|
dc1394_dma_unlisten(capture->handle, capture->camera); |
|
|
|
if (dc1394_dma_setup_capture(capture->handle, capture->camera->node, capture->camera->channel /*channel*/, |
|
|
|
if (dc1394_dma_setup_capture(capture->handle, capture->camera->node, capture->camera->channel /*channel*/, |
|
|
|
format, mode, SPEED_400, |
|
|
|
format, mode, SPEED_400, |
|
|
|
frame_rate, NUM_BUFFERS, |
|
|
|
frame_rate, NUM_BUFFERS, 1 /*drop_frames*/, |
|
|
|
#ifdef HAVE_DC1394_095 |
|
|
|
|
|
|
|
0 /*do_extra_buffering*/, |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
1 /*DROP_FRAMES*/, |
|
|
|
|
|
|
|
capture->device_name, capture->camera) != DC1394_SUCCESS) { |
|
|
|
capture->device_name, capture->camera) != DC1394_SUCCESS) { |
|
|
|
fprintf(stderr,"%s:%d: Failed to setup DMA capture with VIDEO1394\n",__FILE__,__LINE__); |
|
|
|
fprintf(stderr,"%s:%d: Failed to setup DMA capture with VIDEO1394\n",__FILE__,__LINE__); |
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|