diff --git a/camlibs/ptp2/config.c b/camlibs/ptp2/config.c index c09a610ade..fae3d66542 100644 --- a/camlibs/ptp2/config.c +++ b/camlibs/ptp2/config.c @@ -483,7 +483,8 @@ camera_prepare_capture (Camera *camera, GPContext *context) PTPPropertyValue propval; propval.u16 = 0x0002; - return ptp_setdevicepropvalue (params, 0xd207, &propval, PTP_DTC_UINT16); + C_PTP (ptp_setdevicepropvalue (params, 0xd207, &propval, PTP_DTC_UINT16)); + return GP_OK; } break; case PTP_VENDOR_CANON: @@ -572,6 +573,16 @@ camera_unprepare_capture (Camera *camera, GPContext *context) gp_context_error(context, _("Sorry, your Canon camera does not support Canon capture")); return GP_ERROR_NOT_SUPPORTED; + case PTP_VENDOR_FUJI: + { + PTPPropertyValue propval; + PTPParams *params = &camera->pl->params; + + propval.u16 = 0x0001; + C_PTP (ptp_setdevicepropvalue (params, 0xd207, &propval, PTP_DTC_UINT16)); + return GP_OK; + } + break; default: /* generic capture does not need unpreparation */ return GP_OK; diff --git a/camlibs/ptp2/library.c b/camlibs/ptp2/library.c index c651c74172..688acf9739 100644 --- a/camlibs/ptp2/library.c +++ b/camlibs/ptp2/library.c @@ -2463,6 +2463,9 @@ camera_exit (Camera *camera, GPContext *context) C_PTP (ptp_sony_9280(params, 0x4,0,5,0,0,0,0)); } break; + case PTP_VENDOR_FUJI: + CR (camera_unprepare_capture (camera, context)); + break; } if (camera->pl->checkevents) @@ -3966,6 +3969,9 @@ camera_fuji_capture (Camera *camera, CameraCaptureType type, CameraFilePath *pat C_PTP_REP (ptp_check_event (params)); } +#if 0 + /* FIXME: Marcus ... I need to review this when I get hands on a camera ... the objecthandles loop needs to go */ + /* Reporter in https://github.com/gphoto/libgphoto2/issues/133 says only 1 event ever is sent, so this does not work */ /* there is a ObjectAdded event being sent */ do { C_PTP_REP (ptp_check_event (params)); @@ -3982,7 +3988,8 @@ camera_fuji_capture (Camera *camera, CameraCaptureType type, CameraFilePath *pat } } while (waiting_for_timeout (&back_off_wait, event_start, 500)); /* wait for 0.5 seconds after busy is no longer signaled */ - /* If we got no event in 2 seconds duplicate the nikon broken capture, as we do not know how to get events yet */ + /* If we got no event seconds duplicate the nikon broken capture, as we do not know how to get events yet */ +#endif tries = 5; GP_LOG_D ("XXXX missing fuji objectadded events workaround");