diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2017-05-17 08:26:52 +0200 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2017-05-17 08:26:52 +0200 |
commit | c04bac01b0c50d64ed39ef4b0da7171e3079092c (patch) | |
tree | 38f6c260c1c8d3902f70713d4859d0d3df816e0b | |
parent | ea9f47d1e5c913889c679527c6df51b4958acb20 (diff) | |
download | libgphoto2-c04bac01b0c50d64ed39ef4b0da7171e3079092c.tar.gz |
fuji: add unprepare capture
fuji: disable event handling as the reporters says this is not working
https://github.com/gphoto/libgphoto2/issues/133
-rw-r--r-- | camlibs/ptp2/config.c | 13 | ||||
-rw-r--r-- | camlibs/ptp2/library.c | 9 |
2 files changed, 20 insertions, 2 deletions
diff --git a/camlibs/ptp2/config.c b/camlibs/ptp2/config.c index c09a610ad..fae3d6654 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 c651c7417..688acf973 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"); |