
(libload "video/libdc/dc1394_config")

(eval `(de dummy_dc1394 () ,dc1394-cpheader-cmd ()))

(defclass dc1394_cameracapture object
  ((-gptr-) p) )

(defmethod dc1394_cameracapture dc1394_cameracapture ()
  #{ $p = malloc(sizeof(dc1394_cameracapture)); #}
  ())

(defmethod dc1394_cameracapture -destructor ()
  #{ free($p); #}
  ())

(defmethod dc1394_cameracapture get_width ()
  (int #{ ((dc1394_cameracapture *)$p)->frame_width #} ))

(defmethod dc1394_cameracapture get_height ()
  (int #{ ((dc1394_cameracapture *)$p)->frame_height #} ))

(defmethod dc1394_cameracapture get_buffer ()
  (gptr #{ ((dc1394_cameracapture *)$p)->capture_buffer #} ))


(defclass dc1394  object
  ((-gptr-) handle)
  ((-int-) node)
  ((-gptr- "nodeid_t *") nodep))

(defmethod dc1394 dc1394 ()
  (let ((numcameras 0))
    #{ {  int numnodes, numcam;
        $handle =  dc1394_create_handle((int)0);
        if($handle != NULL) {
             numnodes = raw1394_get_nodecount((raw1394handle_t)$handle); 
             $nodep = dc1394_get_camera_nodes((raw1394handle_t)$handle, &numcam, 1);
             printf("num_nodes: %d, num_cameras: %d\n",numnodes,numcam);
             fflush(stdout);
             $numcameras = numcam; 
             $node = ($nodep)[0];
        }
    } #}
  numcameras) )

(defmethod dc1394 -destructor ()
  #{ if($handle) raw1394_destroy_handle((raw1394handle_t)$handle); #}
  ())

(defmethod dc1394  get_camera_feature_set (  features )
  
  ((-gptr- "dc1394_feature_set *") features) 
  (int  #{   dc1394_get_camera_feature_set( (raw1394handle_t)$handle ,(nodeid_t)$node ,$features ) #} ))
 
(defmethod dc1394  get_camera_feature (  feature )
  
  ((-gptr- "dc1394_feature_info *") feature) 
  (int  #{   dc1394_get_camera_feature( (raw1394handle_t)$handle ,(nodeid_t)$node ,$feature ) #} ))
 
(defmethod dc1394  get_camera_misc_info (  info )
  
  ((-gptr- "dc1394_miscinfo *") info) 
  (int  #{   dc1394_get_camera_misc_info( (raw1394handle_t)$handle ,(nodeid_t)$node ,$info ) #} ))
 
(defmethod dc1394  init_camera (  )
  
  (int  #{  dc1394_init_camera( (raw1394handle_t)$handle ,(nodeid_t)$node) #} ))
 
(defmethod dc1394  is_camera (  value )
  
  ((-gptr- "dc1394bool_t *") value) 
  (int  #{  dc1394_is_camera( (raw1394handle_t)$handle ,(nodeid_t)$node ,$value ) #} ))
 
(defmethod dc1394  get_sw_version (  value )
  
  ((-gptr- "quadlet_t *") value) 
  (int  #{  dc1394_get_sw_version( (raw1394handle_t)$handle ,(nodeid_t)$node ,$value ) #} ))
 
(defmethod dc1394  get_camera_info (  info )
  
  ((-gptr- "dc1394_camerainfo *") info) 
  (int  #{  dc1394_get_camera_info( (raw1394handle_t)$handle ,(nodeid_t)$node ,$info ) #} ))
 
(defmethod dc1394  query_supported_formats (  value )
  
  ((-gptr- "quadlet_t *") value) 
  (int  #{  dc1394_query_supported_formats( (raw1394handle_t)$handle ,(nodeid_t)$node ,$value ) #} ))
 
(defmethod dc1394  query_supported_modes (  format value )
  
  ((-int-) format)   ;; unsigned int -> int
  ((-gptr- "quadlet_t *") value) 
  (int  #{  dc1394_query_supported_modes( (raw1394handle_t)$handle ,(nodeid_t)$node ,$format  ,$value ) #} ))
 
(defmethod dc1394  query_supported_framerates (  format mode value )
  
  ((-int-) format)   ;; unsigned int -> int
  ((-int-) mode)   ;; unsigned int -> int
  ((-gptr- "quadlet_t *") value) 
  (int  #{  dc1394_query_supported_framerates( (raw1394handle_t)$handle ,(nodeid_t)$node ,$format  ,$mode  ,$value ) #} ))
 
(defmethod dc1394  query_revision (  mode value )
  
  ((-int-) mode) 
  ((-gptr- "quadlet_t *") value) 
  (int  #{  dc1394_query_revision( (raw1394handle_t)$handle ,(nodeid_t)$node ,$mode  ,$value ) #} ))
 
(defmethod dc1394  query_basic_functionality (  value )
  
  ((-gptr- "quadlet_t *") value) 
  (int  #{  dc1394_query_basic_functionality( (raw1394handle_t)$handle ,(nodeid_t)$node ,$value ) #} ))
 
(defmethod dc1394  query_feature_control (  feature availability )
  
  ((-int-) feature)   ;; unsigned int -> int
  ((-gptr- "unsigned int *") availability)   
  (int  #{  dc1394_query_feature_control( (raw1394handle_t)$handle ,(nodeid_t)$node ,$feature  ,$availability ) #} ))
 
(defmethod dc1394  query_advanced_feature_offset (  value )
  
  ((-gptr- "quadlet_t *") value) 
  (int  #{  dc1394_query_advanced_feature_offset( (raw1394handle_t)$handle ,(nodeid_t)$node ,$value ) #} ))
 
(defmethod dc1394  query_feature_characteristics (  feature value )
  
  ((-int-) feature)   ;; unsigned int -> int
  ((-gptr- "quadlet_t *") value) 
  (int  #{  dc1394_query_feature_characteristics( (raw1394handle_t)$handle ,(nodeid_t)$node ,$feature  ,$value ) #} ))
 
(defmethod dc1394  get_video_framerate (  framerate )
  
  ((-gptr- "unsigned int *") framerate)   
  (int  #{  dc1394_get_video_framerate( (raw1394handle_t)$handle ,(nodeid_t)$node ,$framerate ) #} ))
 
(defmethod dc1394  set_video_framerate (  framerate )
  
  ((-int-) framerate)   ;; unsigned int -> int
  (int  #{  dc1394_set_video_framerate( (raw1394handle_t)$handle ,(nodeid_t)$node ,$framerate ) #} ))
 
(defmethod dc1394  get_video_mode (  mode )
  
  ((-gptr- "unsigned int *") mode)   
  (int  #{  dc1394_get_video_mode( (raw1394handle_t)$handle ,(nodeid_t)$node ,$mode ) #} ))
 
(defmethod dc1394  set_video_mode (  mode )
  
  ((-int-) mode)   ;; unsigned int -> int
  (int  #{  dc1394_set_video_mode( (raw1394handle_t)$handle ,(nodeid_t)$node ,$mode ) #} ))
 
(defmethod dc1394  get_video_format (  format )
  
  ((-gptr- "unsigned int *") format)   
  (int  #{  dc1394_get_video_format( (raw1394handle_t)$handle ,(nodeid_t)$node ,$format ) #} ))
 
(defmethod dc1394  set_video_format (  format )
  
  ((-int-) format)   ;; unsigned int -> int
  (int  #{  dc1394_set_video_format( (raw1394handle_t)$handle ,(nodeid_t)$node ,$format ) #} ))
 
(defmethod dc1394  get_iso_channel_and_speed (  channel speed )
  
  ((-gptr- "unsigned int *") channel)   
  ((-gptr- "unsigned int *") speed)   
  (int  #{  dc1394_get_iso_channel_and_speed( (raw1394handle_t)$handle ,(nodeid_t)$node ,$channel  ,$speed ) #} ))
 
(defmethod dc1394  set_iso_channel_and_speed (  channel speed )
  
  ((-int-) channel)   ;; unsigned int -> int
  ((-int-) speed)   ;; unsigned int -> int
  (int  #{  dc1394_set_iso_channel_and_speed( (raw1394handle_t)$handle ,(nodeid_t)$node ,$channel  ,$speed ) #} ))
 
(defmethod dc1394  camera_on (  )
  
  (int  #{  dc1394_camera_on( (raw1394handle_t)$handle ,(nodeid_t)$node) #} ))
 
(defmethod dc1394  camera_off (  )
  
  (int  #{  dc1394_camera_off( (raw1394handle_t)$handle ,(nodeid_t)$node) #} ))
 
(defmethod dc1394  start_iso_transmission (  )
  
  (int  #{  dc1394_start_iso_transmission( (raw1394handle_t)$handle ,(nodeid_t)$node) #} ))
 
(defmethod dc1394  stop_iso_transmission (  )
  
  (int  #{  dc1394_stop_iso_transmission( (raw1394handle_t)$handle ,(nodeid_t)$node) #} ))
 
(defmethod dc1394  get_iso_status (  is_on )
  
  ((-gptr- "dc1394bool_t *") is_on) 
  (int  #{  dc1394_get_iso_status( (raw1394handle_t)$handle ,(nodeid_t)$node ,$is_on ) #} ))
 
(defmethod dc1394  set_one_shot (  )
  
  (int  #{  dc1394_set_one_shot( (raw1394handle_t)$handle ,(nodeid_t)$node) #} ))
 
(defmethod dc1394  unset_one_shot (  )
  
  (int  #{  dc1394_unset_one_shot( (raw1394handle_t)$handle ,(nodeid_t)$node) #} ))
 
(defmethod dc1394  set_multi_shot (  numFrames )
  
  ((-int-) numFrames)   ;; unsigned int -> int
  (int  #{  dc1394_set_multi_shot( (raw1394handle_t)$handle ,(nodeid_t)$node ,$numFrames ) #} ))
 
(defmethod dc1394  unset_multi_shot (  )
  
  (int  #{  dc1394_unset_multi_shot( (raw1394handle_t)$handle ,(nodeid_t)$node) #} ))
 
(defmethod dc1394  get_brightness (  brightness )
  
  ((-gptr- "unsigned int *") brightness)   
  (int  #{  dc1394_get_brightness( (raw1394handle_t)$handle ,(nodeid_t)$node ,$brightness ) #} ))
 
(defmethod dc1394  set_brightness (  brightness )
  
  ((-int-) brightness)   ;; unsigned int -> int
  (int  #{  dc1394_set_brightness( (raw1394handle_t)$handle ,(nodeid_t)$node ,$brightness ) #} ))
 
(defmethod dc1394  get_exposure (  exposure )
  
  ((-gptr- "unsigned int *") exposure)   
  (int  #{  dc1394_get_exposure( (raw1394handle_t)$handle ,(nodeid_t)$node ,$exposure ) #} ))
 
(defmethod dc1394  set_exposure (  exposure )
  
  ((-int-) exposure)   ;; unsigned int -> int
  (int  #{  dc1394_set_exposure( (raw1394handle_t)$handle ,(nodeid_t)$node ,$exposure ) #} ))
 
(defmethod dc1394  get_sharpness (  sharpness )
  
  ((-gptr- "unsigned int *") sharpness)   
  (int  #{  dc1394_get_sharpness( (raw1394handle_t)$handle ,(nodeid_t)$node ,$sharpness ) #} ))
 
(defmethod dc1394  set_sharpness (  sharpness )
  
  ((-int-) sharpness)   ;; unsigned int -> int
  (int  #{  dc1394_set_sharpness( (raw1394handle_t)$handle ,(nodeid_t)$node ,$sharpness ) #} ))
 
(defmethod dc1394  get_white_balance (  u_b_value v_r_value )
  
  ((-gptr- "unsigned int *") u_b_value)   
  ((-gptr- "unsigned int *") v_r_value)   
  (int  #{  dc1394_get_white_balance( (raw1394handle_t)$handle ,(nodeid_t)$node ,$u_b_value  ,$v_r_value ) #} ))
 
(defmethod dc1394  set_white_balance (  u_b_value v_r_value )
  
  ((-int-) u_b_value)   ;; unsigned int -> int
  ((-int-) v_r_value)   ;; unsigned int -> int
  (int  #{  dc1394_set_white_balance( (raw1394handle_t)$handle ,(nodeid_t)$node ,$u_b_value  ,$v_r_value ) #} ))
 
(defmethod dc1394  get_hue (  hue )
  
  ((-gptr- "unsigned int *") hue) 
  (int  #{  dc1394_get_hue( (raw1394handle_t)$handle ,(nodeid_t)$node ,$hue ) #} ))
 
(defmethod dc1394  set_hue (  hue )
  
  ((-int-) hue)   ;; unsigned int -> int
  (int  #{  dc1394_set_hue( (raw1394handle_t)$handle ,(nodeid_t)$node ,$hue ) #} ))
 
(defmethod dc1394  get_saturation (  saturation )
  
  ((-gptr- "unsigned int *") saturation) 
  (int  #{  dc1394_get_saturation( (raw1394handle_t)$handle ,(nodeid_t)$node ,$saturation ) #} ))
 
(defmethod dc1394  set_saturation (  saturation )
  
  ((-int-) saturation)   ;; unsigned int -> int
  (int  #{  dc1394_set_saturation( (raw1394handle_t)$handle ,(nodeid_t)$node ,$saturation ) #} ))
 
(defmethod dc1394  get_gamma (  gamma )
  
  ((-gptr- "unsigned int *") gamma) 
  (int  #{  dc1394_get_gamma( (raw1394handle_t)$handle ,(nodeid_t)$node ,$gamma ) #} ))
 
(defmethod dc1394  set_gamma (  gamma )
  
  ((-int-) gamma)   ;; unsigned int -> int
  (int  #{  dc1394_set_gamma( (raw1394handle_t)$handle ,(nodeid_t)$node ,$gamma ) #} ))
 
(defmethod dc1394  get_shutter (  shutter )
  
  ((-gptr- "unsigned int *") shutter) 
  (int  #{  dc1394_get_shutter( (raw1394handle_t)$handle ,(nodeid_t)$node ,$shutter ) #} ))
 
(defmethod dc1394  set_shutter (  shutter )
  
  ((-int-) shutter)   ;; unsigned int -> int
  (int  #{  dc1394_set_shutter( (raw1394handle_t)$handle ,(nodeid_t)$node ,$shutter ) #} ))
 
(defmethod dc1394  get_gain (  gain )
  
  ((-gptr- "unsigned int *") gain) 
  (int  #{  dc1394_get_gain( (raw1394handle_t)$handle ,(nodeid_t)$node ,$gain ) #} ))
 
(defmethod dc1394  set_gain (  gain )
  
  ((-int-) gain)   ;; unsigned int -> int
  (int  #{  dc1394_set_gain( (raw1394handle_t)$handle ,(nodeid_t)$node ,$gain ) #} ))
 
(defmethod dc1394  get_iris (  iris )
  
  ((-gptr- "unsigned int *") iris) 
  (int  #{  dc1394_get_iris( (raw1394handle_t)$handle ,(nodeid_t)$node ,$iris ) #} ))
 
(defmethod dc1394  set_iris (  iris )
  
  ((-int-) iris)   ;; unsigned int -> int
  (int  #{  dc1394_set_iris( (raw1394handle_t)$handle ,(nodeid_t)$node ,$iris ) #} ))
 
(defmethod dc1394  get_focus (  focus )
  
  ((-gptr- "unsigned int *") focus) 
  (int  #{  dc1394_get_focus( (raw1394handle_t)$handle ,(nodeid_t)$node ,$focus ) #} ))
 
(defmethod dc1394  set_focus (  focus )
  
  ((-int-) focus)   ;; unsigned int -> int
  (int  #{  dc1394_set_focus( (raw1394handle_t)$handle ,(nodeid_t)$node ,$focus ) #} ))
 
(defmethod dc1394  get_temperature (  target_temperature temperature )
  
  ((-gptr- "unsigned int *") target_temperature) 
  ((-gptr- "unsigned int *") temperature) 
  (int  #{  dc1394_get_temperature( (raw1394handle_t)$handle ,(nodeid_t)$node ,$target_temperature  ,$temperature ) #} ))
 
(defmethod dc1394  set_temperature (  target_temperature )
  
  ((-int-) target_temperature)   ;; unsigned int -> int
  (int  #{  dc1394_set_temperature( (raw1394handle_t)$handle ,(nodeid_t)$node ,$target_temperature ) #} ))
 
(defmethod dc1394  get_trigger_mode (  mode )
  
  ((-gptr- "unsigned int *") mode) 
  (int  #{  dc1394_get_trigger_mode( (raw1394handle_t)$handle ,(nodeid_t)$node ,$mode ) #} ))
 
(defmethod dc1394  set_trigger_mode (  mode )
  
  ((-int-) mode)   ;; unsigned int -> int
  (int  #{  dc1394_set_trigger_mode( (raw1394handle_t)$handle ,(nodeid_t)$node ,$mode ) #} ))
 
(defmethod dc1394  get_zoom (  zoom )
  
  ((-gptr- "unsigned int *") zoom) 
  (int  #{  dc1394_get_zoom( (raw1394handle_t)$handle ,(nodeid_t)$node ,$zoom ) #} ))
 
(defmethod dc1394  set_zoom (  zoom )
  
  ((-int-) zoom)   ;; unsigned int -> int
  (int  #{  dc1394_set_zoom( (raw1394handle_t)$handle ,(nodeid_t)$node ,$zoom ) #} ))
 
(defmethod dc1394  get_pan (  pan )
  
  ((-gptr- "unsigned int *") pan) 
  (int  #{  dc1394_get_pan( (raw1394handle_t)$handle ,(nodeid_t)$node ,$pan ) #} ))
 
(defmethod dc1394  set_pan (  pan )
  
  ((-int-) pan)   ;; unsigned int -> int
  (int  #{  dc1394_set_pan( (raw1394handle_t)$handle ,(nodeid_t)$node ,$pan ) #} ))
 
(defmethod dc1394  get_tilt (  tilt )
  
  ((-gptr- "unsigned int *") tilt) 
  (int  #{  dc1394_get_tilt( (raw1394handle_t)$handle ,(nodeid_t)$node ,$tilt ) #} ))
 
(defmethod dc1394  set_tilt (  tilt )
  
  ((-int-) tilt)   ;; unsigned int -> int
  (int  #{  dc1394_set_tilt( (raw1394handle_t)$handle ,(nodeid_t)$node ,$tilt ) #} ))
 
(defmethod dc1394  get_optical_filter (  optical_filter )
  
  ((-gptr- "unsigned int *") optical_filter) 
  (int  #{  dc1394_get_optical_filter( (raw1394handle_t)$handle ,(nodeid_t)$node ,$optical_filter ) #} ))
 
(defmethod dc1394  set_optical_filter (  optical_filter )
  
  ((-int-) optical_filter)   ;; unsigned int -> int
  (int  #{  dc1394_set_optical_filter( (raw1394handle_t)$handle ,(nodeid_t)$node ,$optical_filter ) #} ))
 
(defmethod dc1394  get_capture_size (  capture_size )
  
  ((-gptr- "unsigned int *") capture_size) 
  (int  #{  dc1394_get_capture_size( (raw1394handle_t)$handle ,(nodeid_t)$node ,$capture_size ) #} ))
 
(defmethod dc1394  set_capture_size (  capture_size )
  
  ((-int-) capture_size)   ;; unsigned int -> int
  (int  #{  dc1394_set_capture_size( (raw1394handle_t)$handle ,(nodeid_t)$node ,$capture_size ) #} ))
 
(defmethod dc1394  get_capture_quality (  capture_quality )
  
  ((-gptr- "unsigned int *") capture_quality) 
  (int  #{  dc1394_get_capture_quality( (raw1394handle_t)$handle ,(nodeid_t)$node ,$capture_quality ) #} ))
 
(defmethod dc1394  set_capture_quality (  capture_quality )
  
  ((-int-) capture_quality)   ;; unsigned int -> int
  (int  #{  dc1394_set_capture_quality( (raw1394handle_t)$handle ,(nodeid_t)$node ,$capture_quality ) #} ))
 
(defmethod dc1394  get_feature_value (  feature value )
  
  ((-int-) feature)   ;; unsigned int -> int
  ((-gptr- "unsigned int *") value) 
  (int  #{  dc1394_get_feature_value( (raw1394handle_t)$handle ,(nodeid_t)$node ,$feature  ,$value ) #} ))
 
(defmethod dc1394  set_feature_value (  feature value )
  
  ((-int-) feature)   ;; unsigned int -> int
  ((-int-) value)   ;; unsigned int -> int
  (int  #{  dc1394_set_feature_value( (raw1394handle_t)$handle ,(nodeid_t)$node ,$feature  ,$value ) #} ))
 
(defmethod dc1394  is_feature_present (  feature value )
  
  ((-int-) feature)   ;; unsigned int -> int
  ((-gptr- "dc1394bool_t *") value) 
  (int  #{  dc1394_is_feature_present( (raw1394handle_t)$handle ,(nodeid_t)$node ,$feature  ,$value ) #} ))
 
(defmethod dc1394  has_one_push_auto (  feature value )
  
  ((-int-) feature)   ;; unsigned int -> int
  ((-gptr- "dc1394bool_t *") value) 
  (int  #{  dc1394_has_one_push_auto( (raw1394handle_t)$handle ,(nodeid_t)$node ,$feature  ,$value ) #} ))
 
(defmethod dc1394  is_one_push_in_operation (  feature value )
  
  ((-int-) feature)   ;; unsigned int -> int
  ((-gptr- "dc1394bool_t *") value) 
  (int  #{  dc1394_is_one_push_in_operation( (raw1394handle_t)$handle ,(nodeid_t)$node ,$feature  ,$value ) #} ))
 
(defmethod dc1394  start_one_push_operation (  feature )
  
  ((-int-) feature)   ;; unsigned int -> int
  (int  #{  dc1394_start_one_push_operation( (raw1394handle_t)$handle ,(nodeid_t)$node ,$feature ) #} ))
 
(defmethod dc1394  can_read_out (  feature value )
  
  ((-int-) feature)   ;; unsigned int -> int
  ((-gptr- "dc1394bool_t *") value) 
  (int  #{  dc1394_can_read_out( (raw1394handle_t)$handle ,(nodeid_t)$node ,$feature  ,$value ) #} ))
 
(defmethod dc1394  can_turn_on_off (  feature value )
  
  ((-int-) feature)   ;; unsigned int -> int
  ((-gptr- "dc1394bool_t *") value) 
  (int  #{  dc1394_can_turn_on_off( (raw1394handle_t)$handle ,(nodeid_t)$node ,$feature  ,$value ) #} ))
 
(defmethod dc1394  is_feature_on (  feature value )
  
  ((-int-) feature)   ;; unsigned int -> int
  ((-gptr- "dc1394bool_t *") value) 
  (int  #{  dc1394_is_feature_on( (raw1394handle_t)$handle ,(nodeid_t)$node ,$feature  ,$value ) #} ))
 
(defmethod dc1394  feature_on_off (  feature value )
  
  ((-int-) feature)   ;; unsigned int -> int
  ((-int-) value)   ;; unsigned int -> int
  (int  #{  dc1394_feature_on_off( (raw1394handle_t)$handle ,(nodeid_t)$node ,$feature  ,$value ) #} ))
 
(defmethod dc1394  has_auto_mode (  feature value )
  
  ((-int-) feature)   ;; unsigned int -> int
  ((-gptr- "dc1394bool_t *") value) 
  (int  #{  dc1394_has_auto_mode( (raw1394handle_t)$handle ,(nodeid_t)$node ,$feature  ,$value ) #} ))
 
(defmethod dc1394  has_manual_mode (  feature value )
  
  ((-int-) feature)   ;; unsigned int -> int
  ((-gptr- "dc1394bool_t *") value) 
  (int  #{  dc1394_has_manual_mode( (raw1394handle_t)$handle ,(nodeid_t)$node ,$feature  ,$value ) #} ))
 
(defmethod dc1394  is_feature_auto (  feature value )
  
  ((-int-) feature)   ;; unsigned int -> int
  ((-gptr- "dc1394bool_t *") value) 
  (int  #{  dc1394_is_feature_auto( (raw1394handle_t)$handle ,(nodeid_t)$node ,$feature  ,$value ) #} ))
 
(defmethod dc1394  auto_on_off (  feature value )
  
  ((-int-) feature)   ;; unsigned int -> int
  ((-int-) value)   ;; unsigned int -> int
  (int  #{  dc1394_auto_on_off( (raw1394handle_t)$handle ,(nodeid_t)$node ,$feature  ,$value ) #} ))
 
(defmethod dc1394  get_min_value (  feature value )
  
  ((-int-) feature)   ;; unsigned int -> int
  ((-gptr- "unsigned int *") value) 
  (int  #{  dc1394_get_min_value( (raw1394handle_t)$handle ,(nodeid_t)$node ,$feature  ,$value ) #} ))
 
(defmethod dc1394  get_max_value (  feature value )
  
  ((-int-) feature)   ;; unsigned int -> int
  ((-gptr- "unsigned int *") value) 
  (int  #{  dc1394_get_max_value( (raw1394handle_t)$handle ,(nodeid_t)$node ,$feature  ,$value ) #} ))
 
(defmethod dc1394  dma_setup_capture (  channel format mode speed frame_rate num_dma_buffers drop_frames dma_device_file camera )
  
  ((-int-) channel) 
  ((-int-) format) 
  ((-int-) mode) 
  ((-int-) speed) 
  ((-int-) frame_rate) 
  ((-int-) num_dma_buffers) 
  ((-int-) drop_frames) 
  ((-gptr- "const char *") dma_device_file) 
  ((-gptr- "dc1394_cameracapture *") camera) 
  (int  #{  dc1394_dma_setup_capture( (raw1394handle_t)$handle ,(nodeid_t)$node ,$channel  ,$format  ,$mode  ,$speed  ,$frame_rate  ,$num_dma_buffers  ,$drop_frames  ,$dma_device_file  ,$camera ) #} ))
 
(defmethod dc1394  get_memory_load_ch (  channel )
  
  ((-gptr- "unsigned int *") channel) 
  (int  #{   dc1394_get_memory_load_ch( (raw1394handle_t)$handle ,(nodeid_t)$node ,$channel ) #} ))
 
(defmethod dc1394  get_memory_save_ch (  channel )
  
  ((-gptr- "unsigned int *") channel) 
  (int  #{   dc1394_get_memory_save_ch( (raw1394handle_t)$handle ,(nodeid_t)$node ,$channel ) #} ))
 
(defmethod dc1394  is_memory_save_in_operation (  value )
  
  ((-gptr- "dc1394bool_t *") value) 
  (int  #{   dc1394_is_memory_save_in_operation( (raw1394handle_t)$handle ,(nodeid_t)$node ,$value ) #} ))
 
(defmethod dc1394  set_memory_save_ch (  channel )
  
  ((-int-) channel)   ;; unsigned int -> int
  (int  #{   dc1394_set_memory_save_ch( (raw1394handle_t)$handle ,(nodeid_t)$node ,$channel ) #} ))
 
(defmethod dc1394  memory_save (  )
  
  (int  #{  dc1394_memory_save( (raw1394handle_t)$handle ,(nodeid_t)$node) #} ))
 
(defmethod dc1394  memory_load (  channel )
  
  ((-int-) channel)   ;; unsigned int -> int
  (int  #{  dc1394_memory_load( (raw1394handle_t)$handle ,(nodeid_t)$node ,$channel ) #} ))
 
(defmethod dc1394  set_trigger_polarity (  polarity )
  
  ((-dc1394bool_t-) polarity) 
  (int  #{  dc1394_set_trigger_polarity( (raw1394handle_t)$handle ,(nodeid_t)$node ,$polarity ) #} ))
 
(defmethod dc1394  get_trigger_polarity (  polarity )
  
  ((-gptr- "dc1394bool_t *") polarity) 
  (int  #{  dc1394_get_trigger_polarity( (raw1394handle_t)$handle ,(nodeid_t)$node ,$polarity ) #} ))
 
(defmethod dc1394  trigger_has_polarity (  polarity )
  
  ((-gptr- "dc1394bool_t *") polarity) 
  (int  #{  dc1394_trigger_has_polarity( (raw1394handle_t)$handle ,(nodeid_t)$node ,$polarity ) #} ))
 
(defmethod dc1394  set_trigger_on_off (  on_off )
  
  ((-dc1394bool_t-) on_off) 
  (int  #{  dc1394_set_trigger_on_off( (raw1394handle_t)$handle ,(nodeid_t)$node ,$on_off ) #} ))
 
(defmethod dc1394  get_trigger_on_off (  on_off )
  
  ((-gptr- "dc1394bool_t *") on_off) 
  (int  #{  dc1394_get_trigger_on_off( (raw1394handle_t)$handle ,(nodeid_t)$node ,$on_off ) #} ))
 
(defmethod dc1394  setup_format7_capture (  channel mode speed bytes_per_packet left top width height camera )
  
  ((-int-) channel) 
  ((-int-) mode) 
  ((-int-) speed) 
  ((-int-) bytes_per_packet) 
  ((-int-) left)   ;; unsigned int -> int
  ((-int-) top)   ;; unsigned int -> int
  ((-int-) width)   ;; unsigned int -> int
  ((-int-) height)   ;; unsigned int -> int
  ((-gptr- "dc1394_cameracapture *") camera) 
  (int  #{  dc1394_setup_format7_capture( (raw1394handle_t)$handle ,(nodeid_t)$node ,$channel  ,$mode  ,$speed  ,$bytes_per_packet  ,$left  ,$top  ,$width  ,$height  ,$camera ) #} ))
 
(defmethod dc1394  dma_setup_format7_capture (  channel mode speed bytes_per_packet left top width height num_dma_buffers camera )
  
  ((-int-) channel) 
  ((-int-) mode) 
  ((-int-) speed) 
  ((-int-) bytes_per_packet) 
  ((-int-) left)   ;; unsigned int -> int
  ((-int-) top)   ;; unsigned int -> int
  ((-int-) width)   ;; unsigned int -> int
  ((-int-) height)   ;; unsigned int -> int
  ((-int-) num_dma_buffers) 
  ((-gptr- "dc1394_cameracapture *") camera) 
  (int  #{  dc1394_dma_setup_format7_capture( (raw1394handle_t)$handle ,(nodeid_t)$node ,$channel  ,$mode  ,$speed  ,$bytes_per_packet  ,$left  ,$top  ,$width  ,$height  ,$num_dma_buffers  ,$camera ) #} ))
 
(defmethod dc1394  query_format7_max_image_size (  mode horizontal_size vertical_size )
  
  ((-int-) mode)   ;; unsigned int -> int
  ((-gptr- "unsigned int *") horizontal_size) 
  ((-gptr- "unsigned int *") vertical_size) 
  (int  #{  dc1394_query_format7_max_image_size( (raw1394handle_t)$handle ,(nodeid_t)$node ,$mode  ,$horizontal_size  ,$vertical_size ) #} ))
 
(defmethod dc1394  query_format7_unit_size (  mode horizontal_unit vertical_unit )
  
  ((-int-) mode)   ;; unsigned int -> int
  ((-gptr- "unsigned int *") horizontal_unit) 
  ((-gptr- "unsigned int *") vertical_unit) 
  (int  #{  dc1394_query_format7_unit_size( (raw1394handle_t)$handle ,(nodeid_t)$node ,$mode  ,$horizontal_unit  ,$vertical_unit ) #} ))
 
(defmethod dc1394  query_format7_image_position (  mode left_position top_position )
  
  ((-int-) mode)   ;; unsigned int -> int
  ((-gptr- "unsigned int *") left_position) 
  ((-gptr- "unsigned int *") top_position) 
  (int  #{  dc1394_query_format7_image_position( (raw1394handle_t)$handle ,(nodeid_t)$node ,$mode  ,$left_position  ,$top_position ) #} ))
 
(defmethod dc1394  query_format7_image_size (  mode width height )
  
  ((-int-) mode)   ;; unsigned int -> int
  ((-gptr- "unsigned int *") width) 
  ((-gptr- "unsigned int *") height) 
  (int  #{  dc1394_query_format7_image_size( (raw1394handle_t)$handle ,(nodeid_t)$node ,$mode  ,$width  ,$height ) #} ))
 
(defmethod dc1394  query_format7_color_coding_id (  mode color_id )
  
  ((-int-) mode)   ;; unsigned int -> int
  ((-gptr- "unsigned int *") color_id) 
  (int  #{  dc1394_query_format7_color_coding_id( (raw1394handle_t)$handle ,(nodeid_t)$node ,$mode  ,$color_id ) #} ))
 
(defmethod dc1394  query_format7_color_coding (  mode value )
  
  ((-int-) mode)   ;; unsigned int -> int
  ((-gptr- "quadlet_t *") value) 
  (int  #{  dc1394_query_format7_color_coding( (raw1394handle_t)$handle ,(nodeid_t)$node ,$mode  ,$value ) #} ))
 
(defmethod dc1394  query_format7_pixel_number (  mode pixnum )
  
  ((-int-) mode)   ;; unsigned int -> int
  ((-gptr- "unsigned int *") pixnum) 
  (int  #{  dc1394_query_format7_pixel_number( (raw1394handle_t)$handle ,(nodeid_t)$node ,$mode  ,$pixnum ) #} ))
 
(defmethod dc1394  query_format7_total_bytes (  mode total_bytes )
  
  ((-int-) mode)   ;; unsigned int -> int
  ((-gptr- "unsigned int *") total_bytes) 
  (int  #{  dc1394_query_format7_total_bytes( (raw1394handle_t)$handle ,(nodeid_t)$node ,$mode  ,$total_bytes ) #} ))
 
(defmethod dc1394  query_format7_packet_para (  mode min_bytes max_bytes )
  
  ((-int-) mode)   ;; unsigned int -> int
  ((-gptr- "unsigned int *") min_bytes) 
  ((-gptr- "unsigned int *") max_bytes) 
  (int  #{  dc1394_query_format7_packet_para( (raw1394handle_t)$handle ,(nodeid_t)$node ,$mode  ,$min_bytes  ,$max_bytes ) #} ))
 
(defmethod dc1394  query_format7_byte_per_packet (  mode packet_bytes )
  
  ((-int-) mode)   ;; unsigned int -> int
  ((-gptr- "unsigned int *") packet_bytes) 
  (int  #{  dc1394_query_format7_byte_per_packet( (raw1394handle_t)$handle ,(nodeid_t)$node ,$mode  ,$packet_bytes ) #} ))
 
(defmethod dc1394  set_format7_image_position (  mode left top )
  
  ((-int-) mode)   ;; unsigned int -> int
  ((-int-) left)   ;; unsigned int -> int
  ((-int-) top)   ;; unsigned int -> int
  (int  #{  dc1394_set_format7_image_position( (raw1394handle_t)$handle ,(nodeid_t)$node ,$mode  ,$left  ,$top ) #} ))
 
(defmethod dc1394  set_format7_image_size (  mode width height )
  
  ((-int-) mode)   ;; unsigned int -> int
  ((-int-) width)   ;; unsigned int -> int
  ((-int-) height)   ;; unsigned int -> int
  (int  #{  dc1394_set_format7_image_size( (raw1394handle_t)$handle ,(nodeid_t)$node ,$mode  ,$width  ,$height ) #} ))
 
(defmethod dc1394  set_format7_color_coding_id (  mode color_id )
  
  ((-int-) mode)   ;; unsigned int -> int
  ((-int-) color_id)   ;; unsigned int -> int
  (int  #{  dc1394_set_format7_color_coding_id( (raw1394handle_t)$handle ,(nodeid_t)$node ,$mode  ,$color_id ) #} ))
 
(defmethod dc1394  set_format7_byte_per_packet (  mode packet_bytes )
  
  ((-int-) mode)   ;; unsigned int -> int
  ((-int-) packet_bytes)   ;; unsigned int -> int
  (int  #{  dc1394_set_format7_byte_per_packet( (raw1394handle_t)$handle ,(nodeid_t)$node ,$mode  ,$packet_bytes ) #} ))
 
(defmethod dc1394  query_format7_value_setting (  mode present setting1 err_flag1 err_flag2 )
  
  ((-int-) mode)   ;; unsigned int -> int
  ((-gptr- "unsigned int *") present) 
  ((-gptr- "unsigned int *") setting1) 
  ((-gptr- "unsigned int *") err_flag1) 
  ((-gptr- "unsigned int *") err_flag2) 
  (int  #{  dc1394_query_format7_value_setting( (raw1394handle_t)$handle ,(nodeid_t)$node ,$mode  ,$present  ,$setting1  ,$err_flag1  ,$err_flag2 ) #} ))
 
(defmethod dc1394  set_format7_value_setting (  mode )
  
  ((-int-) mode)   ;; unsigned int -> int
  (int  #{  dc1394_set_format7_value_setting( (raw1394handle_t)$handle ,(nodeid_t)$node ,$mode ) #} ))
 
(defmethod dc1394  query_format7_recommended_byte_per_packet (  mode bpp )
  
  ((-int-) mode)   ;; unsigned int -> int
  ((-gptr- "unsigned int *") bpp) 
  (int  #{  dc1394_query_format7_recommended_byte_per_packet( (raw1394handle_t)$handle ,(nodeid_t)$node ,$mode  ,$bpp ) #} ))
 
(defmethod dc1394  query_format7_packet_per_frame (  mode ppf )
  
  ((-int-) mode)   ;; unsigned int -> int
  ((-gptr- "unsigned int *") ppf) 
  (int  #{  dc1394_query_format7_packet_per_frame( (raw1394handle_t)$handle ,(nodeid_t)$node ,$mode  ,$ppf ) #} ))
 
(defmethod dc1394  query_format7_packet_per_frame (  mode ppf )
  
  ((-int-) mode)   ;; unsigned int -> int
  ((-gptr- "unsigned int *") ppf) 
  (int  #{  dc1394_query_format7_packet_per_frame( (raw1394handle_t)$handle ,(nodeid_t)$node ,$mode  ,$ppf ) #} ))
 
(defmethod dc1394  query_format7_unit_position (  mode horizontal_pos vertical_pos )
  
  ((-int-) mode)   ;; unsigned int -> int
  ((-gptr- "unsigned int *") horizontal_pos) 
  ((-gptr- "unsigned int *") vertical_pos) 
  (int  #{  dc1394_query_format7_unit_position( (raw1394handle_t)$handle ,(nodeid_t)$node ,$mode  ,$horizontal_pos  ,$vertical_pos ) #} ))
 
(defmethod dc1394  query_absolute_feature_min_max (  feature min max )
  
  ((-int-) feature)   ;; unsigned int -> int
  ((-gptr- "float *") min) 
  ((-gptr- "float *") max) 
  (int  #{  dc1394_query_absolute_feature_min_max( (raw1394handle_t)$handle ,(nodeid_t)$node ,$feature  ,$min  ,$max ) #} ))
 
(defmethod dc1394  query_absolute_feature_value (  feature value )
  
  ((-int-) feature) 
  ((-gptr- "float *") value) 
  (int  #{  dc1394_query_absolute_feature_value( (raw1394handle_t)$handle ,(nodeid_t)$node ,$feature  ,$value ) #} ))
 
(defmethod dc1394  set_absolute_feature_value (  feature value )
  
  ((-int-) feature) 
  ((-float-) value) 
  (int  #{  dc1394_set_absolute_feature_value( (raw1394handle_t)$handle ,(nodeid_t)$node ,$feature  ,$value ) #} ))
 
(defmethod dc1394  query_absolute_control (  feature value )
  
  ((-int-) feature)   ;; unsigned int -> int
  ((-gptr- "dc1394bool_t *") value) 
  (int  #{  dc1394_query_absolute_control( (raw1394handle_t)$handle ,(nodeid_t)$node ,$feature  ,$value ) #} ))
 
(defmethod dc1394  absolute_setting_on_off (  feature value )
  
  ((-int-) feature)   ;; unsigned int -> int
  ((-int-) value)   ;; unsigned int -> int
  (int  #{  dc1394_absolute_setting_on_off( (raw1394handle_t)$handle ,(nodeid_t)$node ,$feature  ,$value ) #} ))
 
 )
(defmethod dc1394  has_absolute_control (  feature value )
  
  ((-int-) feature)   ;; unsigned int -> int
  ((-gptr- "dc1394bool_t *") value) 
  (int  #{  dc1394_has_absolute_control( (raw1394handle_t)$handle ,(nodeid_t)$node ,$feature  ,$value ) #} ))
 

(defmethod dc1394  setup_capture (  channel format mode speed frame_rate camera )
  
  ((-int-) channel) 
  ((-int-) format) 
  ((-int-) mode) 
  ((-int-) speed) 
  ((-int-) frame_rate) 
  ((-gptr- "dc1394_cameracapture *") camera) 
  (int  #{   dc1394_setup_capture( (raw1394handle_t)$handle ,(nodeid_t)$node ,$channel  ,$format  ,$mode  ,$speed  ,$frame_rate  ,$camera ) #} )) )

(defmethod dc1394 destroy_handle ()

  (int  #{  dc1394_destroy_handle((raw1394handle_t)$handle) #} ))

(defmethod dc1394 get_camera_nodes ( numcameras  showcameras )
  ((-gptr- "int *") numcameras)
  ((-int-) showcameras)
  (gptr #{  dc1394_get_camera_nodes((raw1394handle_t)$handle, $numcameras, $showcameras); #} ))

(defmethod dc1394  get_sorted_camera_nodes  (numids  ids  numcameras  showcameras )
  ((-int-) numids showcameras)
  ((-gptr- "int *") ids numcameras)
  (gptr #{ dc1394_get_sorted_camera_nodes((raw1394handle_t)$handle, $numids, $ids, $numcameras, $showcameras)  #} ))

(defmethod dc1394  dma_release_camera ( camera)
  ((-gptr- "dc1394_cameracapture *") camera)
  (int  #{ dc1394_dma_release_camera((raw1394handle_t)$handle, $camera)  #} ))

(defmethod dc1394  dma_unlisten (camera)
  ((-gptr- "dc1394_cameracapture *") camera)
  (int  #{ dc1394_dma_unlisten((raw1394handle_t)$handle, $camera) #} ))

(defmethod dc1394  release_camera (camera)
  ((-gptr- "dc1394_cameracapture *") camera)
  (int  #{ dc1394_release_camera((raw1394handle_t)$handle, $camera) #} ))

(defmethod dc1394 single_capture (camera)
  ((-gptr- "dc1394_cameracapture *") camera)
  (int  #{ dc1394_single_capture((raw1394handle_t)$handle, $camera)  #} ))

(defmethod dc1394  multi_capture (cams  num)
  ((-gptr- "dc1394_cameracapture *") camera)
  ((-int-) num)
  (int  #{ dc1394_multi_capture((raw1394handle_t)$handle, $cams, $num)  #} ))


(dhc-make-with-c++ () (list dc1394-lib1394  raw1394-lib1394)
  dummy_dc1394
  (dc1394_cameracapture  dc1394_cameracapture -destructor  get_width get_height get_buffer)
  (dc1394  dc1394 -destructor  setup_capture  set_trigger_mode  start_iso_transmission single_capture  stop_iso_transmission))
)
