mirror the behaviour in nikon_capture

git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14917 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
Marcus Meissner
2014-04-27 14:06:30 +00:00
parent fe7cbb09d4
commit 7c8d4fb42e

View File

@@ -3560,6 +3560,16 @@ camera_trigger_capture (Camera *camera, GPContext *context)
params->controlmode = 1;
}
/* On Nikon 1 series, the liveview must be enabled before capture works */
if (NIKON_1(params)) {
ret = ptp_nikon_start_liveview (params);
if (ret != PTP_RC_OK) {
gp_context_error(context, _("Failed to enable liveview on a Nikon 1, but it is required for capture"));
return translate_ptp_result (ret);
}
}
/* Nikon 2 */
if ( (params->deviceinfo.VendorExtensionID == PTP_VENDOR_NIKON) &&
ptp_operation_issupported(params, PTP_OC_NIKON_InitiateCaptureRecInMedia)