summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2009-03-31 12:56:06 +0000
committerMarcus Meissner <marcus@jet.franken.de>2009-03-31 12:56:06 +0000
commit75366d64ab4c51e7f8ef7081b08464fcdd05c93c (patch)
tree1e231fe7ffa1a43b55e91491811bc8dd206156ae
parenteb56f4546e570d5909e5fcb625dc145da1aef8e8 (diff)
downloadlibgphoto2-75366d64ab4c51e7f8ef7081b08464fcdd05c93c.tar.gz
merged current work from trunk for tether and liveview
git-svn-id: https://svn.code.sf.net/p/gphoto/code/branches/libgphoto2-2_4/libgphoto2@11912 67ed7778-7388-44ab-90cf-0a291f65f57c
-rw-r--r--camlibs/ptp2/config.c13
-rw-r--r--camlibs/ptp2/library.c142
-rw-r--r--camlibs/ptp2/ptp.c33
-rw-r--r--camlibs/ptp2/ptp.h30
4 files changed, 180 insertions, 38 deletions
diff --git a/camlibs/ptp2/config.c b/camlibs/ptp2/config.c
index b7ff23ef3..dccb6d3eb 100644
--- a/camlibs/ptp2/config.c
+++ b/camlibs/ptp2/config.c
@@ -1164,8 +1164,8 @@ static struct deviceproptableu8 nikon_afmode[] = {
{ N_("AF-S"), 0, 0 },
{ N_("AF-C"), 1, 0 },
{ N_("AF-A"), 2, 0 },
- { "AF Mode 3? report.", 3, 0 },
- { N_("Manual"), 4, 0 },
+ { N_("MF (fixed)"), 3, 0 },
+ { N_("MF (selection)"), 4, 0 },
/* more for newer */
};
GENERIC8TABLE(Nikon_AFMode,nikon_afmode)
@@ -1890,6 +1890,12 @@ static struct deviceproptableu8 nikon_lcdofftime[] = {
};
GENERIC8TABLE(Nikon_LCDOffTime,nikon_lcdofftime)
+static struct deviceproptableu8 nikon_recordingmedia[] = {
+ { N_("Card"), 0x00, 0 },
+ { N_("SDRAM"), 0x01, 0 },
+};
+GENERIC8TABLE(Nikon_RecordingMedia,nikon_recordingmedia)
+
static struct deviceproptableu8 nikon_meterofftime[] = {
{ N_("4 seconds"), 0x00, 0 },
{ N_("6 seconds"), 0x01, 0 },
@@ -3025,6 +3031,7 @@ static struct submenu camera_settings_menu[] = {
{ N_("Image Comment"), "imgcomment", PTP_DPC_NIKON_ImageCommentString, PTP_VENDOR_NIKON, PTP_DTC_STR, _get_STR, _put_STR },
{ N_("Enable Image Comment"), "imgcommentenable", PTP_DPC_NIKON_ImageCommentEnable, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_OnOff_UINT8, _put_Nikon_OnOff_UINT8 },
{ N_("LCD Off Time"), "lcdofftime", PTP_DPC_NIKON_MonitorOff, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_LCDOffTime, _put_Nikon_LCDOffTime },
+ { N_("Recording Media"), "recordingmedia", PTP_DPC_NIKON_RecordingMedia, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_RecordingMedia, _put_Nikon_RecordingMedia },
{ N_("Meter Off Time"), "meterofftime", PTP_DPC_NIKON_MeterOff, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_MeterOffTime, _put_Nikon_MeterOffTime },
{ N_("CSM Menu"), "csmmenu", PTP_DPC_NIKON_CSMMenu, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_OnOff_UINT8, _put_Nikon_OnOff_UINT8 },
{ N_("Reverse Command Dial"), "reversedial", PTP_DPC_NIKON_ReverseCommandDial, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_OnOff_UINT8, _put_Nikon_OnOff_UINT8 },
@@ -3153,7 +3160,7 @@ static struct submenu capture_settings_menu[] = {
{ N_("Saturation"), "saturation", PTP_DPC_NIKON_Saturation, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_Saturation, _put_Nikon_Saturation },
{ N_("Hue Adjustment"), "hueadjustment", PTP_DPC_NIKON_HueAdjustment, PTP_VENDOR_NIKON, PTP_DTC_INT8, _get_Nikon_HueAdjustment, _put_Nikon_HueAdjustment },
- { N_("Low Light"), "lowlight", PTP_DPC_NIKON_LowLight, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_LowLight, _put_None },
+ { N_("Low Light"), "lowlight", PTP_DPC_NIKON_ExposureDisplayStatus, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_LowLight, _put_None },
{ N_("Light Meter"), "lightmeter", PTP_DPC_NIKON_LightMeter, PTP_VENDOR_NIKON, PTP_DTC_INT8, _get_Nikon_LightMeter, _put_None },
{ N_("AF Locked"), "aflocked", PTP_DPC_NIKON_AFLockStatus, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_OnOff_UINT8, _put_None },
{ N_("AE Locked"), "aelocked", PTP_DPC_NIKON_AELockStatus, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_OnOff_UINT8, _put_None },
diff --git a/camlibs/ptp2/library.c b/camlibs/ptp2/library.c
index 125e1a899..6fe45be39 100644
--- a/camlibs/ptp2/library.c
+++ b/camlibs/ptp2/library.c
@@ -858,6 +858,9 @@ static struct {
/* Martin Lasarsch at SUSE. MTP_PROPLIST returns just 0 entries */
{"Canon:Digital IXUS 90 IS", 0x04a9, 0x3174, PTPBUG_DELETE_SENDS_EVENT|PTP_MTP},
+ /* https://sourceforge.net/tracker/?func=detail&aid=2722422&group_id=8874&atid=358874 */
+ {"Canon:Digital IXUS 85 IS", 0x04a9, 0x3174, PTPBUG_DELETE_SENDS_EVENT},
+
/* Olaf Hering at SUSE */
{"Canon:PowerShot A590 IS", 0x04a9, 0x3176, PTPBUG_DELETE_SENDS_EVENT},
@@ -1039,7 +1042,7 @@ set_mimetype (Camera *camera, CameraFile *file, uint16_t vendorcode, uint16_t of
continue;
return gp_file_set_mime_type (file, object_formats[i].txt);
}
- gp_log (GP_LOG_DEBUG, "ptp2/setmimetype", "Failed to find mime type for %04x\n", ofc);
+ gp_log (GP_LOG_DEBUG, "ptp2/setmimetype", "Failed to find mime type for %04x", ofc);
return gp_file_set_mime_type (file, "application/x-unknown");
}
@@ -1056,7 +1059,7 @@ strcpy_mime(char * dest, uint16_t vendor_code, uint16_t ofc) {
return;
}
}
- gp_log (GP_LOG_DEBUG, "ptp2/strcpymimetype", "Failed to find mime type for %04x\n", ofc);
+ gp_log (GP_LOG_DEBUG, "ptp2/strcpymimetype", "Failed to find mime type for %04x", ofc);
strcpy(dest, "application/x-unknown");
}
@@ -1074,7 +1077,7 @@ get_mimetype (Camera *camera, CameraFile *file, uint16_t vendor_code)
if (!strcmp(mimetype,object_formats[i].txt))
return (object_formats[i].format_code);
}
- gp_log (GP_LOG_DEBUG, "ptp2/strcpymimetype", "Failed to find mime type for %s\n", mimetype);
+ gp_log (GP_LOG_DEBUG, "ptp2/strcpymimetype", "Failed to find mime type for %s", mimetype);
return (PTP_OFC_Undefined);
}
@@ -1550,8 +1553,8 @@ camera_nikon_capture (Camera *camera, CameraCaptureType type, CameraFilePath *pa
if (ret != PTP_RC_OK)
break;
for (i=0;i<evtcnt;i++) {
- gp_log (GP_LOG_DEBUG , "ptp/nikon_capture", "%d:nevent.Code is %x / param %lx\n", i, nevent[i].code, (unsigned long)nevent[i].param1);
- if (nevent[i].code == 0xc101) {
+ gp_log (GP_LOG_DEBUG , "ptp/nikon_capture", "%d:nevent.Code is %x / param %lx", i, nevent[i].code, (unsigned long)nevent[i].param1);
+ if (nevent[i].code == PTP_EC_Nikon_ObjectAddedInSDRAM) {
hasc101=1;
newobject = nevent[i].param1;
if (!newobject) newobject = 0xffff0001;
@@ -1744,7 +1747,7 @@ camera_canon_capture (Camera *camera, CameraCaptureType type, CameraFilePath *pa
(storageids.Storage[0] == 0x00010000)
)
) {
- gp_log (GP_LOG_DEBUG, "ptp", "Assuming no CF card present - switching to MEMORY Transfer.\n");
+ gp_log (GP_LOG_DEBUG, "ptp", "Assuming no CF card present - switching to MEMORY Transfer.");
propval.u16 = xmode = CANON_TRANSFER_MEMORY;
}
free (storageids.Storage);
@@ -1752,7 +1755,7 @@ camera_canon_capture (Camera *camera, CameraCaptureType type, CameraFilePath *pa
}
ret = ptp_setdevicepropvalue(params, PTP_DPC_CANON_CaptureTransferMode, &propval, PTP_DTC_UINT16);
if (ret != PTP_RC_OK)
- gp_log (GP_LOG_DEBUG, "ptp", "setdevicepropvalue CaptureTransferMode failed, %x\n", ret);
+ gp_log (GP_LOG_DEBUG, "ptp", "setdevicepropvalue CaptureTransferMode failed, %x", ret);
}
#if 0
@@ -1768,9 +1771,9 @@ camera_canon_capture (Camera *camera, CameraCaptureType type, CameraFilePath *pa
/* Catch event */
if (PTP_RC_OK == (val16 = params->event_wait (params, &event))) {
if (event.Code == PTP_EC_CaptureComplete)
- gp_log (GP_LOG_DEBUG, "ptp", "Event: capture complete. \n");
+ gp_log (GP_LOG_DEBUG, "ptp", "Event: capture complete.");
else
- gp_log (GP_LOG_DEBUG, "ptp", "Unknown event: 0x%X\n", event.Code);
+ gp_log (GP_LOG_DEBUG, "ptp", "Unknown event: 0x%X", event.Code);
} /* else no event yet ... try later. */
/* checking events in stack. */
@@ -1783,7 +1786,7 @@ camera_canon_capture (Camera *camera, CameraCaptureType type, CameraFilePath *pa
if (ret!=PTP_RC_OK)
continue;
if (isevent)
- gp_log (GP_LOG_DEBUG, "ptp","evdata: L=0x%X, T=0x%X, C=0x%X, trans_id=0x%X, p1=0x%X, p2=0x%X, p3=0x%X\n", usbevent.length,usbevent.type,usbevent.code,usbevent.trans_id, usbevent.param1, usbevent.param2, usbevent.param3);
+ gp_log (GP_LOG_DEBUG, "ptp","evdata: L=0x%X, T=0x%X, C=0x%X, trans_id=0x%X, p1=0x%X, p2=0x%X, p3=0x%X", usbevent.length,usbevent.type,usbevent.code,usbevent.trans_id, usbevent.param1, usbevent.param2, usbevent.param3);
if ( isevent &&
(usbevent.type==PTP_USB_CONTAINER_EVENT) &&
(usbevent.code==PTP_EC_CANON_RequestObjectTransfer)
@@ -1791,12 +1794,12 @@ camera_canon_capture (Camera *camera, CameraCaptureType type, CameraFilePath *pa
int j;
handle=usbevent.param1;
- gp_log (GP_LOG_DEBUG, "ptp", "PTP_EC_CANON_RequestObjectTransfer, object handle=0x%X. \n",usbevent.param1);
+ gp_log (GP_LOG_DEBUG, "ptp", "PTP_EC_CANON_RequestObjectTransfer, object handle=0x%X.",usbevent.param1);
newobject = usbevent.param1;
for (j=0;j<2;j++) {
ret=ptp_canon_checkevent(params,&usbevent,&isevent);
if ((ret==PTP_RC_OK) && isevent)
- gp_log (GP_LOG_DEBUG, "ptp", "evdata: L=0x%X, T=0x%X, C=0x%X, trans_id=0x%X, p1=0x%X, p2=0x%X, p3=0x%X\n", usbevent.length,usbevent.type,usbevent.code,usbevent.trans_id, usbevent.param1, usbevent.param2, usbevent.param3);
+ gp_log (GP_LOG_DEBUG, "ptp", "evdata: L=0x%X, T=0x%X, C=0x%X, trans_id=0x%X, p1=0x%X, p2=0x%X, p3=0x%X", usbevent.length,usbevent.type,usbevent.code,usbevent.trans_id, usbevent.param1, usbevent.param2, usbevent.param3);
}
/* Marcus: Not sure if we really needs this.
ret = ptp_canon_reset_aeafawb(params,7);
@@ -1809,14 +1812,14 @@ camera_canon_capture (Camera *camera, CameraCaptureType type, CameraFilePath *pa
if (val16!=PTP_RC_OK) {
if (PTP_RC_OK==params->event_wait (params, &event)) {
if (event.Code==PTP_EC_CaptureComplete)
- gp_log (GP_LOG_DEBUG, "ptp", "Event: capture complete(2). \n");
+ gp_log (GP_LOG_DEBUG, "ptp", "Event: capture complete(2).");
else
- gp_log (GP_LOG_DEBUG, "ptp", "Event: 0x%X (2)\n", event.Code);
+ gp_log (GP_LOG_DEBUG, "ptp", "Event: 0x%X (2)", event.Code);
} else
- gp_log (GP_LOG_DEBUG, "ptp", "No expected capture complete event\n");
+ gp_log (GP_LOG_DEBUG, "ptp", "No expected capture complete event");
}
if (!found) {
- gp_log (GP_LOG_DEBUG, "ptp","ERROR: Capture timed out!\n");
+ gp_log (GP_LOG_DEBUG, "ptp","ERROR: Capture timed out!");
return GP_ERROR_TIMEOUT;
}
@@ -2025,6 +2028,9 @@ camera_wait_for_event (Camera *camera, int timeout,
int i, oldtimeout;
uint16_t ret;
time_t event_start;
+ CameraFile *file;
+ char *ximage;
+ int finish = 0;
static PTPCanon_changes_entry *backlogentries = NULL;
static int nrofbacklogentries = 0;
@@ -2039,7 +2045,6 @@ static int nrofbacklogentries = 0;
) {
PTPCanon_changes_entry *entries = NULL;
int nrofentries = 0;
- int finish = 0;
event_start=time(NULL);
*eventtype = GP_EVENT_TIMEOUT;
@@ -2067,8 +2072,6 @@ static int nrofbacklogentries = 0;
for (i=0;i<nrofentries;i++) {
gp_log (GP_LOG_DEBUG, "ptp2/wait_for_eos_event", "entry type %04x", entries[i].type);
if (entries[i].type == PTP_CANON_EOS_CHANGES_TYPE_OBJECTINFO) {
- CameraFile *file;
- char *ximage;
gp_log (GP_LOG_DEBUG, "ptp2/wait_for_eos_event", "Found new object! OID 0x%x, name %s", (unsigned int)entries[i].u.object.oid, entries[i].u.object.oi.Filename);
@@ -2148,7 +2151,7 @@ static int nrofbacklogentries = 0;
if (ret!=PTP_RC_OK)
continue;
if (isevent) {
- gp_log (GP_LOG_DEBUG, "ptp","evdata: L=0x%X, T=0x%X, C=0x%X, trans_id=0x%X, p1=0x%X, p2=0x%X, p3=0x%X\n", usbevent.length,usbevent.type,usbevent.code,usbevent.trans_id, usbevent.param1, usbevent.param2, usbevent.param3);
+ gp_log (GP_LOG_DEBUG, "ptp","evdata: L=0x%X, T=0x%X, C=0x%X, trans_id=0x%X, p1=0x%X, p2=0x%X, p3=0x%X", usbevent.length,usbevent.type,usbevent.code,usbevent.trans_id, usbevent.param1, usbevent.param2, usbevent.param3);
*eventtype = GP_EVENT_UNKNOWN;
x = malloc(strlen("PTP Canon Event 0123, Param1 01234567")+1);
if (x) {
@@ -2160,6 +2163,103 @@ static int nrofbacklogentries = 0;
}
return GP_OK;
}
+ if ( (params->deviceinfo.VendorExtensionID == PTP_VENDOR_NIKON) &&
+ ptp_operation_issupported(params, PTP_OC_NIKON_CheckEvent)
+ ) {
+ uint32_t newobject, hasc101;
+
+ event_start=time(NULL);
+ *eventtype = GP_EVENT_TIMEOUT;
+ while ((time(NULL) - event_start)<=timeout) {
+ int i, evtcnt;
+ PTPUSBEventContainer *nevent = NULL;
+
+ ret = ptp_nikon_check_event(params, &nevent, &evtcnt);
+ if (ret != PTP_RC_OK)
+ continue;
+ for (i=0;i<evtcnt;i++) {
+ gp_log (GP_LOG_DEBUG , "ptp/nikon_capture", "%d:nevent.Code is %x / param %lx", i, nevent[i].code, (unsigned long)nevent[i].param1);
+ if (nevent[i].code == PTP_EC_ObjectAdded) {
+ path = (CameraFilePath *)malloc(sizeof(CameraFilePath));
+ if (!path)
+ return GP_ERROR_NO_MEMORY;
+ newobject = nevent[i].param1;
+ add_object (camera, newobject, context);
+ path->name[0]='\0';
+ path->folder[0]='\0';
+
+ for (i = params->handles.n ; i--; ) {
+ PTPObjectInfo *obinfo;
+
+ if (params->handles.Handler[i] != newobject)
+ continue;
+ obinfo = &camera->pl->params.objectinfo[i];
+ strcpy (path->name, obinfo->Filename);
+ sprintf (path->folder,"/"STORAGE_FOLDER_PREFIX"%08lx/",(unsigned long)obinfo->StorageID);
+ get_folder_from_handle (camera, obinfo->StorageID, obinfo->ParentObject, path->folder);
+ /* delete last / or we get confused later. */
+ path->folder[ strlen(path->folder)-1 ] = '\0';
+ CR (gp_filesystem_append (camera->fs, path->folder,
+ path->name, context));
+ break;
+ }
+ *eventtype = GP_EVENT_FILE_ADDED;
+ *eventdata = path;
+ finish = 1;
+ break;
+ }
+ if (nevent[i].code == PTP_EC_Nikon_ObjectAddedInSDRAM) {
+ PTPObjectInfo oi;
+
+ hasc101=1;
+ newobject = nevent[i].param1;
+ if (!newobject) newobject = 0xffff0001;
+ ret = ptp_getobjectinfo (params, newobject, &oi);
+ if (ret != PTP_RC_OK)
+ continue;
+ path = (CameraFilePath *)malloc(sizeof(CameraFilePath));
+ if (!path)
+ return GP_ERROR_NO_MEMORY;
+ path->name[0]='\0';
+ strcpy (path->folder,"/");
+ ret = gp_file_new(&file);
+ if (ret!=GP_OK) return ret;
+ sprintf (path->name, "capt%04d.jpg", capcnt++);
+ gp_file_set_mime_type (file, GP_MIME_JPEG);
+ gp_file_set_name (file, path->name);
+ gp_file_set_type (file, GP_FILE_TYPE_NORMAL);
+
+ gp_log (GP_LOG_DEBUG, "ptp2/nikon_capture", "trying to get object size=0x%x", oi.ObjectCompressedSize);
+ CPR (context, ptp_getobject (params, newobject, &ximage));
+ ret = gp_file_set_data_and_size(file, (char*)ximage, oi.ObjectCompressedSize);
+ if (ret != GP_OK) {
+ gp_file_free (file);
+ return ret;
+ }
+ ret = gp_filesystem_append(camera->fs, path->folder, path->name, context);
+ if (ret != GP_OK) {
+ gp_file_free (file);
+ return ret;
+ }
+ ret = gp_filesystem_set_file_noop(camera->fs, path->folder, file, context);
+ if (ret != GP_OK) {
+ gp_file_free (file);
+ return ret;
+ }
+ *eventtype = GP_EVENT_FILE_ADDED;
+ *eventdata = path;
+ /* We have now handed over the file, disclaim responsibility by unref. */
+ gp_file_unref (file);
+ finish = 1;
+ break;
+ }
+ }
+ free (nevent);
+ if (finish) return GP_OK;
+ }
+ *eventtype = GP_EVENT_TIMEOUT;
+ return GP_OK;
+ }
gp_port_get_timeout (camera->port, &oldtimeout);
gp_port_set_timeout (camera->port, timeout);
ret = params->event_wait(params,&event);
@@ -4742,7 +4842,7 @@ camera_init (Camera *camera, GPContext *context)
camera->pl->params.cd_locale_to_ucs2 = iconv_open(camloc, curloc);
if ((camera->pl->params.cd_ucs2_to_locale == (iconv_t) -1) ||
(camera->pl->params.cd_locale_to_ucs2 == (iconv_t) -1)) {
- gp_log (GP_LOG_ERROR, "iconv", "Failed to create iconv converter.\n");
+ gp_log (GP_LOG_ERROR, "iconv", "Failed to create iconv converter.");
return (GP_ERROR_OS_FAILURE);
}
diff --git a/camlibs/ptp2/ptp.c b/camlibs/ptp2/ptp.c
index d83631b40..236970bdf 100644
--- a/camlibs/ptp2/ptp.c
+++ b/camlibs/ptp2/ptp.c
@@ -2564,7 +2564,7 @@ ptp_nikon_get_preview_image (PTPParams* params, unsigned char **xdata, unsigned
PTP_CNT_INIT(ptp);
ptp.Code=PTP_OC_NIKON_GetPreviewImg;
ptp.Nparam=0;
- ret = ptp_transaction(params, &ptp, PTP_DP_NODATA, 0, xdata, xsize);
+ ret = ptp_transaction(params, &ptp, PTP_DP_GETDATA, 0, xdata, xsize);
if (ret == PTP_RC_OK) {
if (ptp.Nparam > 0)
*handle = ptp.Param1;
@@ -3661,6 +3661,10 @@ ptp_get_property_description(PTPParams* params, uint16_t dpc)
N_("Exposure Meter")},
{PTP_DPC_NIKON_RecordingMedia, /* 0xD10b */
N_("Recording Media")},
+ {PTP_DPC_NIKON_USBSpeed, /* 0xD10c */
+ N_("USB Speed")},
+ {PTP_DPC_NIKON_CCDNumber, /* 0xD10d */
+ N_("CCD Serial Number")},
{PTP_DPC_NIKON_CameraOrientation, /* 0xD10e */
N_("Camera Orientation")},
{PTP_DPC_NIKON_ExposureApertureLock, /* 0xD111 */
@@ -3711,12 +3715,28 @@ ptp_get_property_description(PTPParams* params, uint16_t dpc)
N_("CSM Menu")},
{PTP_DPC_NIKON_BracketingFramesAndSteps, /* 0xD190 */
N_("Bracketing Frames and Steps")},
- {PTP_DPC_NIKON_LowLight, /* 0xD1B0 */
- N_("Low Light")},
+ {PTP_DPC_NIKON_LiveViewStatus, /* 0xD1A2 */
+ N_("Live View Status")},
+ {PTP_DPC_NIKON_LiveViewImageZoomRatio, /* 0xD1A3 */
+ N_("Live View Image Zoom Ratio")},
+ {PTP_DPC_NIKON_LiveViewProhibitCondition, /* 0xD1A4 */
+ N_("Live View Prohibit Condition")},
+ {PTP_DPC_NIKON_ExposureDisplayStatus, /* 0xD1B0 */
+ N_("Exposure Display Status")},
+ {PTP_DPC_NIKON_ExposureDisplayStatus, /* 0xD1B0 */
+ N_("Exposure Display Status")},
+ {PTP_DPC_NIKON_ExposureIndicateStatus, /* 0xD1B1 */
+ N_("Exposure Indicate Status")},
+ {PTP_DPC_NIKON_ExposureIndicateLightup, /* 0xD1B2 */
+ N_("Exposure Indicate Lightup")},
{PTP_DPC_NIKON_FlashOpen, /* 0xD1C0 */
N_("Flash Open")},
{PTP_DPC_NIKON_FlashCharged, /* 0xD1C1 */
N_("Flash Charged")},
+ {PTP_DPC_NIKON_ActivePicCtrlItem, /* 0xD200 */
+ N_("Active Pic Ctrl Item")},
+ {PTP_DPC_NIKON_ChangePicCtrlItem, /* 0xD201 */
+ N_("Change Pic Ctrl Item")},
{0,NULL}
};
struct {
@@ -3731,6 +3751,8 @@ ptp_get_property_description(PTPParams* params, uint16_t dpc)
N_("Friendly Device Name")},
{PTP_DPC_MTP_VolumeLevel, N_("Volume Level")},
{PTP_DPC_MTP_DeviceIcon, N_("Device Icon")},
+ {PTP_DPC_MTP_SessionInitiatorInfo, N_("Session Initiator Info")},
+ {PTP_DPC_MTP_PerceivedDeviceType, N_("Perceived Device Type")},
{PTP_DPC_MTP_PlaybackRate, N_("Playback Rate")},
{PTP_DPC_MTP_PlaybackObject, N_("Playback Object")},
{PTP_DPC_MTP_PlaybackContainerIndex,
@@ -3924,6 +3946,9 @@ ptp_render_property_value(PTPParams* params, uint16_t dpc,
PTP_VENDOR_VAL_BOOL(PTP_DPC_NIKON_GridDisplay,PTP_VENDOR_NIKON),
{PTP_DPC_NIKON_AutofocusMode, PTP_VENDOR_NIKON, 0, N_("AF-S")},
{PTP_DPC_NIKON_AutofocusMode, PTP_VENDOR_NIKON, 1, N_("AF-C")},
+ {PTP_DPC_NIKON_AutofocusMode, PTP_VENDOR_NIKON, 2, N_("AF-A")},
+ {PTP_DPC_NIKON_AutofocusMode, PTP_VENDOR_NIKON, 3, N_("MF (fixed)")},
+ {PTP_DPC_NIKON_AutofocusMode, PTP_VENDOR_NIKON, 4, N_("MF (selection)")},
{PTP_DPC_NIKON_AFAreaIllumination, PTP_VENDOR_NIKON, 0, N_("Auto")},
{PTP_DPC_NIKON_AFAreaIllumination, PTP_VENDOR_NIKON, 1, N_("Off")},
{PTP_DPC_NIKON_AFAreaIllumination, PTP_VENDOR_NIKON, 2, N_("On")},
@@ -4002,7 +4027,7 @@ ptp_render_property_value(PTPParams* params, uint16_t dpc,
{PTP_DPC_NIKON_MonitorOff, PTP_VENDOR_NIKON, 4, N_("10 minutes")},
{PTP_DPC_NIKON_MonitorOff, PTP_VENDOR_NIKON, 5, N_("5 seconds")}, /* d80 observed */
- PTP_VENDOR_VAL_YN(PTP_DPC_NIKON_LowLight,PTP_VENDOR_NIKON),
+ PTP_VENDOR_VAL_YN(PTP_DPC_NIKON_ExposureDisplayStatus,PTP_VENDOR_NIKON),
PTP_VENDOR_VAL_YN(PTP_DPC_NIKON_AFLockStatus,PTP_VENDOR_NIKON),
PTP_VENDOR_VAL_YN(PTP_DPC_NIKON_AELockStatus,PTP_VENDOR_NIKON),
PTP_VENDOR_VAL_YN(PTP_DPC_NIKON_FVLockStatus,PTP_VENDOR_NIKON),
diff --git a/camlibs/ptp2/ptp.h b/camlibs/ptp2/ptp.h
index 2d840bb3e..e3dfe7d4b 100644
--- a/camlibs/ptp2/ptp.h
+++ b/camlibs/ptp2/ptp.h
@@ -570,9 +570,10 @@ typedef struct _PTPIPHeader PTPIPHeader;
/* Nikon extension Event Codes */
#define PTP_EC_Nikon_ObjectAddedInSDRAM 0xC101
-#define PTP_EC_Nikon_CaptureOverflow 0xC102
+#define PTP_EC_Nikon_CaptureCompleteRecInSdram 0xC102
/* Gets 1 parameter, objectid pointing to DPOF object */
#define PTP_EC_Nikon_AdvancedTransfer 0xC103
+#define PTP_EC_Nikon_PreviewImageAdded 0xC104
/* MTP Event codes */
#define PTP_EC_MTP_ObjectPropChanged 0xC801
@@ -1320,6 +1321,7 @@ typedef struct _PTPCanon_Property {
#define PTP_DPC_NIKON_LightMeter 0xD10A /* Exposure Status */
#define PTP_DPC_NIKON_RecordingMedia 0xD10B /* Card or SDRAM */
#define PTP_DPC_NIKON_USBSpeed 0xD10C
+#define PTP_DPC_NIKON_CCDNumber 0xD10D
#define PTP_DPC_NIKON_CameraOrientation 0xD10E
#define PTP_DPC_NIKON_GroupPtnType 0xD10F
#define PTP_DPC_NIKON_ExposureApertureLock 0xD111
@@ -1355,8 +1357,12 @@ typedef struct _PTPCanon_Property {
#define PTP_DPC_NIKON_BatteryCellKind 0xD182
#define PTP_DPC_NIKON_ISOAutoHiLimit 0xD183
#define PTP_DPC_NIKON_BracketingFramesAndSteps 0xD190
-#define PTP_DPC_NIKON_LowLight 0xD1B0 /* exp disp status */
-#define PTP_DPC_NIKON_ExposureIndicateStatus 0xD1B1 /* exp indicate status */
+#define PTP_DPC_NIKON_LiveViewStatus 0xD1A2
+#define PTP_DPC_NIKON_LiveViewImageZoomRatio 0xD1A3
+#define PTP_DPC_NIKON_LiveViewProhibitCondition 0xD1A4
+#define PTP_DPC_NIKON_ExposureDisplayStatus 0xD1B0
+#define PTP_DPC_NIKON_ExposureIndicateStatus 0xD1B1
+#define PTP_DPC_NIKON_ExposureIndicateLightup 0xD1B3
#define PTP_DPC_NIKON_FlashOpen 0xD1C0
#define PTP_DPC_NIKON_FlashCharged 0xD1C1
#define PTP_DPC_NIKON_FlashMRepeatValue 0xD1D0
@@ -1372,15 +1378,19 @@ typedef struct _PTPCanon_Property {
#define PTP_DPC_NIKON_FlashCommandBMode 0xD1DA
#define PTP_DPC_NIKON_FlashCommandBCompensation 0xD1DB
#define PTP_DPC_NIKON_FlashCommandBValue 0xD1DC
+#define PTP_DPC_NIKON_ActivePicCtrlItem 0xD200
+#define PTP_DPC_NIKON_ChangePicCtrlItem 0xD201
/* Microsoft/MTP specific */
-#define PTP_DPC_MTP_SecureTime 0xD101
-#define PTP_DPC_MTP_DeviceCertificate 0xD102
-#define PTP_DPC_MTP_RevocationInfo 0xD103
-#define PTP_DPC_MTP_SynchronizationPartner 0xD401
-#define PTP_DPC_MTP_DeviceFriendlyName 0xD402
-#define PTP_DPC_MTP_VolumeLevel 0xD403
-#define PTP_DPC_MTP_DeviceIcon 0xD405
+#define PTP_DPC_MTP_SecureTime 0xD101
+#define PTP_DPC_MTP_DeviceCertificate 0xD102
+#define PTP_DPC_MTP_RevocationInfo 0xD103
+#define PTP_DPC_MTP_SynchronizationPartner 0xD401
+#define PTP_DPC_MTP_DeviceFriendlyName 0xD402
+#define PTP_DPC_MTP_VolumeLevel 0xD403
+#define PTP_DPC_MTP_DeviceIcon 0xD405
+#define PTP_DPC_MTP_SessionInitiatorInfo 0xD406
+#define PTP_DPC_MTP_PerceivedDeviceType 0xD407
#define PTP_DPC_MTP_PlaybackRate 0xD410
#define PTP_DPC_MTP_PlaybackObject 0xD411
#define PTP_DPC_MTP_PlaybackContainerIndex 0xD412