free capturemode and burst propdesc

git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@12807 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
Marcus Meissner
2010-03-20 22:11:15 +00:00
parent e758fdf6bb
commit c80cf95f45

View File

@@ -1760,15 +1760,20 @@ camera_nikon_capture (Camera *camera, CameraCaptureType type, CameraFilePath *pa
return GP_ERROR_NOT_SUPPORTED;
}
if ( ptp_property_issupported(params, PTP_DPC_StillCaptureMode) &&
(PTP_RC_OK == ptp_getdevicepropdesc (params, PTP_DPC_StillCaptureMode, &propdesc)) &&
(propdesc.DataType == PTP_DTC_UINT16) &&
(propdesc.CurrentValue.u16 == 2) /* Burst Mode */ &&
ptp_property_issupported(params, PTP_DPC_BurstNumber) &&
(PTP_RC_OK == ptp_getdevicepropdesc (params, PTP_DPC_BurstNumber, &propdesc)) &&
(propdesc.DataType == PTP_DTC_UINT16)
) {
burstnumber = propdesc.CurrentValue.u16;
gp_log (GP_LOG_DEBUG, "ptp2", "burstnumber %d", burstnumber);
(PTP_RC_OK == ptp_getdevicepropdesc (params, PTP_DPC_StillCaptureMode, &propdesc))) {
PTPDevicePropDesc burstdesc;
if ((propdesc.DataType == PTP_DTC_UINT16) &&
(propdesc.CurrentValue.u16 == 2) /* Burst Mode */ &&
ptp_property_issupported(params, PTP_DPC_BurstNumber) &&
(PTP_RC_OK == ptp_getdevicepropdesc (params, PTP_DPC_BurstNumber, &burstdesc))) {
if (burstdesc.DataType == PTP_DTC_UINT16) {
burstnumber = burstdesc.CurrentValue.u16;
gp_log (GP_LOG_DEBUG, "ptp2", "burstnumber %d", burstnumber);
}
ptp_free_devicepropdesc (&burstdesc);
}
ptp_free_devicepropdesc (&propdesc);
}
/* if in liveview mode, we have to run non-af capture */