From 7c8d4fb42e24815603f2f79e64b9439bc3a12d3d Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sun, 27 Apr 2014 14:06:30 +0000 Subject: [PATCH] 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 --- camlibs/ptp2/library.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/camlibs/ptp2/library.c b/camlibs/ptp2/library.c index edbf55a60..e1ba68904 100644 --- a/camlibs/ptp2/library.c +++ b/camlibs/ptp2/library.c @@ -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)