📄 properties.c
字号:
{PTP_DPC_NIKON_MeterOff, "2", N_("8s")}, {PTP_DPC_NIKON_MeterOff, "3", N_("16s")}, {PTP_DPC_NIKON_MeterOff, "4", N_("30min")}, {PTP_DPC_NIKON_SelfTimer, "0", N_("2s")}, {PTP_DPC_NIKON_SelfTimer, "1", N_("5s")}, {PTP_DPC_NIKON_SelfTimer, "2", N_("10s")}, {PTP_DPC_NIKON_SelfTimer, "3", N_("20s")}, {PTP_DPC_NIKON_MonitorOff, "0", N_("10s")}, {PTP_DPC_NIKON_MonitorOff, "1", N_("20s")}, {PTP_DPC_NIKON_MonitorOff, "2", N_("1m")}, {PTP_DPC_NIKON_MonitorOff, "3", N_("5m")}, {PTP_DPC_NIKON_MonitorOff, "4", N_("10m")}, {PTP_DPC_NIKON_LongExposureNoiseReduction, "0", N_("Off")}, {PTP_DPC_NIKON_LongExposureNoiseReduction, "1", N_("On")}, {PTP_DPC_NIKON_FileNumberSequence, "0", N_("Off")}, {PTP_DPC_NIKON_FileNumberSequence, "1", N_("On")}, {PTP_DPC_NIKON_FileNumberSequence, "2", N_("Reset!")}, {PTP_DPC_NIKON_FlashShutterSpeed, "0", N_("1/60")}, {PTP_DPC_NIKON_FlashShutterSpeed, "1", N_("1/30")}, {PTP_DPC_NIKON_FlashShutterSpeed, "2", N_("1/15")}, {PTP_DPC_NIKON_FlashShutterSpeed, "3", N_("1/8")}, {PTP_DPC_NIKON_FlashShutterSpeed, "4", N_("1/4")}, {PTP_DPC_NIKON_FlashShutterSpeed, "5", N_("1/2")}, {PTP_DPC_NIKON_FlashShutterSpeed, "6", N_("1s")}, {PTP_DPC_NIKON_FlashShutterSpeed, "7", N_("2s")}, {PTP_DPC_NIKON_FlashShutterSpeed, "8", N_("4s")}, {PTP_DPC_NIKON_FlashShutterSpeed, "9", N_("8s")}, {PTP_DPC_NIKON_FlashShutterSpeed, "10", N_("15s")}, {PTP_DPC_NIKON_FlashShutterSpeed, "11", N_("30s")}, {PTP_DPC_NIKON_BracketSet, "0", N_("AE & Flash")}, {PTP_DPC_NIKON_BracketSet, "1", N_("AE Only")}, {PTP_DPC_NIKON_BracketSet, "2", N_("Flash Only")}, {PTP_DPC_NIKON_BracketSet, "3", N_("White Balance")}, {PTP_DPC_NIKON_BracketOrder, "0", N_("MTR->Under->Over")}, {PTP_DPC_NIKON_BracketOrder, "1", N_("Under->MTR->Over")}, {PTP_DPC_NIKON_ReverseCommandDial, "0", N_("No")}, {PTP_DPC_NIKON_ReverseCommandDial, "1", N_("Yes")}, {PTP_DPC_NIKON_NoCFCard, "1", N_("Release Locked")}, {PTP_DPC_NIKON_NoCFCard, "0", N_("Enabled Release")}, {PTP_DPC_NIKON_ImageCommentAttach, "1", N_("On")}, {PTP_DPC_NIKON_ImageCommentAttach, "0", N_("Off")}, {PTP_DPC_NIKON_ImageRotation, "0", N_("Automatic")}, {PTP_DPC_NIKON_ImageRotation, "1", N_("Off")}, {PTP_DPC_NIKON_BracketingProgram, "0", N_("-2F")}, {PTP_DPC_NIKON_BracketingProgram, "1", N_("+2F")}, {PTP_DPC_NIKON_BracketingProgram, "2", N_("3F")}, {PTP_DPC_NIKON_Bracketing, "0", N_("Off")}, {PTP_DPC_NIKON_Bracketing, "1", N_("On")}, {PTP_DPC_NIKON_AutofocusArea, "0", N_("<CENTER>")}, {PTP_DPC_NIKON_AutofocusArea, "1", N_("<UP>")}, {PTP_DPC_NIKON_AutofocusArea, "2", N_("<DOWN>")}, {PTP_DPC_NIKON_AutofocusArea, "3", N_("<LEFT>")}, {PTP_DPC_NIKON_AutofocusArea, "4", N_("<RIGHT>")}, {PTP_DPC_NIKON_CameraOrientation, "0", N_("Landscape")}, {PTP_DPC_NIKON_CameraOrientation, "1", N_("Left Hand")}, {PTP_DPC_NIKON_CameraOrientation, "2", N_("Right Hand")}, {PTP_DPC_NIKON_FlashExposureCompensation, "-18", N_("-3")}, {PTP_DPC_NIKON_FlashExposureCompensation, "-16", N_("-2.7")}, {PTP_DPC_NIKON_FlashExposureCompensation, "-15", N_("-2.5")}, {PTP_DPC_NIKON_FlashExposureCompensation, "-14", N_("-2.3")}, {PTP_DPC_NIKON_FlashExposureCompensation, "-12", N_("-2.0")}, {PTP_DPC_NIKON_FlashExposureCompensation, "-10", N_("-1.7")}, {PTP_DPC_NIKON_FlashExposureCompensation, "-9", N_("-1.5")}, {PTP_DPC_NIKON_FlashExposureCompensation, "-8", N_("-1.3")}, {PTP_DPC_NIKON_FlashExposureCompensation, "-6", N_("-1.0")}, {PTP_DPC_NIKON_FlashExposureCompensation, "-4", N_("-0.7")}, {PTP_DPC_NIKON_FlashExposureCompensation, "-3", N_("-0.5")}, {PTP_DPC_NIKON_FlashExposureCompensation, "-2", N_("-0.3")}, {PTP_DPC_NIKON_FlashExposureCompensation, "0", N_("0.0")}, {PTP_DPC_NIKON_FlashExposureCompensation, "2", N_("+0.3")}, {PTP_DPC_NIKON_FlashExposureCompensation, "3", N_("+0.5")}, {PTP_DPC_NIKON_FlashExposureCompensation, "4", N_("+0.7")}, {PTP_DPC_NIKON_FlashExposureCompensation, "6", N_("+1.0")}, {PTP_DPC_NIKON_BeepOff, "1", N_("Off")}, {PTP_DPC_NIKON_BeepOff, "0", N_("On")}, {PTP_DPC_NIKON_AutofocusMode, "0", N_("AF-S (single-servo)")}, {PTP_DPC_NIKON_AutofocusMode, "1", N_("AF-C (continuous-servo)")}, {PTP_DPC_NIKON_AFAssist, "0", N_("On")}, {PTP_DPC_NIKON_AFAssist, "1", N_("Off")}, {PTP_DPC_NIKON_PADVPMode, "0", N_("1/125")}, {PTP_DPC_NIKON_PADVPMode, "1", N_("1/60")}, {PTP_DPC_NIKON_PADVPMode, "2", N_("1/30")}, {PTP_DPC_NIKON_PADVPMode, "3", N_("1/15")}, {PTP_DPC_NIKON_PADVPMode, "4", N_("1/8")}, {PTP_DPC_NIKON_PADVPMode, "5", N_("1/4")}, {PTP_DPC_NIKON_PADVPMode, "6", N_("1/2")}, {PTP_DPC_NIKON_PADVPMode, "7", N_("1")}, {PTP_DPC_NIKON_PADVPMode, "8", N_("2")}, {PTP_DPC_NIKON_PADVPMode, "9", N_("4")}, {PTP_DPC_NIKON_PADVPMode, "10", N_("8")}, {PTP_DPC_NIKON_PADVPMode, "11", N_("15")}, {PTP_DPC_NIKON_PADVPMode, "12", N_("30")}, {PTP_DPC_NIKON_ImageReview, "0", N_("On")}, {PTP_DPC_NIKON_ImageReview, "1", N_("Off")}, {PTP_DPC_NIKON_AFAreaIllumination, "0", N_("Auto")}, {PTP_DPC_NIKON_AFAreaIllumination, "1", N_("Off")}, {PTP_DPC_NIKON_AFAreaIllumination, "2", N_("On")}, {PTP_DPC_NIKON_FlashMode, "0", N_("TTL")}, {PTP_DPC_NIKON_FlashMode, "1", N_("Manual")}, {PTP_DPC_NIKON_FlashMode, "2", N_("Commander Mode")}, {PTP_DPC_NIKON_FlashCommanderMode, "0", N_("TTL")}, {PTP_DPC_NIKON_FlashCommanderMode, "1", N_("AA")}, {PTP_DPC_NIKON_FlashCommanderMode, "2", N_("M")}, {PTP_DPC_NIKON_FlashSign, "0", N_("On")}, {PTP_DPC_NIKON_FlashSign, "1", N_("Off")}, {PTP_DPC_NIKON_RemoteTimeout, "0", N_("1min")}, {PTP_DPC_NIKON_RemoteTimeout, "1", N_("5min")}, {PTP_DPC_NIKON_RemoteTimeout, "2", N_("10min")}, {PTP_DPC_NIKON_RemoteTimeout, "3", N_("15min")}, {PTP_DPC_NIKON_GridDisplay, "0", N_("Off")}, {PTP_DPC_NIKON_GridDisplay, "1", N_("On")}, {PTP_DPC_NIKON_FlashModeManualPower, "0", N_("Full power")}, {PTP_DPC_NIKON_FlashModeManualPower, "1", N_("1/2 power")}, {PTP_DPC_NIKON_FlashModeManualPower, "2", N_("1/4 power")}, {PTP_DPC_NIKON_FlashModeManualPower, "3", N_("1/8 power")}, {PTP_DPC_NIKON_FlashModeManualPower, "4", N_("1/16 power")}, {PTP_DPC_NIKON_FlashModeCommanderPower, "0", N_("FULL")}, {PTP_DPC_NIKON_FlashModeCommanderPower, "1", N_("1/2")}, {PTP_DPC_NIKON_FlashModeCommanderPower, "2", N_("1/4")}, {PTP_DPC_NIKON_FlashModeCommanderPower, "3", N_("1/8")}, {PTP_DPC_NIKON_FlashModeCommanderPower, "4", N_("1/16")}, {PTP_DPC_NIKON_FlashModeCommanderPower, "5", N_("1/32")}, {PTP_DPC_NIKON_FlashModeCommanderPower, "6", N_("1/64")}, {PTP_DPC_NIKON_FlashModeCommanderPower, "7", N_("1/128")}, {PTP_DPC_NIKON_CSMMenu, "0", N_("Simple")}, {PTP_DPC_NIKON_CSMMenu, "1", N_("Detailed")}, {PTP_DPC_NIKON_CSMMenu, "2", N_("Yet Unknown/Hidden?")}, {PTP_DPC_NIKON_BracketingIncrement, "12", N_("2.0")}, {PTP_DPC_NIKON_BracketingIncrement, "10", N_("1.7")}, {PTP_DPC_NIKON_BracketingIncrement, "9", N_("1.5")}, {PTP_DPC_NIKON_BracketingIncrement, "8", N_("1.3")}, {PTP_DPC_NIKON_BracketingIncrement, "6", N_("1.0")}, {PTP_DPC_NIKON_BracketingIncrement, "4", N_("0.7")}, {PTP_DPC_NIKON_BracketingIncrement, "3", N_("0.5")}, {PTP_DPC_NIKON_BracketingIncrement, "2", N_("0.3")}, {PTP_DPC_NIKON_BracketingIncrement, "0", N_("0.0")}, {PTP_DPC_NIKON_EVStep, "0", N_("1/3")}, {PTP_DPC_NIKON_EVStep, "1", N_("1/2")}, {PTP_DPC_NIKON_LowLight, "0", N_("No")}, {PTP_DPC_NIKON_LowLight, "1", N_("Yes")}, {PTP_DPC_NIKON_FlashOpen, "0", N_("No")}, {PTP_DPC_NIKON_FlashOpen, "1", N_("Yes")}, {PTP_DPC_NIKON_FlashCharged, "0", N_("No")}, {PTP_DPC_NIKON_FlashCharged, "1", N_("Yes")}, {PTP_DPC_NIKON_AutoExposureLock, "1", N_("Locked")}, {PTP_DPC_NIKON_AutoExposureLock, "0", N_("Not Locked")}, {PTP_DPC_ExposureTime, "4294967295", N_("bulb")}, {PTP_DPC_NIKON_ExposureTime, "4294967295", N_("bulb")}, /* returned by function call */ {PTP_DPC_NIKON_FocalLengthMin, (char*) ptp_prop_getdescscale100, NULL}, {PTP_DPC_NIKON_FocalLengthMax, (char*) ptp_prop_getdescscale100, NULL}, {PTP_DPC_NIKON_MaxApAtMinFocalLength,(char*) ptp_prop_getdescscale100, NULL}, {PTP_DPC_NIKON_MaxApAtMaxFocalLength,(char*) ptp_prop_getdescscale100, NULL}, {PTP_DPC_NIKON_ExposureTime,(char*) ptp_prop_NIKON_d100, NULL}, {0, NULL, NULL}};/* return property value description */#define RETPROPDESC(desc) \ {\ for (i=0; desc[i].dpc!=0; i++) { \ if (desc[i].txt!=NULL) { \ if (desc[i].dpc==dpd->DevicePropertyCode && \ !strcmp(desc[i].val,strval))\ return (desc[i].txt);\ } \ else {\ if (desc[i].dpc==dpd->DevicePropertyCode) \ return (((const char* (*) ()) desc[i].val) (params, dpd, strval)); \ }\ } \ }/** * ptp_prop_getdescbystring: * params: PTPParams* * PTPDevicePropDesc *dpd - Device Property structure * void *value - if not null convert this value * (used internaty to convert * values other than current) * * Returns: pointer to staticaly allocated buffer with property value * meaning as string * **/const char*ptp_prop_getdescbystring(PTPParams* params,PTPDevicePropDesc *dpd,const char *strval){ int i; switch (params->deviceinfo.VendorExtensionID) { case PTP_VENDOR_NIKON: RETPROPDESC(ptp_property_meaning_NIKON); break; } RETPROPDESC(ptp_property_meaning); return NULL;}/** * ptp_prop_getdesc: * params: PTPParams* * PTPDevicePropDesc *dpd - Device Property structure * void *value - if not null convert this value * (used internaty to convert * values other than current) * * Returns: pointer to staticaly allocated buffer with property value * meaning as string * **/const char*ptp_prop_getdesc(PTPParams* params, PTPDevicePropDesc *dpd, void *val){ const char *strval; /* Get Device Property value as string */ strval=ptp_prop_tostr(params, dpd, val); return ptp_prop_getdescbystring(params, dpd, strval);}/** * ptp_prop_tostr: * params: PTPParams* * PTPDevicePropDesc *dpd - Device Property structure * void *value - if not null convert this value * (used internaty to convert * values other than current) * * Returns: pointer to staticaly allocated buffer with property value * representation as string * **/const char *ptp_prop_tostr (PTPParams* params, PTPDevicePropDesc *dpd, void *val){ static char strval[SVALLEN]; int n; void *value=val==NULL?dpd->CurrentValue:val; memset(&strval, 0, SVALLEN); switch (dpd->DataType) { case PTP_DTC_INT8: n=snprintf(strval,SVALLEN,"%hhi",*(char*)value); SVALRET(strval); case PTP_DTC_UINT8: n=snprintf(strval,SVALLEN,"%hhu",*(unsigned char*)value); SVALRET(strval); case PTP_DTC_INT16: n=snprintf(strval,SVALLEN,"%hi",*(int16_t*)value); SVALRET(strval); case PTP_DTC_UINT16: n=snprintf(strval,SVALLEN,"%hu",*(uint16_t*)value); SVALRET(strval); case PTP_DTC_INT32: n=snprintf(strval,SVALLEN,"%li",(long int)*(int32_t*)value); SVALRET(strval); case PTP_DTC_UINT32: n=snprintf(strval,SVALLEN,"%lu",(unsigned long)*(uint32_t*)value); SVALRET(strval); case PTP_DTC_STR: n=snprintf(strval,SVALLEN,"\"%s\"",(char *)value); SVALRET(strval); } return NULL;}const char*ptp_prop_getvalbyname(PTPParams* params, char* name, uint16_t dpc){ int i; /* doeasn't match for function interpretation */ for (i=0; ptp_property_meaning[i].txt!=NULL; i++) if (ptp_property_meaning[i].dpc==dpc) if (! strncasecmp(ptp_property_meaning[i].txt,name, strlen(name))) return ptp_property_meaning[i].val; /* XXX */ for (i=0; ptp_property_meaning_NIKON[i].txt!=NULL; i++) if (ptp_property_meaning_NIKON[i].dpc==dpc) if (!strncasecmp(ptp_property_meaning_NIKON[i].txt,name, strlen(name))) return ptp_property_meaning_NIKON[i].val; return NULL;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -