"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "camlibs/ptp2/config.c" between
libgphoto2-2.5.26.tar.bz2 and libgphoto2-2.5.27.tar.bz2

About: libgphoto2 is a library that can be used by applications to access various digital cameras.

config.c  (libgphoto2-2.5.26.tar.bz2):config.c  (libgphoto2-2.5.27.tar.bz2)
/* config.c /* config.c
* *
* Copyright (C) 2003-2020 Marcus Meissner <marcus@jet.franken.de> * Copyright (C) 2003-2021 Marcus Meissner <marcus@jet.franken.de>
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either * License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version. * version 2 of the License, or (at your option) any later version.
* *
* This library is distributed in the hope that it will be useful, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. * Lesser General Public License for more details.
skipping to change at line 329 skipping to change at line 329
unsigned int i; unsigned int i;
for (i=0;i<dpd.FORM.Enum.NumberOfValues;i++) { for (i=0;i<dpd.FORM.Enum.NumberOfValues;i++) {
if (dpd.FORM.Enum.SupportedValue[i].u32 != PTP_CA NON_EOS_CAPTUREDEST_HD) { if (dpd.FORM.Enum.SupportedValue[i].u32 != PTP_CA NON_EOS_CAPTUREDEST_HD) {
cardval = dpd.FORM.Enum.SupportedValue[i] .u32; cardval = dpd.FORM.Enum.SupportedValue[i] .u32;
break; break;
} }
} }
GP_LOG_D ("Card value is %d",cardval); GP_LOG_D ("Card value is %d",cardval);
} }
if (cardval == -1) { if (cardval == -1) {
GP_LOG_D ("NO Card found - falling back to SDRAM!"); /* https://github.com/gphoto/gphoto2/issues/383 ... we do
cardval = PTP_CANON_EOS_CAPTUREDEST_HD; nt get an enum, but the value is 2 ... */
if (dpd.CurrentValue.u32 != PTP_CANON_EOS_CAPTUREDEST_HD)
{
cardval = dpd.CurrentValue.u32;
} else {
GP_LOG_D ("NO Card found - falling back to SDRAM!
");
cardval = PTP_CANON_EOS_CAPTUREDEST_HD;
}
} }
} }
if (value == 1) if (value == 1)
value = cardval; value = cardval;
/* -1 == use setting from config-file, 1 == card, 4 == ram*/ /* -1 == use setting from config-file, 1 == card, 4 == ram*/
ct_val.u32 = (value == -1) ct_val.u32 = (value == -1)
? (GP_OK == gp_setting_get("ptp2","capturetarget",buf)) && s trcmp(buf,"sdram") ? cardval : PTP_CANON_EOS_CAPTUREDEST_HD ? (GP_OK == gp_setting_get("ptp2","capturetarget",buf)) && s trcmp(buf,"sdram") ? cardval : PTP_CANON_EOS_CAPTUREDEST_HD
: value; : value;
skipping to change at line 469 skipping to change at line 474
/* Get the second bulk set of 0x9116 property data */ /* Get the second bulk set of 0x9116 property data */
C_PTP (ptp_check_eos_events (params)); C_PTP (ptp_check_eos_events (params));
params->eos_captureenabled = 1; params->eos_captureenabled = 1;
/* run this only on EOS M, not on PowerShot SX */ /* run this only on EOS M, not on PowerShot SX */
/* I lost track where it is needed. /* I lost track where it is needed.
* Need it: * Need it:
* + EOS M10 * + EOS M10
* + PowerShot SX 720HS * + PowerShot SX 720HS
* + PowerShot G9x mark II * + PowerShot G9x mark II
*
* NOT NEEDED for EOS M6 Mark II ... this behaves like a regular EOS no-M
and will disable tethering if we set output=8.
*/ */
if (is_canon_eos_m (params)) { if ( is_canon_eos_m (params) &&
(strcmp(params->deviceinfo.Model,"Canon EOS M6 Mark II") != 0)
) {
/* This code is needed on EOS m3 at least. might not be needed on others ... mess :/ */ /* This code is needed on EOS m3 at least. might not be needed on others ... mess :/ */
PTPPropertyValue ct_val; PTPPropertyValue ct_val;
GP_LOG_D ("EOS M detected"); GP_LOG_D ("EOS M detected");
C_PTP (ptp_canon_eos_seteventmode(params, 2)); C_PTP (ptp_canon_eos_seteventmode(params, 2));
ct_val.u16 = 0x0008; ct_val.u16 = 0x0008;
C_PTP (ptp_canon_eos_setdevicepropvalue (params, PTP_DPC_CANON_EO S_EVFOutputDevice, &ct_val, PTP_DTC_UINT16)); C_PTP (ptp_canon_eos_setdevicepropvalue (params, PTP_DPC_CANON_EO S_EVFOutputDevice, &ct_val, PTP_DTC_UINT16));
#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION #ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
skipping to change at line 646 skipping to change at line 655
uint16_t res; uint16_t res;
int tries; int tries;
/* wait either 1 second, or 50 tries */ /* wait either 1 second, or 50 tries */
if (waitms) if (waitms)
tries=timeout/waitms; tries=timeout/waitms;
else else
tries=50; tries=50;
do { do {
res = ptp_nikon_device_ready(params); res = ptp_nikon_device_ready(params);
if (res != PTP_RC_DeviceBusy) if ( (res != PTP_RC_DeviceBusy) &&
(res != PTP_RC_NIKON_Bulb_Release_Busy)
)
return res; return res;
if (waitms) usleep(waitms*1000)/*wait a bit*/; if (waitms) usleep(waitms*1000)/*wait a bit*/;
} while (tries--); } while (tries--);
return res; return res;
} }
struct submenu; struct submenu;
#define CONFIG_GET_ARGS Camera *camera, CameraWidget **widget, struct submenu* m enu, PTPDevicePropDesc *dpd #define CONFIG_GET_ARGS Camera *camera, CameraWidget **widget, struct submenu* m enu, PTPDevicePropDesc *dpd
#define CONFIG_GET_NAMES camera, widget, menu, dpd #define CONFIG_GET_NAMES camera, widget, menu, dpd
typedef int (*get_func)(CONFIG_GET_ARGS); typedef int (*get_func)(CONFIG_GET_ARGS);
skipping to change at line 1011 skipping to change at line 1022
} }
static int static int
_put_AUINT8_as_CHAR_ARRAY(CONFIG_PUT_ARGS) { _put_AUINT8_as_CHAR_ARRAY(CONFIG_PUT_ARGS) {
char *value; char *value;
unsigned int i; unsigned int i;
CR (gp_widget_get_value(widget, &value)); CR (gp_widget_get_value(widget, &value));
memset(propval,0,sizeof(PTPPropertyValue)); memset(propval,0,sizeof(PTPPropertyValue));
/* add \0 ? */ /* add \0 ? */
C_MEM (propval->a.v = malloc((strlen(value)+1)*sizeof(PTPPropertyValue))) ; C_MEM (propval->a.v = calloc((strlen(value)+1),sizeof(PTPPropertyValue))) ;
propval->a.count = strlen(value)+1; propval->a.count = strlen(value)+1;
for (i=0;i<strlen(value)+1;i++) for (i=0;i<strlen(value)+1;i++)
propval->a.v[i].u8 = value[i]; propval->a.v[i].u8 = value[i];
return (GP_OK); return (GP_OK);
} }
static int static int
_get_Range_INT8(CONFIG_GET_ARGS) { _get_Range_INT8(CONFIG_GET_ARGS) {
float CurrentValue; float CurrentValue;
skipping to change at line 1672 skipping to change at line 1683
{ N_("Off"), 0x00, PTP_VENDOR_CANON }, { N_("Off"), 0x00, PTP_VENDOR_CANON },
{ N_("On"), 0x01, PTP_VENDOR_CANON }, { N_("On"), 0x01, PTP_VENDOR_CANON },
}; };
GENERIC16TABLE(Canon_BeepMode,canon_beepmode) GENERIC16TABLE(Canon_BeepMode,canon_beepmode)
static int static int
_get_Canon_ZoomRange(CONFIG_GET_ARGS) { _get_Canon_ZoomRange(CONFIG_GET_ARGS) {
float f, t, b, s; float f, t, b, s;
if (!(dpd->FormFlag & PTP_DPFF_Range)) if (!(dpd->FormFlag & PTP_DPFF_Range))
return (GP_ERROR); return GP_ERROR;
gp_widget_new (GP_WIDGET_RANGE, _(menu->label), widget); gp_widget_new (GP_WIDGET_RANGE, _(menu->label), widget);
gp_widget_set_name (*widget,menu->name); gp_widget_set_name (*widget,menu->name);
f = (float)dpd->CurrentValue.u16; f = (float)dpd->CurrentValue.u16;
b = (float)dpd->FORM.Range.MinimumValue.u16; b = (float)dpd->FORM.Range.MinimumValue.u16;
t = (float)dpd->FORM.Range.MaximumValue.u16; t = (float)dpd->FORM.Range.MaximumValue.u16;
s = (float)dpd->FORM.Range.StepSize.u16; s = (float)dpd->FORM.Range.StepSize.u16;
gp_widget_set_range (*widget, b, t, s); gp_widget_set_range (*widget, b, t, s);
gp_widget_set_value (*widget, &f); gp_widget_set_value (*widget, &f);
return (GP_OK); return GP_OK;
} }
static int static int
_put_Canon_ZoomRange(CONFIG_PUT_ARGS) _put_Canon_ZoomRange(CONFIG_PUT_ARGS)
{ {
float f; float f;
CR (gp_widget_get_value(widget, &f)); CR (gp_widget_get_value(widget, &f));
propval->u16 = (unsigned short)f; propval->u16 = (unsigned short)f;
return (GP_OK); return (GP_OK);
skipping to change at line 2006 skipping to change at line 2017
{ N_("DEP"), 0x0006, 0 }, { N_("DEP"), 0x0006, 0 },
{ N_("Custom"), 0x0007, 0 }, { N_("Custom"), 0x0007, 0 },
{ N_("Lock"), 0x0008, 0 }, { N_("Lock"), 0x0008, 0 },
{ N_("Green"), 0x0009, 0 }, { N_("Green"), 0x0009, 0 },
{ N_("Night Portrait"), 0x000a, 0 }, { N_("Night Portrait"), 0x000a, 0 },
{ N_("Sports"), 0x000b, 0 }, { N_("Sports"), 0x000b, 0 },
{ N_("Portrait"), 0x000c, 0 }, { N_("Portrait"), 0x000c, 0 },
{ N_("Landscape"), 0x000d, 0 }, { N_("Landscape"), 0x000d, 0 },
{ N_("Closeup"), 0x000e, 0 }, { N_("Closeup"), 0x000e, 0 },
{ N_("Flash Off"), 0x000f, 0 }, { N_("Flash Off"), 0x000f, 0 },
{ N_("Auto"), 0x0016, 0 }, /* EOS M6 Mark 2 */
{ N_("Handheld Night Scene"), 0x0017, 0 }, /* EOS M6 Mark 2 */
{ N_("HDR Backlight Control"), 0x0018, 0 }, /* EOS M6 Mark 2 */
{ N_("Food"), 0x001b, 0 }, /* EOS M6 Mark 2 */
{ N_("Grainy B/W"), 0x001e, 0 }, /* EOS M6 Mark 2 */
{ N_("Soft focus"), 0x001f, 0 }, /* EOS M6 Mark 2 */
{ N_("Toy camera effect"), 0x0020, 0 }, /* EOS M6 Mark 2 */
{ N_("Fish-eye effect"), 0x0021, 0 }, /* EOS M6 Mark 2 */
{ N_("Water painting effect"), 0x0022, 0 }, /* EOS M6 Mark 2 */
{ N_("Miniature effect"), 0x0023, 0 }, /* EOS M6 Mark 2 */
{ N_("HDR art standard"), 0x0024, 0 }, /* EOS M6 Mark 2 */
{ N_("HDR art vivid"), 0x0025, 0 }, /* EOS M6 Mark 2 */
{ N_("HDR art bold"), 0x0026, 0 }, /* EOS M6 Mark 2 */
{ N_("HDR art embossed"), 0x0027, 0 }, /* EOS M6 Mark 2 */
{ N_("Panning"), 0x002d, 0 }, /* EOS M6 Mark 2 */
{ N_("Self Portrait"), 0x0032, 0 }, /* EOS M6 Mark 2 */
{ N_("Hybrid Auto"), 0x0033, 0 }, /* EOS M6 Mark 2 */
{ N_("Smooth skin"), 0x0034, 0 }, /* EOS M6 Mark 2 */
{ N_("Fv"), 0x0037, 0 }, /* EOS M6 Mark 2 */
}; };
GENERIC16TABLE(Canon_EOS_AutoExposureMode,canon_eos_autoexposuremode) GENERIC16TABLE(Canon_EOS_AutoExposureMode,canon_eos_autoexposuremode)
static struct deviceproptableu32 canon_eos_alomode[] = { static struct deviceproptableu32 canon_eos_alomode[] = {
{ N_("Standard"), 0x10000, 0 }, { N_("Standard"), 0x10000, 0 },
{ N_("Standard (disabled in manual exposure)"), 0x00000, 0 }, { N_("Standard (disabled in manual exposure)"), 0x00000, 0 },
{ N_("Low"), 0x10101, 0 }, { N_("Low"), 0x10101, 0 },
{ N_("Low (disabled in manual exposure)"), 0x00101, 0 }, { N_("Low (disabled in manual exposure)"), 0x00101, 0 },
{ N_("Off"), 0x10303, 0 }, { N_("Off"), 0x10303, 0 },
{ N_("Off (disabled in manual exposure)"), 0x00303, 0 }, { N_("Off (disabled in manual exposure)"), 0x00303, 0 },
skipping to change at line 2071 skipping to change at line 2102
}; };
GENERIC16TABLE(Fuji_LiveViewSize,fuji_liveviewsize) GENERIC16TABLE(Fuji_LiveViewSize,fuji_liveviewsize)
static struct deviceproptableu8 sony_qx_liveviewsize[] = { static struct deviceproptableu8 sony_qx_liveviewsize[] = {
{ "640x480", 1, 0 }, { "640x480", 1, 0 },
{ "1024x768", 2, 0 }, { "1024x768", 2, 0 },
{ "1920x1280", 3, 0 }, { "1920x1280", 3, 0 },
}; };
GENERIC8TABLE(Sony_QX_LiveViewSize,sony_qx_liveviewsize) GENERIC8TABLE(Sony_QX_LiveViewSize,sony_qx_liveviewsize)
static int
_get_Canon_LiveViewSize(CONFIG_GET_ARGS) {
unsigned int i;
unsigned int have = 0;
char buf[20];
if (!(dpd->FormFlag & PTP_DPFF_Enumeration))
return GP_ERROR;
if (dpd->DataType != PTP_DTC_UINT16)
return GP_ERROR;
/* actually it is a flag value, 1 = TFT, 2 = PC, 4 = MOBILE, 8 = MOBILE2 */
gp_widget_new (GP_WIDGET_RADIO, _(menu->label), widget);
gp_widget_set_name (*widget, menu->name);
for (i=0;i<dpd->FORM.Enum.NumberOfValues;i++) {
if ((dpd->FORM.Enum.SupportedValue[i].u16 & 0xe) == 0x2) {
if (!(have & 0x2))
gp_widget_add_choice (*widget, _("Large"));
have |= 0x2;
continue;
}
if ((dpd->FORM.Enum.SupportedValue[i].u16 & 0xe) == 0x4) {
if (!(have & 0x4))
gp_widget_add_choice (*widget, _("Medium"));
have |= 0x4;
continue;
}
if ((dpd->FORM.Enum.SupportedValue[i].u16 & 0xe) == 0x8) {
if (!(have & 0x8))
gp_widget_add_choice (*widget, _("Small"));
have |= 0x8;
continue;
}
}
if ((dpd->CurrentValue.u16 & 0xe) == 0x8) { gp_widget_set_value (*widget,
_("Small")); return GP_OK; }
if ((dpd->CurrentValue.u16 & 0xe) == 0x4) { gp_widget_set_value (*widget,
_("Medium")); return GP_OK; }
if ((dpd->CurrentValue.u16 & 0xe) == 0x2) { gp_widget_set_value (*widget,
_("Large")); return GP_OK; }
sprintf(buf,"val %x", dpd->CurrentValue.u16);
gp_widget_set_value (*widget, buf);
return GP_OK;
}
static int
_put_Canon_LiveViewSize(CONFIG_PUT_ARGS) {
char *val;
unsigned int outputval = 0;
CR (gp_widget_get_value (widget, &val));
if (!strcmp(val,_("Large"))) { outputval = 0x2; }
if (!strcmp(val,_("Medium"))) { outputval = 0x4; }
if (!strcmp(val,_("Small"))) { outputval = 0x8; }
if (outputval == 0)
return GP_ERROR_BAD_PARAMETERS;
/* replace the current outputsize, but keep the TFT flag */
propval->u16 = (dpd->CurrentValue.u16 & ~0xe) | outputval;
return GP_OK;
}
static struct deviceproptableu8 nikon_flashcommanderpower[] = { static struct deviceproptableu8 nikon_flashcommanderpower[] = {
{ N_("Full"), 0, 0 }, { N_("Full"), 0, 0 },
{ "1/2", 1, 0 }, { "1/2", 1, 0 },
{ "1/4", 2, 0 }, { "1/4", 2, 0 },
{ "1/8", 3, 0 }, { "1/8", 3, 0 },
{ "1/16", 4, 0 }, { "1/16", 4, 0 },
{ "1/32", 5, 0 }, { "1/32", 5, 0 },
{ "1/64", 6, 0 }, { "1/64", 6, 0 },
{ "1/128", 7, 0 }, { "1/128", 7, 0 },
}; };
skipping to change at line 2339 skipping to change at line 2430
{ N_("16:9"), 0x02, 0 }, { N_("16:9"), 0x02, 0 },
}; };
GENERIC8TABLE(Sony_AspectRatio,sony_aspectratio) GENERIC8TABLE(Sony_AspectRatio,sony_aspectratio)
/* values are from 6D */ /* values are from 6D */
static struct deviceproptableu16 canon_eos_aspectratio[] = { static struct deviceproptableu16 canon_eos_aspectratio[] = {
{ "3:2", 0x0000, 0}, { "3:2", 0x0000, 0},
{ "1:1", 0x0001, 0}, { "1:1", 0x0001, 0},
{ "4:3", 0x0002, 0}, { "4:3", 0x0002, 0},
{ "16:9", 0x0007, 0}, { "16:9", 0x0007, 0},
{ "1.6x", 0x000d, 0}, /* guess , EOS R */
}; };
GENERIC16TABLE(Canon_EOS_AspectRatio,canon_eos_aspectratio) GENERIC16TABLE(Canon_EOS_AspectRatio,canon_eos_aspectratio)
/* actually in 1/10s of a second, but only 3 values in use */ /* actually in 1/10s of a second, but only 3 values in use */
static struct deviceproptableu16 canon_selftimer[] = { static struct deviceproptableu16 canon_selftimer[] = {
{ N_("Not used"), 0, 0 }, { N_("Not used"), 0, 0 },
{ N_("10 seconds"), 100, 0 }, { N_("10 seconds"), 100, 0 },
{ N_("2 seconds"), 20, 0 }, { N_("2 seconds"), 20, 0 },
}; };
GENERIC16TABLE(Canon_SelfTimer,canon_selftimer) GENERIC16TABLE(Canon_SelfTimer,canon_selftimer)
skipping to change at line 3147 skipping to change at line 3239
} else { /* RANGE uses float */ } else { /* RANGE uses float */
float fvalue; float fvalue;
CR (gp_widget_get_value (widget, &fvalue)); CR (gp_widget_get_value (widget, &fvalue));
propval->u16 = fvalue*100; propval->u16 = fvalue*100;
return GP_OK; return GP_OK;
} }
return GP_ERROR; return GP_ERROR;
} }
/* the common sony f-numbers */
static int sony_fnumbers[] = {
100,
110,
120,
140,
160,
180,
200,
220,
250,
280,
320,
350,
400,
450,
500,
560,
630,
710,
800,
900,
1000,
1100,
1300,
1400,
1600,
1800,
2000,
2200,
2500,
2900,
3200,
3600,
4200,
4500,
5000,
5700,
6400,
};
static int static int
_put_Sony_FNumber(CONFIG_PUT_ARGS) _get_Sony_FNumber(CONFIG_GET_ARGS) {
{ unsigned int i;
float fvalue;
PTPParams *params = &(camera->pl->params); GP_LOG_D ("get_Sony_FNumber");
if (!(dpd->FormFlag & (PTP_DPFF_Enumeration|PTP_DPFF_Range)))
return GP_ERROR;
if (dpd->DataType != PTP_DTC_UINT16)
return GP_ERROR;
CR (gp_widget_get_value (widget, &fvalue)); if (dpd->FormFlag & PTP_DPFF_Enumeration)
return _get_FNumber(CONFIG_GET_NAMES); /* just use the normal co
de */
propval->u16 = fvalue*100; /* probably not used */ /* Range */
return _put_sony_value_u16 (params, PTP_DPC_FNumber, fvalue*100, 0); gp_widget_new (GP_WIDGET_RADIO, _(menu->label), widget);
gp_widget_set_name (*widget, menu->name);
for (i=0;i<sizeof(sony_fnumbers)/sizeof(sony_fnumbers[0]); i++) {
char buf[20];
sprintf(buf,"f/%g",sony_fnumbers[i]/100.0);
gp_widget_add_choice (*widget,buf);
if (sony_fnumbers[i] == dpd->CurrentValue.u16)
gp_widget_set_value (*widget,buf);
}
GP_LOG_D ("get_Sony_FNumber via range and table");
return GP_OK;
} }
static int static int
_put_Sony_QX_FNumber(CONFIG_PUT_ARGS) _put_Sony_FNumber(CONFIG_PUT_ARGS)
{ {
float fvalue; float fvalue = 0.0;
char * value;
CR (gp_widget_get_value (widget, &fvalue)); PTPParams *params = &(camera->pl->params);
propval->u16 = fvalue*100; CR (gp_widget_get_value (widget, &value));
/*return translate_ptp_result (ptp_sony_qx_setdevicecontrolvaluea (&camer if (strstr (value, "f/") == value)
a->pl->params, dpd->DevicePropertyCode, propval, PTP_DTC_UINT16)); */ value += strlen("f/");
return GP_OK; /* will be handled by generic setter going to QX stter */ if (sscanf(value, "%g", &fvalue))
propval->u16 = fvalue*100;
else
return GP_ERROR;
return _put_sony_value_u16 (params, PTP_DPC_FNumber, fvalue*100, 0);
} }
static int static int
_get_ExpTime(CONFIG_GET_ARGS) { _get_ExpTime(CONFIG_GET_ARGS) {
int i; int i;
PTPParams *params = &(camera->pl->params); PTPParams *params = &(camera->pl->params);
if (!(dpd->FormFlag & PTP_DPFF_Enumeration)) if (!(dpd->FormFlag & PTP_DPFF_Enumeration))
return (GP_ERROR); return (GP_ERROR);
if (dpd->DataType != PTP_DTC_UINT32) if (dpd->DataType != PTP_DTC_UINT32)
skipping to change at line 6832 skipping to change at line 6987
unsigned int xval = 0; unsigned int xval = 0;
if (!ptp_operation_issupported(&camera->pl->params, PTP_OC_NIKON_ChangeCa meraMode)) if (!ptp_operation_issupported(&camera->pl->params, PTP_OC_NIKON_ChangeCa meraMode))
return GP_ERROR_NOT_SUPPORTED; return GP_ERROR_NOT_SUPPORTED;
gp_widget_get_value(widget, &val); gp_widget_get_value(widget, &val);
if (!sscanf(val,"%d",&xval)) if (!sscanf(val,"%d",&xval))
return GP_ERROR; return GP_ERROR;
C_PTP (ptp_nikon_changecameramode (&camera->pl->params, xval)); C_PTP (ptp_nikon_changecameramode (&camera->pl->params, xval));
params->controlmode = xval;
return GP_OK;
}
static int
_get_Nikon_ApplicationMode2(CONFIG_GET_ARGS) {
gp_widget_new (GP_WIDGET_TEXT, _(menu->label), widget);
gp_widget_set_name (*widget,menu->name);
gp_widget_set_value(*widget, "0");
return (GP_OK);
}
static int
_put_Nikon_ApplicationMode2(CONFIG_PUT_ARGS) {
PTPParams *params = &(camera->pl->params);
char* val;
unsigned int xval = 0;
if (!ptp_operation_issupported(&camera->pl->params, PTP_OC_NIKON_ChangeAp
plicationMode))
return GP_ERROR_NOT_SUPPORTED;
gp_widget_get_value(widget, &val);
if (!sscanf(val,"%d",&xval))
return GP_ERROR;
C_PTP (ptp_nikon_changeapplicationmode (&camera->pl->params, xval));
return GP_OK; return GP_OK;
} }
static int static int
_get_Canon_EOS_RemoteRelease(CONFIG_GET_ARGS) { _get_Canon_EOS_RemoteRelease(CONFIG_GET_ARGS) {
gp_widget_new (GP_WIDGET_RADIO, _(menu->label), widget); gp_widget_new (GP_WIDGET_RADIO, _(menu->label), widget);
gp_widget_set_name (*widget,menu->name); gp_widget_set_name (*widget,menu->name);
/* FIXME: remember state of release */ /* FIXME: remember state of release */
gp_widget_add_choice (*widget, _("None")); gp_widget_add_choice (*widget, _("None"));
skipping to change at line 7335 skipping to change at line 7516
PTPParams *params = &(camera->pl->params); PTPParams *params = &(camera->pl->params);
CR (gp_widget_get_value(widget, &val)); CR (gp_widget_get_value(widget, &val));
if (!sscanf (val, "%d", &mode)) if (!sscanf (val, "%d", &mode))
return GP_ERROR; return GP_ERROR;
C_PTP (ptp_canon_eos_setremotemode (params, mode)); C_PTP (ptp_canon_eos_setremotemode (params, mode));
return GP_OK; return GP_OK;
} }
static int static int
_get_Canon_EventMode(CONFIG_GET_ARGS) {
gp_widget_new (GP_WIDGET_TEXT, _(menu->label), widget);
gp_widget_set_name (*widget, menu->name);
return gp_widget_set_value (*widget, "0");
}
static int
_put_Canon_EventMode(CONFIG_PUT_ARGS) {
uint32_t mode;
char *val;
PTPParams *params = &(camera->pl->params);
CR (gp_widget_get_value(widget, &val));
if (!sscanf (val, "%d", &mode))
return GP_ERROR;
C_PTP (ptp_canon_eos_seteventmode (params, mode));
return GP_OK;
}
static int
_get_Canon_EOS_ViewFinder(CONFIG_GET_ARGS) { _get_Canon_EOS_ViewFinder(CONFIG_GET_ARGS) {
int val; int val;
PTPParams *params = &(camera->pl->params); PTPParams *params = &(camera->pl->params);
gp_widget_new (GP_WIDGET_TOGGLE, _(menu->label), widget); gp_widget_new (GP_WIDGET_TOGGLE, _(menu->label), widget);
gp_widget_set_name (*widget, menu->name); gp_widget_set_name (*widget, menu->name);
val = params->inliveview; /* try returning live view mode */ val = params->inliveview; /* try returning live view mode */
gp_widget_set_value (*widget, &val); gp_widget_set_value (*widget, &val);
return GP_OK; return GP_OK;
} }
skipping to change at line 7580 skipping to change at line 7781
/* FIXME: handle in data */ /* FIXME: handle in data */
ret = ptp_transaction (params, &ptp, PTP_DP_GETDATA, 0, &data, &size); ret = ptp_transaction (params, &ptp, PTP_DP_GETDATA, 0, &data, &size);
/* FIXME: handle out data (store locally?) */ /* FIXME: handle out data (store locally?) */
return translate_ptp_result (ret); return translate_ptp_result (ret);
} }
static int static int
_get_Canon_EOS_MovieModeSw(CONFIG_GET_ARGS) {
int val;
gp_widget_new (GP_WIDGET_TOGGLE, _(menu->label), widget);
gp_widget_set_name (*widget,menu->name);
val = 2; /* always changed */
gp_widget_set_value (*widget, &val);
return (GP_OK);
}
static int
_put_Canon_EOS_MovieModeSw(CONFIG_PUT_ARGS) {
int val;
PTPParams *params = &(camera->pl->params);
CR (gp_widget_get_value(widget, &val));
if(val)
C_PTP_MSG (ptp_generic_no_data(params, PTP_OC_CANON_EOS_MovieSele
ctSWOn, 0), "Failed to set MovieSetSelectSWOn");
else
C_PTP_MSG (ptp_generic_no_data(params, PTP_OC_CANON_EOS_MovieSele
ctSWOff, 0), "Failed to set MovieSetSelectSWOff");
return GP_OK;
}
static int
_get_Sony_Movie(CONFIG_GET_ARGS) { _get_Sony_Movie(CONFIG_GET_ARGS) {
int val; int val;
gp_widget_new (GP_WIDGET_TOGGLE, _(menu->label), widget); gp_widget_new (GP_WIDGET_TOGGLE, _(menu->label), widget);
gp_widget_set_name (*widget,menu->name); gp_widget_set_name (*widget,menu->name);
val = 2; /* always changed */ val = 2; /* always changed */
gp_widget_set_value (*widget, &val); gp_widget_set_value (*widget, &val);
return (GP_OK); return (GP_OK);
} }
skipping to change at line 7636 skipping to change at line 7861
CR (gp_widget_get_value(widget, &val)); CR (gp_widget_get_value(widget, &val));
if (val) if (val)
value.u16 = 2; value.u16 = 2;
else else
value.u16 = 1; value.u16 = 1;
C_PTP_REP (ptp_sony_qx_setdevicecontrolvalueb (params, PTP_DPC_SONY_QX_M ovie_Rec, &value, PTP_DTC_UINT16 )); C_PTP_REP (ptp_sony_qx_setdevicecontrolvalueb (params, PTP_DPC_SONY_QX_M ovie_Rec, &value, PTP_DTC_UINT16 ));
return GP_OK; return GP_OK;
} }
static int static int
_get_Nikon_MovieProhibitCondition(CONFIG_GET_ARGS) {
char buf[2000];
PTPPropertyValue value;
PTPParams *params = &(camera->pl->params);
gp_widget_new (GP_WIDGET_TEXT, _(menu->label), widget);
gp_widget_set_name (*widget,menu->name);
value.u32 = 0;
LOG_ON_PTP_E (ptp_getdevicepropvalue (params, PTP_DPC_NIKON_MovRecProhibi
tCondition, &value, PTP_DTC_UINT32));
if (value.u32) {
strcpy(buf,N_("Movie prohibit conditions: "));
#define X(bit,str) \
if (value.u32 & (1<<bit)) { \
value.u32 &= ~(1<<bit); \
strcat(buf, _(str)); \
if (value.u32) strcat(buf, ",");\
}
X(14,N_("Not in application mode"));
X(13,N_("Set liveview selector is enabled"));
X(12,N_("In enlarged liveview"));
X(12,N_("In enlarged liveview"));
X(11,N_("Card protected"));
X(10,N_("Already in movie recording"));
X( 9,N_("Images / movies not yet record in buffer"));
X( 3,N_("Card full"));
X( 2,N_("Card not formatted"));
X( 1,N_("Card error"));
X( 0,N_("No card"));
#undef X
if (value.u32) { sprintf(buf+strlen(buf),"unhandled bitmask %x",
value.u32); }
} else {
strcpy(buf,N_("No movie prohibit conditions"));
}
gp_widget_set_value (*widget, buf);
return GP_OK;
}
static int
_get_Nikon_LiveViewProhibitCondition(CONFIG_GET_ARGS) {
char buf[2000];
PTPPropertyValue value;
PTPParams *params = &(camera->pl->params);
gp_widget_new (GP_WIDGET_TEXT, _(menu->label), widget);
gp_widget_set_name (*widget,menu->name);
value.u32 = 0;
LOG_ON_PTP_E (ptp_getdevicepropvalue (params, PTP_DPC_NIKON_LiveViewProhi
bitCondition, &value, PTP_DTC_UINT32));
if (value.u32) {
strcpy(buf,N_("Movie prohibit conditions: "));
#define X(bit,str) \
if (value.u32 & (1<<bit)) { \
value.u32 &= ~(1<<bit); \
strcat(buf, _(str)); \
if (value.u32) strcat(buf, ",");\
}
X( 2,N_("Sequence error"));
X( 4,N_("Fully pressed button"));
X( 5,N_("Minimum aperture warning"));
X( 8,N_("Battery exhausted"));
X( 9,N_("TTL error"));
X(12,N_("Pending unretrieved SDRAM image"));
X(14,N_("Recording destination card, but no card or card protecte
d"));
X(15,N_("Processing of shooting operation"));
X(17,N_("Temperature too high"));
X(18,N_("Card protected"));
X(19,N_("Card error"));
X(20,N_("Card unformatted"));
X(21,N_("Bulb warning"));
X(22,N_("In Mirror-up operation"));
X(24,N_("Lens is retracting"));
X(31,N_("Exposure Program Mode is not P/A/S/M"));
#undef X
if (value.u32) { sprintf(buf+strlen(buf),"unhandled bitmask %x",
value.u32); }
} else {
strcpy(buf,N_("Liveview should not be prohibited"));
}
gp_widget_set_value (*widget, buf);
return GP_OK;
}
static int
_get_Nikon_Movie(CONFIG_GET_ARGS) { _get_Nikon_Movie(CONFIG_GET_ARGS) {
int val; int val;
gp_widget_new (GP_WIDGET_TOGGLE, _(menu->label), widget); gp_widget_new (GP_WIDGET_TOGGLE, _(menu->label), widget);
gp_widget_set_name (*widget,menu->name); gp_widget_set_name (*widget,menu->name);
val = 2; /* always changed */ val = 2; /* always changed */
gp_widget_set_value (*widget, &val); gp_widget_set_value (*widget, &val);
return (GP_OK); return (GP_OK);
} }
skipping to change at line 7664 skipping to change at line 7973
CR (gp_widget_get_value(widget, &val)); CR (gp_widget_get_value(widget, &val));
if (val) { if (val) {
if (have_prop(camera,PTP_VENDOR_NIKON,PTP_DPC_NIKON_ApplicationMo de)) { if (have_prop(camera,PTP_VENDOR_NIKON,PTP_DPC_NIKON_ApplicationMo de)) {
value.u8 = 0; value.u8 = 0;
C_PTP (ptp_getdevicepropvalue (params, PTP_DPC_NIKON_Appl icationMode, &value, PTP_DTC_UINT8)); C_PTP (ptp_getdevicepropvalue (params, PTP_DPC_NIKON_Appl icationMode, &value, PTP_DTC_UINT8));
if (value.u8 != 1) { if (value.u8 != 1) {
value.u8 = 1; value.u8 = 1;
C_PTP (ptp_setdevicepropvalue (params, PTP_DPC_NI KON_ApplicationMode, &value, PTP_DTC_UINT8)); C_PTP (ptp_setdevicepropvalue (params, PTP_DPC_NI KON_ApplicationMode, &value, PTP_DTC_UINT8));
} }
} }
if (ptp_operation_issupported(params, PTP_OC_NIKON_ChangeApplicat
ionMode)) {
C_PTP (ptp_nikon_changeapplicationmode (params, 1));
}
ret = ptp_getdevicepropvalue (params, PTP_DPC_NIKON_LiveViewStat us, &value, PTP_DTC_UINT8); ret = ptp_getdevicepropvalue (params, PTP_DPC_NIKON_LiveViewStat us, &value, PTP_DTC_UINT8);
if (ret != PTP_RC_OK) if (ret != PTP_RC_OK)
value.u8 = 0; value.u8 = 0;
if (!value.u8) { if (!value.u8) {
value.u8 = 1; value.u8 = 1;
LOG_ON_PTP_E (ptp_setdevicepropvalue (params, PTP_DPC_NI KON_RecordingMedia, &value, PTP_DTC_UINT8)); LOG_ON_PTP_E (ptp_setdevicepropvalue (params, PTP_DPC_NI KON_RecordingMedia, &value, PTP_DTC_UINT8));
C_PTP_REP_MSG (ptp_nikon_start_liveview (params), C_PTP_REP_MSG (ptp_nikon_start_liveview (params),
_("Nikon enable liveview failed")); _("Nikon enable liveview failed"));
skipping to change at line 7699 skipping to change at line 8011
if (value.u32 & (1<< 2)) { gp_context_error (cont ext, _("Movie recording cannot start: Card not formatted.")); return GP_ERROR; } if (value.u32 & (1<< 2)) { gp_context_error (cont ext, _("Movie recording cannot start: Card not formatted.")); return GP_ERROR; }
if (value.u32 & (1<< 1)) { gp_context_error (cont ext, _("Movie recording cannot start: Card error.")); return GP_ERROR; } if (value.u32 & (1<< 1)) { gp_context_error (cont ext, _("Movie recording cannot start: Card error.")); return GP_ERROR; }
if (value.u32 & (1<< 0)) { gp_context_error (cont ext, _("Movie recording cannot start: No card.")); return GP_ERROR; } if (value.u32 & (1<< 0)) { gp_context_error (cont ext, _("Movie recording cannot start: No card.")); return GP_ERROR; }
gp_context_error (context, _("Movie recording can not start: code 0x%08x"), value.u32); gp_context_error (context, _("Movie recording can not start: code 0x%08x"), value.u32);
return GP_ERROR; return GP_ERROR;
} }
} }
C_PTP_REP (ptp_nikon_startmovie (params)); C_PTP_REP (ptp_nikon_startmovie (params));
} else { } else {
unsigned int i, havec108 = 0;
C_PTP_REP (ptp_nikon_stopmovie (params)); C_PTP_REP (ptp_nikon_stopmovie (params));
for (i=0;i<params->deviceinfo.EventsSupported_len;i++)
if (params->deviceinfo.EventsSupported[i] == PTP_EC_Nikon
_MovieRecordComplete) {
havec108 = 1;
break;
}
/* takes 3 seconds for a 10 second movie on Z6 */
if (havec108) {
int tries = 100, found = 0;
do {
PTPContainer event;
ret = ptp_check_event (params);
if (ret != PTP_RC_OK)
break;
while (ptp_get_one_event_by_type (params, PTP_EC_
Nikon_MovieRecordComplete, &event)) {
GP_LOG_D ("Event: movie rec completed.");
found = 1;
break;
}
usleep(100*1000);
} while (!found && tries--);
}
/* switch Application Mode off again, otherwise we cannot get to the filesystem */ /* switch Application Mode off again, otherwise we cannot get to the filesystem */
if (have_prop(camera,PTP_VENDOR_NIKON,PTP_DPC_NIKON_ApplicationMo de)) { if (have_prop(camera,PTP_VENDOR_NIKON,PTP_DPC_NIKON_ApplicationMo de)) {
value.u8 = 1; value.u8 = 1;
C_PTP (ptp_getdevicepropvalue (params, PTP_DPC_NIKON_Appl icationMode, &value, PTP_DTC_UINT8)); C_PTP (ptp_getdevicepropvalue (params, PTP_DPC_NIKON_Appl icationMode, &value, PTP_DTC_UINT8));
if (value.u8 != 0) { if (value.u8 != 0) {
value.u8 = 0; value.u8 = 0;
C_PTP (ptp_setdevicepropvalue (params, PTP_DPC_NI KON_ApplicationMode, &value, PTP_DTC_UINT8)); C_PTP (ptp_setdevicepropvalue (params, PTP_DPC_NI KON_ApplicationMode, &value, PTP_DTC_UINT8));
} }
} }
if (ptp_operation_issupported(params, PTP_OC_NIKON_ChangeApplicat
ionMode)) {
C_PTP (ptp_nikon_changeapplicationmode (params, 0));
}
} }
return GP_OK; return GP_OK;
} }
static int static int
_get_Nikon_Bulb(CONFIG_GET_ARGS) { _get_Nikon_Bulb(CONFIG_GET_ARGS) {
int val; int val;
gp_widget_new (GP_WIDGET_TOGGLE, _(menu->label), widget); gp_widget_new (GP_WIDGET_TOGGLE, _(menu->label), widget);
gp_widget_set_name (*widget,menu->name); gp_widget_set_name (*widget,menu->name);
skipping to change at line 7921 skipping to change at line 8263
xpropval.u16 = 1; xpropval.u16 = 1;
C_PTP (ptp_sony_setdevicecontrolvalueb (params, PTP_DPC_SONY_Capt ure, &xpropval, PTP_DTC_UINT16)); C_PTP (ptp_sony_setdevicecontrolvalueb (params, PTP_DPC_SONY_Capt ure, &xpropval, PTP_DTC_UINT16));
xpropval.u16 = 1; xpropval.u16 = 1;
C_PTP (ptp_sony_setdevicecontrolvalueb (params, PTP_DPC_SONY_Auto Focus, &xpropval, PTP_DTC_UINT16)); C_PTP (ptp_sony_setdevicecontrolvalueb (params, PTP_DPC_SONY_Auto Focus, &xpropval, PTP_DTC_UINT16));
} }
return GP_OK; return GP_OK;
} }
static int static int
_get_Panasonic_Movie(CONFIG_GET_ARGS) {
int val;
gp_widget_new (GP_WIDGET_TOGGLE, _(menu->label), widget);
gp_widget_set_name (*widget,menu->name);
val = 2; /* always changed */
gp_widget_set_value (*widget, &val);
return GP_OK;
}
static int
_put_Panasonic_Movie(CONFIG_PUT_ARGS)
{
PTPParams *params = &(camera->pl->params);
int val;
CR (gp_widget_get_value(widget, &val));
if (val) {
C_PTP_MSG (ptp_panasonic_movierec (params, 1), "failed to start m
ovie capture");
return GP_OK;
} else {
C_PTP_MSG (ptp_panasonic_movierec (params, 0), "failed to stop mo
vie capture");
return GP_OK;
}
}
static int
_put_Panasonic_Shutter(CONFIG_PUT_ARGS) _put_Panasonic_Shutter(CONFIG_PUT_ARGS)
{ {
PTPParams *params = &(camera->pl->params); PTPParams *params = &(camera->pl->params);
char *xval; char *xval;
uint32_t val; uint32_t val;
float f; float f;
CR (gp_widget_get_value(widget, &xval)); CR (gp_widget_get_value(widget, &xval));
if(xval[0] == 'b' || xval[0] == 'B') { if(xval[0] == 'b' || xval[0] == 'B') {
val = 0xFFFFFFFF; val = 0xFFFFFFFF;
} else if(xval[1] == '/') { } else if(xval[1] == '/') {
sscanf (xval, "1/%f", &f); sscanf (xval, "1/%f", &f);
f *= 1000; f *= 1000;
val = (uint32_t) f; val = (uint32_t) f;
} else { } else {
sscanf (xval, "%f", &f); sscanf (xval, "%f", &f);
f *= 1000; f *= 1000;
val = (uint32_t) f; val = (uint32_t) f;
val |= 0x80000000; val |= 0x80000000;
} }
return translate_ptp_result (ptp_panasonic_setdeviceproperty(params, PTP_
//printf("setting shutterspeed to %lu (%s)\n", val, xval); DPC_PANASONIC_ShutterSpeed_Param, (unsigned char*)&val, 4));
return translate_ptp_result (ptp_panasonic_setdeviceproperty(params, 0x20
00031, (unsigned char*)&val, 4));
} }
static int static int
_get_Panasonic_Shutter(CONFIG_GET_ARGS) { _get_Panasonic_Shutter(CONFIG_GET_ARGS) {
uint32_t currentVal; uint32_t currentVal;
uint32_t listCount; uint32_t listCount;
uint32_t *list; uint32_t *list;
PTPParams *params = &(camera->pl->params); PTPParams *params = &(camera->pl->params);
GPContext *context = ((PTPData *) params->data)->context; GPContext *context = ((PTPData *) params->data)->context;
C_PTP_REP (ptp_panasonic_getdevicepropertydesc(params, 0x2000030, 4, &cur rentVal, &list, &listCount)); C_PTP_REP (ptp_panasonic_getdevicepropertydesc(params, PTP_DPC_PANASONIC_ ShutterSpeed, 4, &currentVal, &list, &listCount));
//printf("retrieved %lu property values\n", listCount); //printf("retrieved %lu property values\n", listCount);
gp_widget_new (GP_WIDGET_RADIO, _(menu->label), widget); gp_widget_new (GP_WIDGET_RADIO, _(menu->label), widget);
gp_widget_set_name (*widget, menu->name); gp_widget_set_name (*widget, menu->name);
uint32_t i; uint32_t i;
float f; float f;
char buf[16]; char buf[16];
for (i = 0; i < listCount; i++) { for (i = 0; i < listCount; i++) {
skipping to change at line 8036 skipping to change at line 8402
char *xval; char *xval;
unsigned int ival; unsigned int ival;
uint32_t val; uint32_t val;
CR (gp_widget_get_value(widget, &xval)); CR (gp_widget_get_value(widget, &xval));
sscanf (xval, "%d", &ival); sscanf (xval, "%d", &ival);
val = ival; val = ival;
//printf("setting ISO to %lu (%s)\n", val, xval); //printf("setting ISO to %lu (%s)\n", val, xval);
return translate_ptp_result (ptp_panasonic_setdeviceproperty(params, 0x20 00021, (unsigned char*)&val, 4)); return translate_ptp_result (ptp_panasonic_setdeviceproperty(params, PTP_ DPC_PANASONIC_ISO_Param, (unsigned char*)&val, 4));
} }
static int static int
_get_Panasonic_ISO(CONFIG_GET_ARGS) { _get_Panasonic_ISO(CONFIG_GET_ARGS) {
uint32_t currentVal; uint32_t currentVal;
uint32_t listCount; uint32_t listCount;
uint32_t *list; uint32_t *list;
uint16_t valsize; uint16_t valsize;
PTPParams *params = &(camera->pl->params); PTPParams *params = &(camera->pl->params);
GPContext *context = ((PTPData *) params->data)->context; GPContext *context = ((PTPData *) params->data)->context;
C_PTP_REP (ptp_panasonic_getdevicepropertydesc(params, 0x2000020, 4, &cur rentVal, &list, &listCount)); C_PTP_REP (ptp_panasonic_getdevicepropertydesc(params, PTP_DPC_PANASONIC_ ISO, 4, &currentVal, &list, &listCount));
//printf("retrieved %lu property values\n", listCount); //printf("retrieved %lu property values\n", listCount);
gp_widget_new (GP_WIDGET_RADIO, _(menu->label), widget); gp_widget_new (GP_WIDGET_RADIO, _(menu->label), widget);
gp_widget_set_name (*widget, menu->name); gp_widget_set_name (*widget, menu->name);
uint32_t i; uint32_t i;
char buf[16]; char buf[16];
for (i = 0; i < listCount; i++) { for (i = 0; i < listCount; i++) {
sprintf (buf, "%d", (unsigned int)list[i]); sprintf (buf, "%d", (unsigned int)list[i]);
gp_widget_add_choice (*widget, buf); gp_widget_add_choice (*widget, buf);
} }
ptp_panasonic_getdeviceproperty(params, 0x2000021, &valsize, &currentVal) ; ptp_panasonic_getdeviceproperty(params, PTP_DPC_PANASONIC_ISO_Param, &val size, &currentVal);
sprintf (buf, "%d", (unsigned int)currentVal); sprintf (buf, "%d", (unsigned int)currentVal);
gp_widget_set_value (*widget, buf); gp_widget_set_value (*widget, buf);
free(list); free(list);
return GP_OK; return GP_OK;
} }
static static
struct { struct {
char* str; char* str;
uint16_t val; uint16_t val;
} panasonic_wbtable[] = { } panasonic_wbtable[] = {
{ N_("Automatic"), 0x0002 }, { N_("Automatic"), 0x0002 },
{ N_("Daylight"), 0x0004 }, { N_("Daylight"), 0x0004 },
{ N_("Cloudy"), 32776 },
{ N_("Tungsten"), 0x0006 }, { N_("Tungsten"), 0x0006 },
{ N_("Flourescent"), 0x0005 },
{ N_("Flash"), 0x0007 }, { N_("Flash"), 0x0007 },
{ N_("Preset 1"), 32779 }, { N_("Cloudy"), 0x8008 },
{ N_("Preset 2"), 32780 }, { N_("White set"), 0x8009 },
{ N_("Preset 3"), 32781 }, { N_("Black White"), 0x800A },
{ N_("Preset 4"), 32782 }, { N_("Preset 1"), 0x800B },
{ N_("Shadow"), 32783 }, { N_("Preset 2"), 0x800C },
{ N_("Temperature 1"), 32784 }, { N_("Preset 3"), 0x800D },
{ N_("Temperature 2"), 32785 }, { N_("Preset 4"), 0x800E },
{ N_("Temperature 3"), 32786 }, { N_("Shadow"), 0x800F },
{ N_("Temperature 4"), 32787 }, { N_("Temperature 1"), 0x8010 },
{ N_("Automatic C"), 32788 }, { N_("Temperature 2"), 0x8011 },
{ N_("Temperature 3"), 0x8012 },
{ N_("Temperature 4"), 0x8013 },
{ N_("Automatic Cool"), 0x8014 },
{ N_("Automatic Warm"), 0x8015 },
}; };
static int static int
_put_Panasonic_Whitebalance(CONFIG_PUT_ARGS) _put_Panasonic_Whitebalance(CONFIG_PUT_ARGS)
{ {
PTPParams *params = &(camera->pl->params); PTPParams *params = &(camera->pl->params);
GPContext *context = ((PTPData *) params->data)->context; char *xval;
char *xval;
uint32_t val = 0; uint32_t val = 0;
/*
uint32_t currentVal; uint32_t currentVal;
uint32_t listCount; uint32_t listCount;
uint32_t *list; uint32_t *list;
int ival; */
unsigned int i; int ival;
unsigned int j;
CR (gp_widget_get_value(widget, &xval)); CR (gp_widget_get_value(widget, &xval));
C_PTP_REP (ptp_panasonic_getdevicepropertydesc(params, PTP_DPC_PANASONIC_ WhiteBalance, 2, &currentVal, &list, &listCount)); /* C_PTP_REP (ptp_panasonic_getdevicepropertydesc(params, PTP_DPC_PANASON IC_WhiteBalance, 2, &currentVal, &list, &listCount)); */
if (sscanf(xval,_("Unknown 0x%04x"), &ival)) if (sscanf(xval,_("Unknown 0x%04x"), &ival))
val = ival; val = ival;
for (j=0;j<sizeof(panasonic_wbtable)/sizeof(panasonic_wbtable[0]);j++) {
for (i = 0; i < listCount; i++) { if (!strcmp(xval,_(panasonic_wbtable[j].str))) {
unsigned int j; val = panasonic_wbtable[j].val;
break;
for (j=0;j<sizeof(panasonic_wbtable)/sizeof(panasonic_wbtable[0])
;j++) {
if (!strcmp(xval,_(panasonic_wbtable[j].str))) {
val = panasonic_wbtable[j].val;
break;
}
} }
} }
free(list); /* free(list); */
GP_LOG_D("setting whitebalance to 0x%04x", val); GP_LOG_D("setting whitebalance to 0x%04x", val);
return translate_ptp_result (ptp_panasonic_setdeviceproperty(params, PTP_ DPC_PANASONIC_WhiteBalance, (unsigned char*)&val, 2)); return translate_ptp_result (ptp_panasonic_setdeviceproperty(params, PTP_ DPC_PANASONIC_WhiteBalance, (unsigned char*)&val, 2));
} }
static int static int
_get_Panasonic_Whitebalance(CONFIG_GET_ARGS) { _get_Panasonic_Whitebalance(CONFIG_GET_ARGS) {
uint32_t currentVal; uint32_t currentVal;
uint32_t listCount; uint32_t listCount;
uint32_t *list; uint32_t *list;
uint32_t i,j; uint32_t i,j;
skipping to change at line 8220 skipping to change at line 8586
gp_widget_add_choice (*widget, buf); gp_widget_add_choice (*widget, buf);
} }
free(list); free(list);
sprintf (buf, "%f", (float)currentVal); sprintf (buf, "%f", (float)currentVal);
gp_widget_set_value (*widget, &buf); gp_widget_set_value (*widget, &buf);
return GP_OK; return GP_OK;
} }
static int static int
_put_Panasonic_LiveViewSize(CONFIG_PUT_ARGS)
{
PTPParams *params = &(camera->pl->params);
char *xval;
unsigned int height, width, freq, x;
PanasonicLiveViewSize liveviewsize;
CR (gp_widget_get_value(widget, &xval));
if (!sscanf(xval, "%dx%d %d %dHZ", &width, &height, &x, &freq))
return GP_ERROR;
liveviewsize.width = width;
liveviewsize.height = height;
liveviewsize.freq = freq;
liveviewsize.x = x;
return translate_ptp_result (ptp_panasonic_9415(params, &liveviewsize));
}
static int
_get_Panasonic_LiveViewSize(CONFIG_GET_ARGS) {
unsigned int i;
char buf[100];
PTPParams *params = &(camera->pl->params);
GPContext *context = ((PTPData *) params->data)->context;
PanasonicLiveViewSize liveviewsize, *liveviewsizes = NULL;
unsigned int nrofliveviewsizes = 0;
C_PTP_REP (ptp_panasonic_9414_0d800012(params, &liveviewsizes, &nroflivev
iewsizes));
gp_widget_new (GP_WIDGET_RADIO, _(menu->label), widget);
gp_widget_set_name (*widget, menu->name);
for (i = 0;i < nrofliveviewsizes; i++) {
sprintf(buf,"%dx%d %d %dHZ", liveviewsizes[i].width, liveviewsize
s[i].height, liveviewsizes[i].x, liveviewsizes[i].freq);
gp_widget_add_choice (*widget, buf);
}
free (liveviewsizes);
C_PTP_REP (ptp_panasonic_9414_0d800011(params, &liveviewsize));
sprintf(buf,"%dx%d %d %dHZ", liveviewsize.width, liveviewsize.height, liv
eviewsize.x, liveviewsize.freq);
gp_widget_set_value (*widget, buf);
return GP_OK;
}
static int
_put_Panasonic_FNumber(CONFIG_PUT_ARGS) _put_Panasonic_FNumber(CONFIG_PUT_ARGS)
{ {
PTPParams *params = &(camera->pl->params); PTPParams *params = &(camera->pl->params);
char *xval; char *xval;
uint32_t val; uint32_t val;
CR (gp_widget_get_value(widget, &xval)); CR (gp_widget_get_value(widget, &xval));
float f; float f;
sscanf (xval, "%f", &f); sscanf (xval, "%f", &f);
val = (uint32_t) (f*10); val = (uint32_t) (f*10);
skipping to change at line 8517 skipping to change at line 8927
} }
/* Also update it in the live Canon EOS camera. (Nikon and Canon Powersho t just use different opcodes.) */ /* Also update it in the live Canon EOS camera. (Nikon and Canon Powersho t just use different opcodes.) */
if ( (params->deviceinfo.VendorExtensionID == PTP_VENDOR_CANON) && if ( (params->deviceinfo.VendorExtensionID == PTP_VENDOR_CANON) &&
(ptp_operation_issupported(params, PTP_OC_CANON_EOS_RemoteRelease ) || (ptp_operation_issupported(params, PTP_OC_CANON_EOS_RemoteRelease ) ||
ptp_operation_issupported(params, PTP_OC_CANON_EOS_RemoteRelease On) ptp_operation_issupported(params, PTP_OC_CANON_EOS_RemoteRelease On)
) )
) )
CR (camera_canon_eos_update_capture_target( camera, context, -1 ) ); CR (camera_canon_eos_update_capture_target( camera, context, -1 ) );
if (params->deviceinfo.VendorExtensionID == PTP_VENDOR_PANASONIC) { if (params->deviceinfo.VendorExtensionID == PTP_VENDOR_PANASONIC) {
uint16_t target;
C_PTP (ptp_panasonic_getcapturetarget(params, &target));
if ((GP_OK != gp_setting_get("ptp2","capturetarget",buf)) || !str cmp(buf,"sdram")) if ((GP_OK != gp_setting_get("ptp2","capturetarget",buf)) || !str cmp(buf,"sdram"))
C_PTP (ptp_panasonic_setcapturetarget(params, 1)); C_PTP (ptp_panasonic_setcapturetarget(params, 1));
else else
C_PTP (ptp_panasonic_setcapturetarget(params, 0)); C_PTP (ptp_panasonic_setcapturetarget(params, 0));
} }
return GP_OK; return GP_OK;
} }
static struct deviceproptableu16 sony_capturetarget[] = { static struct deviceproptableu16 sony_capturetarget[] = {
{ "sdram", 0x0001, 0 }, { "sdram", 0x0001, 0 },
skipping to change at line 9204 skipping to change at line 9617
{ N_("Canon EOS Zoom Position"), "eoszoomposition", 0, PTP_VENDO R_CANON, PTP_OC_CANON_EOS_ZoomPosition, _get_Canon_EOS_ZoomPosition, _ put_Canon_EOS_ZoomPosition }, { N_("Canon EOS Zoom Position"), "eoszoomposition", 0, PTP_VENDO R_CANON, PTP_OC_CANON_EOS_ZoomPosition, _get_Canon_EOS_ZoomPosition, _ put_Canon_EOS_ZoomPosition },
{ N_("Canon EOS Viewfinder"), "viewfinder", 0, PTP_VENDO R_CANON, PTP_OC_CANON_EOS_GetViewFinderData, _get_Canon_EOS_ViewFinder, _ put_Canon_EOS_ViewFinder }, { N_("Canon EOS Viewfinder"), "viewfinder", 0, PTP_VENDO R_CANON, PTP_OC_CANON_EOS_GetViewFinderData, _get_Canon_EOS_ViewFinder, _ put_Canon_EOS_ViewFinder },
{ N_("Panasonic Viewfinder"), "viewfinder", 0, PTP_VENDO R_PANASONIC, 0, _ get_Panasonic_ViewFinder, _put_Panasonic_ViewFinder }, { N_("Panasonic Viewfinder"), "viewfinder", 0, PTP_VENDO R_PANASONIC, 0, _ get_Panasonic_ViewFinder, _put_Panasonic_ViewFinder },
{ N_("Nikon Viewfinder"), "viewfinder", 0, PTP_VENDO R_NIKON, PTP_OC_NIKON_StartLiveView, _get_Nikon_ViewFinder, _ put_Nikon_ViewFinder }, { N_("Nikon Viewfinder"), "viewfinder", 0, PTP_VENDO R_NIKON, PTP_OC_NIKON_StartLiveView, _get_Nikon_ViewFinder, _ put_Nikon_ViewFinder },
{ N_("Canon EOS Remote Release"), "eosremoterelease", 0, PTP_VENDO R_CANON, PTP_OC_CANON_EOS_RemoteReleaseOn, _get_Canon_EOS_RemoteRelease, _ put_Canon_EOS_RemoteRelease }, { N_("Canon EOS Remote Release"), "eosremoterelease", 0, PTP_VENDO R_CANON, PTP_OC_CANON_EOS_RemoteReleaseOn, _get_Canon_EOS_RemoteRelease, _ put_Canon_EOS_RemoteRelease },
{ N_("CHDK Script"), "chdk_script", 0, PTP_VENDO R_CANON, PTP_OC_CHDK, _get_Canon_CHDK_Script, _ put_Canon_CHDK_Script }, { N_("CHDK Script"), "chdk_script", 0, PTP_VENDO R_CANON, PTP_OC_CHDK, _get_Canon_CHDK_Script, _ put_Canon_CHDK_Script },
{ N_("Movie Capture"), "movie", 0, 0, PTP_OC_InitiateOpenCapture, _get_OpenCapture, _ put_OpenCapture }, { N_("Movie Capture"), "movie", 0, 0, PTP_OC_InitiateOpenCapture, _get_OpenCapture, _ put_OpenCapture },
{ N_("Movie Capture"), "movie", 0, PTP_VENDO R_NIKON, PTP_OC_NIKON_StartMovieRecInCard, _get_Nikon_Movie, _ put_Nikon_Movie }, { N_("Movie Capture"), "movie", 0, PTP_VENDO R_NIKON, PTP_OC_NIKON_StartMovieRecInCard, _get_Nikon_Movie, _ put_Nikon_Movie },
{ N_("Movie Capture"), "movie", 0, PTP_VENDO R_SONY, PTP_OC_SONY_SDIOConnect, _get_Sony_Movie, _ put_Sony_Movie }, { N_("Movie Capture"), "movie", 0, PTP_VENDO R_SONY, PTP_OC_SONY_SDIOConnect, _get_Sony_Movie, _ put_Sony_Movie },
{ N_("Movie Capture"), "movie", 0, PTP_VENDO R_SONY, PTP_OC_SONY_QX_Connect, _get_Sony_QX_Movie, _ put_Sony_QX_Movie }, { N_("Movie Capture"), "movie", 0, PTP_VENDO R_SONY, PTP_OC_SONY_QX_Connect, _get_Sony_QX_Movie, _ put_Sony_QX_Movie },
{ N_("Movie Capture"), "movie", 0, PTP_VENDO
R_PANASONIC,PTP_OC_PANASONIC_MovieRecControl, _get_Panasonic_Movie, _
put_Panasonic_Movie },
{ N_("Movie Mode"), "eosmoviemode", 0, PTP_VENDO
R_CANON, 0, _get_Canon_EOS_MovieModeSw, _
put_Canon_EOS_MovieModeSw },
{ N_("PTP Opcode"), "opcode", 0, 0, PTP_OC_GetDeviceInfo, _get_Generic_OPCode, _ put_Generic_OPCode }, { N_("PTP Opcode"), "opcode", 0, 0, PTP_OC_GetDeviceInfo, _get_Generic_OPCode, _ put_Generic_OPCode },
{ 0,0,0,0,0,0,0 }, { 0,0,0,0,0,0,0 },
}; };
static struct submenu camera_status_menu[] = { static struct submenu camera_status_menu[] = {
{ N_("Serial Number"), "serialnumber", 0, 0, PTP_OC_GetDev iceInfo, _get_PTP_Serial_STR, _put_None }, { N_("Serial Number"), "serialnumber", 0, 0, PTP_OC_GetDev iceInfo, _get_PTP_Serial_STR, _put_None },
{ N_("Camera Manufacturer"), "manufacturer", 0, 0, PTP_OC_GetDev iceInfo, _get_PTP_Manufacturer_STR, _put_None }, { N_("Camera Manufacturer"), "manufacturer", 0, 0, PTP_OC_GetDev iceInfo, _get_PTP_Manufacturer_STR, _put_None },
{ N_("Camera Model"), "cameramodel", 0, 0, PTP_OC_GetDev iceInfo, _get_PTP_Model_STR, _put_None }, { N_("Camera Model"), "cameramodel", 0, 0, PTP_OC_GetDev iceInfo, _get_PTP_Model_STR, _put_None },
{ N_("Device Version"), "deviceversion", 0, 0, PTP_OC_GetDev iceInfo, _get_PTP_DeviceVersion_STR, _put_None }, { N_("Device Version"), "deviceversion", 0, 0, PTP_OC_GetDev iceInfo, _get_PTP_DeviceVersion_STR, _put_None },
{ N_("Vendor Extension"), "vendorextension", 0, 0, PTP_OC_GetDev iceInfo, _get_PTP_VendorExtension_STR, _put_None }, { N_("Vendor Extension"), "vendorextension", 0, 0, PTP_OC_GetDev iceInfo, _get_PTP_VendorExtension_STR, _put_None },
skipping to change at line 9252 skipping to change at line 9667
{ N_("Focal Length Minimum"), "minfocallength", PTP_DPC_NIKON_FocalLe ngthMin, PTP_VENDOR_NIKON, PTP_DTC_UINT32, _get_Nikon_FocalLength, _put_None }, { N_("Focal Length Minimum"), "minfocallength", PTP_DPC_NIKON_FocalLe ngthMin, PTP_VENDOR_NIKON, PTP_DTC_UINT32, _get_Nikon_FocalLength, _put_None },
{ N_("Focal Length Maximum"), "maxfocallength", PTP_DPC_NIKON_FocalLe ngthMax, PTP_VENDOR_NIKON, PTP_DTC_UINT32, _get_Nikon_FocalLength, _put_None }, { N_("Focal Length Maximum"), "maxfocallength", PTP_DPC_NIKON_FocalLe ngthMax, PTP_VENDOR_NIKON, PTP_DTC_UINT32, _get_Nikon_FocalLength, _put_None },
{ N_("Maximum Aperture at Focal Length Minimum"), "apertureatminfocalleng th", PTP_DPC_NIKON_MaxApAtMinFocalLength, PTP_VENDOR_NIKON, PTP_DTC_UINT16, _get _Nikon_ApertureAtFocalLength, _put_None }, { N_("Maximum Aperture at Focal Length Minimum"), "apertureatminfocalleng th", PTP_DPC_NIKON_MaxApAtMinFocalLength, PTP_VENDOR_NIKON, PTP_DTC_UINT16, _get _Nikon_ApertureAtFocalLength, _put_None },
{ N_("Maximum Aperture at Focal Length Maximum"), "apertureatmaxfocalleng th", PTP_DPC_NIKON_MaxApAtMaxFocalLength, PTP_VENDOR_NIKON, PTP_DTC_UINT16, _get _Nikon_ApertureAtFocalLength, _put_None }, { N_("Maximum Aperture at Focal Length Maximum"), "apertureatmaxfocalleng th", PTP_DPC_NIKON_MaxApAtMaxFocalLength, PTP_VENDOR_NIKON, PTP_DTC_UINT16, _get _Nikon_ApertureAtFocalLength, _put_None },
{ N_("Low Light"), "lowlight", PTP_DPC_NIKON_Exposur eDisplayStatus, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_LowLight, _put_None }, { N_("Low Light"), "lowlight", PTP_DPC_NIKON_Exposur eDisplayStatus, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_LowLight, _put_None },
{ N_("Light Meter"), "lightmeter", PTP_DPC_NIKON_LightMe ter, PTP_VENDOR_NIKON, PTP_DTC_INT8, _get_Nikon_LightMeter, _put_None }, { N_("Light Meter"), "lightmeter", PTP_DPC_NIKON_LightMe ter, PTP_VENDOR_NIKON, PTP_DTC_INT8, _get_Nikon_LightMeter, _put_None },
{ N_("Light Meter"), "lightmeter", PTP_DPC_NIKON_Exposur eIndicateStatus, PTP_VENDOR_NIKON, PTP_DTC_INT8, _get_Range_INT8, _put_None }, { N_("Light Meter"), "lightmeter", PTP_DPC_NIKON_Exposur eIndicateStatus, PTP_VENDOR_NIKON, PTP_DTC_INT8, _get_Range_INT8, _put_None },
{ N_("AF Locked"), "aflocked", PTP_DPC_NIKON_AFLockS tatus, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_OnOff_UINT8, _put_None }, { N_("AF Locked"), "aflocked", PTP_DPC_NIKON_AFLockS tatus, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_OnOff_UINT8, _put_None },
{ N_("AE Locked"), "aelocked", PTP_DPC_NIKON_AELockS tatus, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_OnOff_UINT8, _put_None }, { N_("AE Locked"), "aelocked", PTP_DPC_NIKON_AELockS tatus, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_OnOff_UINT8, _put_None },
{ N_("FV Locked"), "fvlocked", PTP_DPC_NIKON_FVLockS tatus, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_OnOff_UINT8, _put_None }, { N_("FV Locked"), "fvlocked", PTP_DPC_NIKON_FVLockS tatus, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_OnOff_UINT8, _put_None },
{ N_("Movie Switch"), "eosmovieswitch", PTP_DPC_CANON_EOS_Fix
edMovie, PTP_VENDOR_CANON, PTP_DTC_UINT32, _get_INT,
_put_None },
{ N_("Movie Prohibit Condition"), "movieprohibit", PTP_DPC_NIKON_MovRecP
rohibitCondition, PTP_VENDOR_NIKON, PTP_DTC_UINT32, _get_Nikon_MovieProhibitC
ondition, _put_None },
{ N_("Liveview Prohibit Condition"), "liveviewprohibit", PTP_DPC_NIKON_Li
veViewProhibitCondition, PTP_VENDOR_NIKON, PTP_DTC_UINT32, _get_Nikon_LiveViewPr
ohibitCondition, _put_None },
{ 0,0,0,0,0,0,0 }, { 0,0,0,0,0,0,0 },
}; };
static struct submenu camera_settings_menu[] = { static struct submenu camera_settings_menu[] = {
{ N_("Camera Date and Time"), "datetimeutc", PTP_DPC_CANON_EOS _UTCTime, PTP_VENDOR_CANON, PTP_DTC_UINT32, _get_UINT32_as_time, _put_UINT32_as_time }, { N_("Camera Date and Time"), "datetimeutc", PTP_DPC_CANON_EOS _UTCTime, PTP_VENDOR_CANON, PTP_DTC_UINT32, _get_UINT32_as_time, _put_UINT32_as_time },
{ N_("Camera Date and Time"), "datetime", PTP_DPC_CANON_Uni xTime, PTP_VENDOR_CANON, PTP_DTC_UINT32, _get_UINT32_as_localtime, _put_UINT32_as_localtime }, { N_("Camera Date and Time"), "datetime", PTP_DPC_CANON_Uni xTime, PTP_VENDOR_CANON, PTP_DTC_UINT32, _get_UINT32_as_localtime, _put_UINT32_as_localtime },
{ N_("Camera Date and Time"), "datetime", PTP_DPC_CANON_EOS _CameraTime, PTP_VENDOR_CANON, PTP_DTC_UINT32, _get_UINT32_as_localtime, _put_UINT32_as_localtime }, { N_("Camera Date and Time"), "datetime", PTP_DPC_CANON_EOS _CameraTime, PTP_VENDOR_CANON, PTP_DTC_UINT32, _get_UINT32_as_localtime, _put_UINT32_as_localtime },
{ N_("Camera Date and Time"), "datetime", PTP_DPC_DateTime, 0, PTP_DTC_STR, _get_STR_as_time, _put_STR_as_time }, { N_("Camera Date and Time"), "datetime", PTP_DPC_DateTime, 0, PTP_DTC_STR, _get_STR_as_time, _put_STR_as_time },
{ N_("Camera Date and Time"), "datetime", PTP_DPC_SONY_QX_D ateTime, PTP_VENDOR_SONY, PTP_DTC_STR, _get_STR_as_time, _put_STR_as_time }, { N_("Camera Date and Time"), "datetime", PTP_DPC_SONY_QX_D ateTime, PTP_VENDOR_SONY, PTP_DTC_STR, _get_STR_as_time, _put_STR_as_time },
{ N_("Beep Mode"), "beep", PTP_DPC_CANON_Bee pMode, PTP_VENDOR_CANON, PTP_DTC_UINT8, _get_Canon_BeepMode, _put_Canon_BeepMode }, { N_("Beep Mode"), "beep", PTP_DPC_CANON_Bee pMode, PTP_VENDOR_CANON, PTP_DTC_UINT8, _get_Canon_BeepMode, _put_Canon_BeepMode },
skipping to change at line 9282 skipping to change at line 9700
{ N_("Camera Output"), "output", PTP_DPC_CANON_Cam eraOutput, PTP_VENDOR_CANON, PTP_DTC_UINT8, _get_Canon_CameraOutput, _put_Canon_CameraOutput }, { N_("Camera Output"), "output", PTP_DPC_CANON_Cam eraOutput, PTP_VENDOR_CANON, PTP_DTC_UINT8, _get_Canon_CameraOutput, _put_Canon_CameraOutput },
{ N_("Camera Output"), "output", PTP_DPC_CANON_EOS _EVFOutputDevice, PTP_VENDOR_CANON, PTP_DTC_UINT16, _get_Canon_EOS_CameraOutp ut, _put_Canon_EOS_CameraOutput }, { N_("Camera Output"), "output", PTP_DPC_CANON_EOS _EVFOutputDevice, PTP_VENDOR_CANON, PTP_DTC_UINT16, _get_Canon_EOS_CameraOutp ut, _put_Canon_EOS_CameraOutput },
{ N_("Recording Destination"), "movierecordtarget", PTP_DPC_CANON_EOS _EVFRecordStatus, PTP_VENDOR_CANON, PTP_DTC_UINT16, _get_Canon_EOS_EVFRecordT arget, _put_Canon_EOS_EVFRecordTarget }, { N_("Recording Destination"), "movierecordtarget", PTP_DPC_CANON_EOS _EVFRecordStatus, PTP_VENDOR_CANON, PTP_DTC_UINT16, _get_Canon_EOS_EVFRecordT arget, _put_Canon_EOS_EVFRecordTarget },
{ N_("EVF Mode"), "evfmode", PTP_DPC_CANON_EOS _EVFMode, PTP_VENDOR_CANON, PTP_DTC_UINT16, _get_Canon_EOS_EVFMode, _put_Canon_EOS_EVFMode }, { N_("EVF Mode"), "evfmode", PTP_DPC_CANON_EOS _EVFMode, PTP_VENDOR_CANON, PTP_DTC_UINT16, _get_Canon_EOS_EVFMode, _put_Canon_EOS_EVFMode },
{ N_("Owner Name"), "ownername", PTP_DPC_CANON_Cam eraOwner, PTP_VENDOR_CANON, PTP_DTC_AUINT8, _get_AUINT8_as_CHAR_ARRAY , _put_AUINT8_as_CHAR_ARRAY }, { N_("Owner Name"), "ownername", PTP_DPC_CANON_Cam eraOwner, PTP_VENDOR_CANON, PTP_DTC_AUINT8, _get_AUINT8_as_CHAR_ARRAY , _put_AUINT8_as_CHAR_ARRAY },
{ N_("Owner Name"), "ownername", PTP_DPC_CANON_EOS _Owner, PTP_VENDOR_CANON, PTP_DTC_STR, _get_STR, _put_STR }, { N_("Owner Name"), "ownername", PTP_DPC_CANON_EOS _Owner, PTP_VENDOR_CANON, PTP_DTC_STR, _get_STR, _put_STR },
{ N_("Artist"), "artist", PTP_DPC_CANON_EOS _Artist, PTP_VENDOR_CANON, PTP_DTC_STR, _get_STR, _put_STR }, { N_("Artist"), "artist", PTP_DPC_CANON_EOS _Artist, PTP_VENDOR_CANON, PTP_DTC_STR, _get_STR, _put_STR },
{ N_("Artist"), "artist", PTP_DPC_NIKON_Art istName, PTP_VENDOR_NIKON, PTP_DTC_STR, _get_STR, _put_STR }, { N_("Artist"), "artist", PTP_DPC_NIKON_Art istName, PTP_VENDOR_NIKON, PTP_DTC_STR, _get_STR, _put_STR },
{ N_("CCD Number"), "ccdnumber", PTP_DPC_NIKON_CCD Number, PTP_VENDOR_NIKON, PTP_DTC_STR, _get_STR, _put_None }, { N_("CCD Number"), "ccdnumber", PTP_DPC_NIKON_CCD Number, PTP_VENDOR_NIKON, PTP_DTC_STR, _get_STR, _put_None },
{ N_("Copyright"), "copyright", PTP_DPC_CANON_EOS _Copyright, PTP_VENDOR_CANON, PTP_DTC_STR, _get_STR, _put_STR }, { N_("Copyright"), "copyright", PTP_DPC_CANON_EOS _Copyright, PTP_VENDOR_CANON, PTP_DTC_STR, _get_STR, _put_STR },
{ N_("Nickname"), "nickname", PTP_DPC_CANON_EOS _CameraNickname, PTP_VENDOR_CANON, PTP_DTC_STR, _get_STR, _put_STR },
{ N_("Copyright"), "copyright", PTP_DPC_FUJI_Copy right, PTP_VENDOR_FUJI, PTP_DTC_STR, _get_STR, _put_STR }, { N_("Copyright"), "copyright", PTP_DPC_FUJI_Copy right, PTP_VENDOR_FUJI, PTP_DTC_STR, _get_STR, _put_STR },
{ N_("Copyright"), "copyright", PTP_DPC_NIKON_Cop yrightInfo, PTP_VENDOR_NIKON, PTP_DTC_STR, _get_STR, _put_STR }, { N_("Copyright"), "copyright", PTP_DPC_NIKON_Cop yrightInfo, PTP_VENDOR_NIKON, PTP_DTC_STR, _get_STR, _put_STR },
{ N_("Clean Sensor"), "cleansensor", PTP_DPC_NIKON_Cle anImageSensor, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_CleanSensor, _put_Nikon_CleanSensor }, { N_("Clean Sensor"), "cleansensor", PTP_DPC_NIKON_Cle anImageSensor, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_CleanSensor, _put_Nikon_CleanSensor },
{ N_("Flicker Reduction"), "flickerreduction", PTP_DPC_NIKON_Fli ckerReduction, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_FlickerReducti on, _put_Nikon_FlickerReduction }, { N_("Flicker Reduction"), "flickerreduction", PTP_DPC_NIKON_Fli ckerReduction, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_FlickerReducti on, _put_Nikon_FlickerReduction },
{ N_("Custom Functions Ex"), "customfuncex", PTP_DPC_CANON_EOS _CustomFuncEx, PTP_VENDOR_CANON, PTP_DTC_STR, _get_STR, _put_STR }, { N_("Custom Functions Ex"), "customfuncex", PTP_DPC_CANON_EOS _CustomFuncEx, PTP_VENDOR_CANON, PTP_DTC_STR, _get_STR, _put_STR },
{ N_("Focus Info"), "focusinfo", PTP_DPC_CANON_EOS _FocusInfoEx, PTP_VENDOR_CANON, PTP_DTC_STR, _get_STR, _put_None }, { N_("Focus Info"), "focusinfo", PTP_DPC_CANON_EOS _FocusInfoEx, PTP_VENDOR_CANON, PTP_DTC_STR, _get_STR, _put_None },
{ N_("Focus Area"), "focusarea", PTP_DPC_CANON_EOS _AFSelectFocusArea,PTP_VENDOR_CANON, PTP_DTC_UINT32, _get_INT, _put_INT }, { N_("Focus Area"), "focusarea", PTP_DPC_CANON_EOS _AFSelectFocusArea,PTP_VENDOR_CANON, PTP_DTC_UINT32, _get_INT, _put_INT },
{ N_("Auto Power Off"), "autopoweroff", PTP_DPC_CANON_EOS { N_("Strobo Firing"), "strobofiring", PTP_DPC_CANON_EOS
_AutoPowerOff, PTP_VENDOR_CANON, PTP_DTC_UINT16, _get_INT, _StroboFiring, PTP_VENDOR_CANON, PTP_DTC_UINT32, _get_INT,
_put_INT }, _put_None },
{ N_("Flash Charging State"), "flashcharged", PTP_DPC_CANON_EOS
_FlashChargingState,PTP_VENDOR_CANON, PTP_DTC_UINT32, _get_INT,
_put_None },
{ N_("One Shot Raw On"), "oneshotrawon", PTP_DPC_CANON_EOS
_OneShotRawOn, PTP_VENDOR_CANON, PTP_DTC_UINT32, _get_INT,
_put_None },
{ N_("Auto Power Off"), "autopoweroff", PTP_DPC_CANON_EOS
_AutoPowerOff, PTP_VENDOR_CANON, PTP_DTC_UINT32, _get_INT,
_put_INT },
{ N_("Depth of Field"), "depthoffield", PTP_DPC_CANON_EOS _DepthOfFieldPreview, PTP_VENDOR_CANON,PTP_DTC_UINT32, _get_INT, _put_INT }, { N_("Depth of Field"), "depthoffield", PTP_DPC_CANON_EOS _DepthOfFieldPreview, PTP_VENDOR_CANON,PTP_DTC_UINT32, _get_INT, _put_INT },
{ N_("Menus and Playback"), "menusandplayback", PTP_DPC_NIKON_Men usAndPlayback, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_MenusAndPlayba ck, _put_Nikon_MenusAndPlayback }, { N_("Menus and Playback"), "menusandplayback", PTP_DPC_NIKON_Men usAndPlayback, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_MenusAndPlayba ck, _put_Nikon_MenusAndPlayback },
{ N_("External Recording Control"), "externalrecordingcontrol", PTP_D PC_NIKON_ExternalRecordingControl, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_ Nikon_OffOn_UINT8, _put_Nikon_OffOn_UINT8 }, { N_("External Recording Control"), "externalrecordingcontrol", PTP_D PC_NIKON_ExternalRecordingControl, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_ Nikon_OffOn_UINT8, _put_Nikon_OffOn_UINT8 },
{ N_("Camera Action"), "cameraaction", 0xd208, PTP_VENDOR_FUJI, PTP_DTC_UINT16, _get_Fuji_Action, _put_Fuji_Action }, { N_("Camera Action"), "cameraaction", 0xd208, PTP_VENDOR_FUJI, PTP_DTC_UINT16, _get_Fuji_Action, _put_Fuji_Action },
/* virtual */ /* virtual */
{ N_("Thumb Size"), "thumbsize", 0, PTP_VENDOR_NIKON, 0 , _get_Nikon_Thumbsize, _put_Nikon_Thumbsize }, { N_("Thumb Size"), "thumbsize", 0, PTP_VENDOR_NIKON, 0 , _get_Nikon_Thumbsize, _put_Nikon_Thumbsize },
{ N_("Fast Filesystem"), "fastfs", 0, PTP_VENDOR_NIKON, 0 , _get_Nikon_FastFS, _put_Nikon_FastFS }, { N_("Fast Filesystem"), "fastfs", 0, PTP_VENDOR_NIKON, 0 , _get_Nikon_FastFS, _put_Nikon_FastFS },
{ N_("Capture Target"), "capturetarget",0, PTP_VENDOR_NIKON, 0 , _get_CaptureTarget, _put_CaptureTarget }, { N_("Capture Target"), "capturetarget",0, PTP_VENDOR_NIKON, 0 , _get_CaptureTarget, _put_CaptureTarget },
{ N_("Autofocus"), "autofocus", 0, PTP_VENDOR_NIKON, 0 , _get_Autofocus, _put_Autofocus }, { N_("Autofocus"), "autofocus", 0, PTP_VENDOR_NIKON, 0 , _get_Autofocus, _put_Autofocus },
{ N_("Capture Target"), "capturetarget",0, PTP_VENDOR_CANON, 0 , _get_CaptureTarget, _put_CaptureTarget }, { N_("Capture Target"), "capturetarget",0, PTP_VENDOR_CANON, 0 , _get_CaptureTarget, _put_CaptureTarget },
{ N_("Capture Target"), "capturetarget",0, PTP_VENDOR_PANASONIC, 0, _get_CaptureTarget, _put_CaptureTarget }, { N_("Capture Target"), "capturetarget",0, PTP_VENDOR_PANASONIC, 0, _get_CaptureTarget, _put_CaptureTarget },
{ N_("Capture Target"), "capturetarget",PTP_DPC_SONY_StillImageSt oreDestination, PTP_VENDOR_SONY,0, _get_Sony_CaptureTarget, _put_Sony_Captu reTarget }, { N_("Capture Target"), "capturetarget",PTP_DPC_SONY_StillImageSt oreDestination, PTP_VENDOR_SONY,0, _get_Sony_CaptureTarget, _put_Sony_Captu reTarget },
{ N_("CHDK"), "chdk", PTP_OC_CHDK, PTP_VENDOR_ CANON, 0, _get_CHDK, _put_CHDK }, { N_("CHDK"), "chdk", PTP_OC_CHDK, PTP_VENDOR_ CANON, 0, _get_CHDK, _put_CHDK },
{ N_("Capture"), "capture", 0, PTP_VENDOR_CANON, 0 , _get_Canon_CaptureMode, _put_Canon_CaptureMode }, { N_("Capture"), "capture", 0, PTP_VENDOR_CANON, 0 , _get_Canon_CaptureMode, _put_Canon_CaptureMode },
{ N_("Remote Mode"), "remotemode", PTP_OC_CANON_EOS_SetRemot eMode, PTP_VENDOR_CANON, 0, _get_Canon_RemoteMode, _put_Canon_RemoteMode }, { N_("Remote Mode"), "remotemode", PTP_OC_CANON_EOS_SetRemot eMode, PTP_VENDOR_CANON, 0, _get_Canon_RemoteMode, _put_Canon_RemoteMode },
{ N_("Event Mode"), "eventmode", PTP_OC_CANON_EOS_SetEvent Mode, PTP_VENDOR_CANON, 0, _get_Canon_EventMode, _put_Canon_EventMode },
{ 0,0,0,0,0,0,0 }, { 0,0,0,0,0,0,0 },
}; };
/* think of this as properties of the "film" */ /* think of this as properties of the "film" */
static struct submenu image_settings_menu[] = { static struct submenu image_settings_menu[] = {
{ N_("Image Quality"), "imagequality", PTP_DPC_CANON_Ima geQuality, PTP_VENDOR_CANON, PTP_DTC_UINT8, _get_Canon_Quality, _put_Canon_Quality }, { N_("Image Quality"), "imagequality", PTP_DPC_CANON_Ima geQuality, PTP_VENDOR_CANON, PTP_DTC_UINT8, _get_Canon_Quality, _put_Canon_Quality },
{ N_("Image Format"), "imageformat", PTP_DPC_OLYMPUS_I mageFormat, PTP_VENDOR_GP_OLYMPUS_OMD, PTP_DTC_UINT16, _get_Olympu s_Imageformat, _put_Olympus_Imageformat }, { N_("Image Format"), "imageformat", PTP_DPC_OLYMPUS_I mageFormat, PTP_VENDOR_GP_OLYMPUS_OMD, PTP_DTC_UINT16, _get_Olympu s_Imageformat, _put_Olympus_Imageformat },
{ N_("Image Format"), "imageformat", PTP_DPC_CANON_Ful lViewFileFormat, PTP_VENDOR_CANON, PTP_DTC_UINT8, _get_Canon_Capture_Fo rmat, _put_Canon_Capture_Format }, { N_("Image Format"), "imageformat", PTP_DPC_CANON_Ful lViewFileFormat, PTP_VENDOR_CANON, PTP_DTC_UINT8, _get_Canon_Capture_Fo rmat, _put_Canon_Capture_Format },
{ N_("Image Format"), "imageformat", PTP_DPC_CANON_EOS _ImageFormat, PTP_VENDOR_CANON, PTP_DTC_UINT16, _get_Canon_EOS_ImageF ormat, _put_Canon_EOS_ImageFormat }, { N_("Image Format"), "imageformat", PTP_DPC_CANON_EOS _ImageFormat, PTP_VENDOR_CANON, PTP_DTC_UINT16, _get_Canon_EOS_ImageF ormat, _put_Canon_EOS_ImageFormat },
{ N_("Image Format SD"), "imageformatsd", PTP_DPC_CANON_EOS _ImageFormatSD, PTP_VENDOR_CANON, PTP_DTC_UINT16, _get_Canon_EOS_ImageF ormat, _put_Canon_EOS_ImageFormat }, { N_("Image Format SD"), "imageformatsd", PTP_DPC_CANON_EOS _ImageFormatSD, PTP_VENDOR_CANON, PTP_DTC_UINT16, _get_Canon_EOS_ImageF ormat, _put_Canon_EOS_ImageFormat },
skipping to change at line 9413 skipping to change at line 9836
{ N_("Flash Command Self Compensation"), "flashcommandselfcompensation", PTP_DPC_NIKON_FlashCommandSelfCompensation, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _ge t_Nikon_FlashCommandXCompensation, _put_Nikon_FlashCommandXCompensation }, { N_("Flash Command Self Compensation"), "flashcommandselfcompensation", PTP_DPC_NIKON_FlashCommandSelfCompensation, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _ge t_Nikon_FlashCommandXCompensation, _put_Nikon_FlashCommandXCompensation },
{ N_("Flash Command Self Value"), "flashcommandselfvalue", PTP_D PC_NIKON_FlashCommandSelfValue, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_FlashCommandXValue, _put_Nikon_FlashCommandXValue }, { N_("Flash Command Self Value"), "flashcommandselfvalue", PTP_D PC_NIKON_FlashCommandSelfValue, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_FlashCommandXValue, _put_Nikon_FlashCommandXValue },
{ N_("Flash Command A Mode"), "flashcommandamode", PTP_D PC_NIKON_FlashCommandAMode, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_FlashCommandXMode, _put_Nikon_FlashCommandXMode }, { N_("Flash Command A Mode"), "flashcommandamode", PTP_D PC_NIKON_FlashCommandAMode, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_FlashCommandXMode, _put_Nikon_FlashCommandXMode },
{ N_("Flash Command A Compensation"), "flashcommandacompensation", PTP_ DPC_NIKON_FlashCommandACompensation, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_FlashCommandXCompensation, _put_Nikon_FlashCommandXCompensation }, { N_("Flash Command A Compensation"), "flashcommandacompensation", PTP_ DPC_NIKON_FlashCommandACompensation, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_FlashCommandXCompensation, _put_Nikon_FlashCommandXCompensation },
{ N_("Flash Command A Value"), "flashcommandavalue", PTP_D PC_NIKON_FlashCommandAValue, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_FlashCommandXValue, _put_Nikon_FlashCommandXValue }, { N_("Flash Command A Value"), "flashcommandavalue", PTP_D PC_NIKON_FlashCommandAValue, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_FlashCommandXValue, _put_Nikon_FlashCommandXValue },
{ N_("Flash Command B Mode"), "flashcommandbmode", PTP_D PC_NIKON_FlashCommandBMode, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_FlashCommandXMode, _put_Nikon_FlashCommandXMode }, { N_("Flash Command B Mode"), "flashcommandbmode", PTP_D PC_NIKON_FlashCommandBMode, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_FlashCommandXMode, _put_Nikon_FlashCommandXMode },
{ N_("Flash Command B Compensation"), "flashcommandbcompensation", PTP_ DPC_NIKON_FlashCommandBCompensation, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_FlashCommandXCompensation, _put_Nikon_FlashCommandXCompensation }, { N_("Flash Command B Compensation"), "flashcommandbcompensation", PTP_ DPC_NIKON_FlashCommandBCompensation, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_FlashCommandXCompensation, _put_Nikon_FlashCommandXCompensation },
{ N_("Flash Command B Value"), "flashcommandbvalue", PTP_D PC_NIKON_FlashCommandBValue, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_FlashCommandXValue, _put_Nikon_FlashCommandXValue }, { N_("Flash Command B Value"), "flashcommandbvalue", PTP_D PC_NIKON_FlashCommandBValue, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_FlashCommandXValue, _put_Nikon_FlashCommandXValue },
{ N_("AF Area Illumination"), "af-area-illumination", PTP_D PC_NIKON_AFAreaIllumination, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_AFAreaIllum, _put_Nikon_AFAreaIllum }, { N_("AF Area Illumination"), "af-area-illumination", PTP_D PC_NIKON_AFAreaIllumination, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_AFAreaIllum, _put_Nikon_AFAreaIllum },
{ N_("AF Beep Mode"), "afbeep", PTP_D PC_NIKON_BeepOff, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_OffOn_UINT8, _put_Nikon_OffOn_UINT8 }, { N_("AF Beep Mode"), "afbeep", PTP_D PC_NIKON_BeepOff, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_OffOn_UINT8, _put_Nikon_OffOn_UINT8 },
{ N_("F-Number"), "f-number", PTP_D { N_("F-Number"), "f-number", PTP_D
PC_FNumber, PTP_VENDOR_SONY, PTP_DTC_UINT16, _get_FNum PC_FNumber, PTP_VENDOR_SONY, PTP_DTC_UINT16, _get_Sony
ber, _put_Sony_FNumber }, _FNumber, _put_Sony_FNumber },
{ N_("F-Number"), "f-number", PTP_D { N_("F-Number"), "f-number", PTP_D
PC_SONY_QX_Aperture, PTP_VENDOR_SONY, PTP_DTC_UINT16, _get_FNum PC_SONY_QX_Aperture, PTP_VENDOR_SONY, PTP_DTC_UINT16, _get_FNum
ber, _put_Sony_QX_FNumber }, ber, _put_FNumber },
{ N_("F-Number"), "f-number", PTP_D PC_FNumber, 0, PTP_DTC_UINT16, _get_FNum ber, _put_FNumber }, { N_("F-Number"), "f-number", PTP_D PC_FNumber, 0, PTP_DTC_UINT16, _get_FNum ber, _put_FNumber },
{ N_("F-Number"), "f-number", 0, PTP_VENDOR_PANASONIC,PTP_DTC_INT32, _get_Pana sonic_FNumber, _put_Panasonic_FNumber }, { N_("F-Number"), "f-number", 0, PTP_VENDOR_PANASONIC,PTP_DTC_INT32, _get_Pana sonic_FNumber, _put_Panasonic_FNumber },
{ N_("Live View Size"), "liveviewsize", 0, PTP_VENDOR_PANASONIC,PTP_DTC_INT32, _get_Pana sonic_LiveViewSize, _put_Panasonic_LiveViewSize },
{ N_("Movie F-Number"), "movief-number", PTP_D PC_NIKON_MovieFNumber, PTP_VENDOR_NIKON, PTP_DTC_UINT16, _get_FNum ber, _put_FNumber }, { N_("Movie F-Number"), "movief-number", PTP_D PC_NIKON_MovieFNumber, PTP_VENDOR_NIKON, PTP_DTC_UINT16, _get_FNum ber, _put_FNumber },
{ N_("Flexible Program"), "flexibleprogram", PTP_D PC_NIKON_FlexibleProgram, PTP_VENDOR_NIKON, PTP_DTC_INT8, _get_Rang e_INT8, _put_Range_INT8 }, { N_("Flexible Program"), "flexibleprogram", PTP_D PC_NIKON_FlexibleProgram, PTP_VENDOR_NIKON, PTP_DTC_INT8, _get_Rang e_INT8, _put_Range_INT8 },
{ N_("Image Quality"), "imagequality", PTP_D PC_CompressionSetting, PTP_VENDOR_SONY, PTP_DTC_UINT8, _get_Comp ressionSetting, _put_Sony_CompressionSetting }, { N_("Image Quality"), "imagequality", PTP_D PC_CompressionSetting, PTP_VENDOR_SONY, PTP_DTC_UINT8, _get_Comp ressionSetting, _put_Sony_CompressionSetting },
{ N_("Image Quality"), "imagequality", PTP_D PC_CompressionSetting, 0, PTP_DTC_UINT8, _get_Comp ressionSetting, _put_CompressionSetting }, { N_("Image Quality"), "imagequality", PTP_D PC_CompressionSetting, 0, PTP_DTC_UINT8, _get_Comp ressionSetting, _put_CompressionSetting },
{ N_("Focus Distance"), "focusdistance", PTP_D PC_FocusDistance, 0, PTP_DTC_UINT16, _get_Focu sDistance, _put_FocusDistance }, { N_("Focus Distance"), "focusdistance", PTP_D PC_FocusDistance, 0, PTP_DTC_UINT16, _get_Focu sDistance, _put_FocusDistance },
{ N_("Focal Length"), "focallength", PTP_D PC_FocalLength, 0, PTP_DTC_UINT32, _get_Foca lLength, _put_FocalLength }, { N_("Focal Length"), "focallength", PTP_D PC_FocalLength, 0, PTP_DTC_UINT32, _get_Foca lLength, _put_FocalLength },
{ N_("Focus Mode"), "focusmode", PTP_D PC_FocusMode, PTP_VENDOR_SONY, PTP_DTC_UINT16, _get_Focu sMode, _put_Sony_FocusMode }, { N_("Focus Mode"), "focusmode", PTP_D PC_FocusMode, PTP_VENDOR_SONY, PTP_DTC_UINT16, _get_Focu sMode, _put_Sony_FocusMode },
{ N_("Focus Mode"), "focusmode", PTP_D PC_FocusMode, 0, PTP_DTC_UINT16, _get_Focu sMode, _put_FocusMode }, { N_("Focus Mode"), "focusmode", PTP_D PC_FocusMode, 0, PTP_DTC_UINT16, _get_Focu sMode, _put_FocusMode },
{ N_("Focus Mode"), "focusmode", PTP_D PC_OLYMPUS_FocusMode, PTP_VENDOR_GP_OLYMPUS_OMD, PTP_DTC_UINT16, _ get_FocusMode, _put_FocusMode }, { N_("Focus Mode"), "focusmode", PTP_D PC_OLYMPUS_FocusMode, PTP_VENDOR_GP_OLYMPUS_OMD, PTP_DTC_UINT16, _ get_FocusMode, _put_FocusMode },
/* Nikon DSLR have both PTP focus mode and Nikon specific focus mode */ /* Nikon DSLR have both PTP focus mode and Nikon specific focus mode */
skipping to change at line 9447 skipping to change at line 9871
{ N_("Aspect Ratio"), "aspectratio", PTP_D PC_CANON_EOS_MultiAspect, PTP_VENDOR_CANON, PTP_DTC_UINT32, _get_Can on_EOS_AspectRatio, _put_Canon_EOS_AspectRatio }, { N_("Aspect Ratio"), "aspectratio", PTP_D PC_CANON_EOS_MultiAspect, PTP_VENDOR_CANON, PTP_DTC_UINT32, _get_Can on_EOS_AspectRatio, _put_Canon_EOS_AspectRatio },
{ N_("Storage Device"), "storageid", PTP_D PC_CANON_EOS_CurrentStorage, PTP_VENDOR_CANON, PTP_DTC_UINT32, _get_Can on_EOS_StorageID , _put_Canon_EOS_StorageID }, { N_("Storage Device"), "storageid", PTP_D PC_CANON_EOS_CurrentStorage, PTP_VENDOR_CANON, PTP_DTC_UINT32, _get_Can on_EOS_StorageID , _put_Canon_EOS_StorageID },
{ N_("High ISO Noise Reduction"), "highisonr", PTP_D PC_CANON_EOS_HighISOSettingNoiseReduction, PTP_VENDOR_CANON, PTP_DTC_UINT16, _ge t_Canon_EOS_HighIsoNr, _put_Canon_EOS_HighIsoNr }, { N_("High ISO Noise Reduction"), "highisonr", PTP_D PC_CANON_EOS_HighISOSettingNoiseReduction, PTP_VENDOR_CANON, PTP_DTC_UINT16, _ge t_Canon_EOS_HighIsoNr, _put_Canon_EOS_HighIsoNr },
{ N_("HDR Mode"), "hdrmode", PTP_D PC_NIKON_HDRMode, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_OnOff_UINT8, _put_Nikon_OnOff_UINT8 }, { N_("HDR Mode"), "hdrmode", PTP_D PC_NIKON_HDRMode, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_OnOff_UINT8, _put_Nikon_OnOff_UINT8 },
{ N_("HDR High Dynamic"), "hdrhighdynamic", PTP_D PC_NIKON_HDRHighDynamic, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_HDRHighDynamic, _put_Nikon_HDRHighDynamic }, { N_("HDR High Dynamic"), "hdrhighdynamic", PTP_D PC_NIKON_HDRHighDynamic, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_HDRHighDynamic, _put_Nikon_HDRHighDynamic },
{ N_("HDR Smoothing"), "hdrsmoothing", PTP_D PC_NIKON_HDRSmoothing, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_HDRSmoothing, _put_Nikon_HDRSmoothing }, { N_("HDR Smoothing"), "hdrsmoothing", PTP_D PC_NIKON_HDRSmoothing, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_HDRSmoothing, _put_Nikon_HDRSmoothing },
{ N_("Still Capture Mode"), "capturemode", PTP_D PC_StillCaptureMode, 0, PTP_DTC_UINT16, _get_Capt ureMode, _put_CaptureMode }, { N_("Still Capture Mode"), "capturemode", PTP_D PC_StillCaptureMode, 0, PTP_DTC_UINT16, _get_Capt ureMode, _put_CaptureMode },
{ N_("Still Capture Mode"), "capturemode", PTP_D PC_FUJI_ReleaseMode, PTP_VENDOR_FUJI, PTP_DTC_UINT16, _get_Fuji _ReleaseMode, _put_Fuji_ReleaseMode }, { N_("Still Capture Mode"), "capturemode", PTP_D PC_FUJI_ReleaseMode, PTP_VENDOR_FUJI, PTP_DTC_UINT16, _get_Fuji _ReleaseMode, _put_Fuji_ReleaseMode },
{ N_("Canon Shooting Mode"), "shootingmode", PTP_D PC_CANON_ShootingMode, PTP_VENDOR_CANON, PTP_DTC_UINT8, _get_Cano n_ShootMode, _put_Canon_ShootMode }, { N_("Canon Shooting Mode"), "shootingmode", PTP_D PC_CANON_ShootingMode, PTP_VENDOR_CANON, PTP_DTC_UINT8, _get_Cano n_ShootMode, _put_Canon_ShootMode },
{ N_("Canon Auto Exposure Mode"), "autoexposuremode", PTP_D PC_CANON_EOS_AutoExposureMode, PTP_VENDOR_CANON, PTP_DTC_UINT16, _get_Cano n_EOS_AutoExposureMode, _put_Canon_EOS_AutoExposureMode }, { N_("Canon Auto Exposure Mode"), "autoexposuremode", PTP_D PC_CANON_EOS_AutoExposureMode, PTP_VENDOR_CANON, PTP_DTC_UINT16, _get_Cano n_EOS_AutoExposureMode, _put_Canon_EOS_AutoExposureMode },
{ N_("Canon Auto Exposure Mode Dial"), "autoexposuremodedial", PTP_D PC_CANON_EOS_AEModeDial, PTP_VENDOR_CANON, PTP_DTC_UINT16, _get_Cano n_EOS_AutoExposureMode, _put_Canon_EOS_AutoExposureMode },
{ N_("Drive Mode"), "drivemode", PTP_D PC_CANON_EOS_DriveMode, PTP_VENDOR_CANON, PTP_DTC_UINT16, _get_Cano n_EOS_DriveMode, _put_Canon_EOS_DriveMode }, { N_("Drive Mode"), "drivemode", PTP_D PC_CANON_EOS_DriveMode, PTP_VENDOR_CANON, PTP_DTC_UINT16, _get_Cano n_EOS_DriveMode, _put_Canon_EOS_DriveMode },
{ N_("Picture Style"), "picturestyle", PTP_D PC_CANON_EOS_PictureStyle, PTP_VENDOR_CANON, PTP_DTC_UINT8, _get_Cano n_EOS_PictureStyle, _put_Canon_EOS_PictureStyle }, { N_("Picture Style"), "picturestyle", PTP_D PC_CANON_EOS_PictureStyle, PTP_VENDOR_CANON, PTP_DTC_UINT8, _get_Cano n_EOS_PictureStyle, _put_Canon_EOS_PictureStyle },
{ N_("Focus Metering Mode"), "focusmetermode", PTP_D PC_FocusMeteringMode, 0, PTP_DTC_UINT16, _get_Focu sMetering, _put_FocusMetering }, { N_("Focus Metering Mode"), "focusmetermode", PTP_D PC_FocusMeteringMode, 0, PTP_DTC_UINT16, _get_Focu sMetering, _put_FocusMetering },
{ N_("Focus Metering Mode"), "exposuremetermode", PTP_D PC_OLYMPUS_ExposureMeteringMode, PTP_VENDOR_GP_OLYMPUS_OMD, PTP_DTC_UINT16, _g et_ExposureMetering, _put_ExposureMetering }, { N_("Focus Metering Mode"), "exposuremetermode", PTP_D PC_OLYMPUS_ExposureMeteringMode, PTP_VENDOR_GP_OLYMPUS_OMD, PTP_DTC_UINT16, _g et_ExposureMetering, _put_ExposureMetering },
{ N_("Exposure Metering Mode"), "exposuremetermode", PTP_D PC_ExposureMeteringMode, 0, PTP_DTC_UINT16, _get_Expo sureMetering, _put_ExposureMetering }, { N_("Exposure Metering Mode"), "exposuremetermode", PTP_D PC_ExposureMeteringMode, 0, PTP_DTC_UINT16, _get_Expo sureMetering, _put_ExposureMetering },
{ N_("Aperture"), "aperture", PTP_D PC_OLYMPUS_Aperture, PTP_VENDOR_GP_OLYMPUS_OMD, PTP_DTC_UINT16, _get_Olympus_Aperture, _put_Olympus_Aperture }, { N_("Aperture"), "aperture", PTP_D PC_OLYMPUS_Aperture, PTP_VENDOR_GP_OLYMPUS_OMD, PTP_DTC_UINT16, _get_Olympus_Aperture, _put_Olympus_Aperture },
{ N_("Aperture"), "aperture", PTP_D PC_CANON_Aperture, PTP_VENDOR_CANON, PTP_DTC_UINT16, _get_Cano n_Aperture, _put_Canon_Aperture }, { N_("Aperture"), "aperture", PTP_D PC_CANON_Aperture, PTP_VENDOR_CANON, PTP_DTC_UINT16, _get_Cano n_Aperture, _put_Canon_Aperture },
{ N_("Aperture"), "aperture", PTP_D PC_FUJI_Aperture, PTP_VENDOR_FUJI, PTP_DTC_UINT16, _get_Fuji _Aperture, _put_Fuji_Aperture }, { N_("Aperture"), "aperture", PTP_D PC_FUJI_Aperture, PTP_VENDOR_FUJI, PTP_DTC_UINT16, _get_Fuji _Aperture, _put_Fuji_Aperture },
{ N_("AV Open"), "avopen", PTP_D PC_CANON_AvOpen, PTP_VENDOR_CANON, PTP_DTC_UINT16, _get_Cano n_Aperture, _put_Canon_Aperture }, { N_("AV Open"), "avopen", PTP_D PC_CANON_AvOpen, PTP_VENDOR_CANON, PTP_DTC_UINT16, _get_Cano n_Aperture, _put_Canon_Aperture },
{ N_("AV Max"), "avmax", PTP_D PC_CANON_AvMax, PTP_VENDOR_CANON, PTP_DTC_UINT16, _get_Cano n_Aperture, _put_Canon_Aperture }, { N_("AV Max"), "avmax", PTP_D PC_CANON_AvMax, PTP_VENDOR_CANON, PTP_DTC_UINT16, _get_Cano n_Aperture, _put_Canon_Aperture },
skipping to change at line 9494 skipping to change at line 9919
{ N_("Exposure Lock"), "exposurelock", PTP_D PC_NIKON_AELockMode, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_OnOff_UINT8, _put_Nikon_OnOff_UINT8 }, { N_("Exposure Lock"), "exposurelock", PTP_D PC_NIKON_AELockMode, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_OnOff_UINT8, _put_Nikon_OnOff_UINT8 },
{ N_("AE-L/AF-L Mode"), "aelaflmode", PTP_D PC_NIKON_AELAFLMode, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_AELAFLMode, _put_Nikon_AELAFLMode }, { N_("AE-L/AF-L Mode"), "aelaflmode", PTP_D PC_NIKON_AELAFLMode, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_AELAFLMode, _put_Nikon_AELAFLMode },
{ N_("Live View AF Mode"), "liveviewafmode", PTP_D PC_NIKON_LiveViewAFArea, PTP_VENDOR_NIKON, PTP_DTC_INT8, _get_Niko n_LiveViewAFI, _put_Nikon_LiveViewAFI }, { N_("Live View AF Mode"), "liveviewafmode", PTP_D PC_NIKON_LiveViewAFArea, PTP_VENDOR_NIKON, PTP_DTC_INT8, _get_Niko n_LiveViewAFI, _put_Nikon_LiveViewAFI },
{ N_("Live View AF Mode"), "liveviewafmode", PTP_D PC_NIKON_LiveViewAFArea, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_LiveViewAFU, _put_Nikon_LiveViewAFU }, { N_("Live View AF Mode"), "liveviewafmode", PTP_D PC_NIKON_LiveViewAFArea, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_LiveViewAFU, _put_Nikon_LiveViewAFU },
{ N_("Live View AF Focus"), "liveviewaffocus", PTP_D PC_NIKON_LiveViewAFFocus, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_LiveViewAFFocus, _put_Nikon_LiveViewAFFocus }, { N_("Live View AF Focus"), "liveviewaffocus", PTP_D PC_NIKON_LiveViewAFFocus, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_LiveViewAFFocus, _put_Nikon_LiveViewAFFocus },
{ N_("Live View Exposure Preview"), "liveviewexposurepreview", PTP_D PC_NIKON_LiveViewExposurePreview, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_OffOn_UINT8, _put_Nikon_OffOn_UINT8 }, { N_("Live View Exposure Preview"), "liveviewexposurepreview", PTP_D PC_NIKON_LiveViewExposurePreview, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_OffOn_UINT8, _put_Nikon_OffOn_UINT8 },
{ N_("Live View Image Zoom Ratio"), "liveviewimagezoomratio", PTP_D PC_NIKON_LiveViewImageZoomRatio, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_LiveViewImageZoomRatio, _put_Nikon_LiveViewImageZoomRatio }, { N_("Live View Image Zoom Ratio"), "liveviewimagezoomratio", PTP_D PC_NIKON_LiveViewImageZoomRatio, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_LiveViewImageZoomRatio, _put_Nikon_LiveViewImageZoomRatio },
{ N_("Live View White Balance"), "liveviewwhitebalance", PTP_D PC_NIKON_LiveViewWhiteBalance, PTP_VENDOR_NIKON, PTP_DTC_UINT16, _get_Whit eBalance, _put_WhiteBalance }, { N_("Live View White Balance"), "liveviewwhitebalance", PTP_D PC_NIKON_LiveViewWhiteBalance, PTP_VENDOR_NIKON, PTP_DTC_UINT16, _get_Whit eBalance, _put_WhiteBalance },
{ N_("Live View Size"), "liveviewsize", PTP_D PC_FUJI_LiveViewImageSize, PTP_VENDOR_FUJI, PTP_DTC_UINT16, _get_Fuji _LiveViewSize, _put_Fuji_LiveViewSize }, { N_("Live View Size"), "liveviewsize", PTP_D PC_FUJI_LiveViewImageSize, PTP_VENDOR_FUJI, PTP_DTC_UINT16, _get_Fuji _LiveViewSize, _put_Fuji_LiveViewSize },
{ N_("Live View Size"), "liveviewsize", PTP_D PC_SONY_QX_LiveviewResolution, PTP_VENDOR_SONY, PTP_DTC_UINT8, _get_Sony _QX_LiveViewSize, _put_Sony_QX_LiveViewSize }, { N_("Live View Size"), "liveviewsize", PTP_D PC_SONY_QX_LiveviewResolution, PTP_VENDOR_SONY, PTP_DTC_UINT8, _get_Sony _QX_LiveViewSize, _put_Sony_QX_LiveViewSize },
{ N_("Live View Size"), "liveviewsize", PTP_D PC_CANON_EOS_EVFOutputDevice, PTP_VENDOR_CANON, PTP_DTC_UINT16, _get_Cano n_LiveViewSize, _put_Canon_LiveViewSize },
{ N_("File Number Sequencing"), "filenrsequencing", PTP_D PC_NIKON_FileNumberSequence, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_OnOff_UINT8, _put_Nikon_OnOff_UINT8 }, { N_("File Number Sequencing"), "filenrsequencing", PTP_D PC_NIKON_FileNumberSequence, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_OnOff_UINT8, _put_Nikon_OnOff_UINT8 },
{ N_("Flash Sign"), "flashsign", PTP_D PC_NIKON_FlashSign, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_OnOff_UINT8, _put_Nikon_OnOff_UINT8 }, { N_("Flash Sign"), "flashsign", PTP_D PC_NIKON_FlashSign, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_OnOff_UINT8, _put_Nikon_OnOff_UINT8 },
{ N_("Modelling Flash"), "modelflash", PTP_D PC_NIKON_E4ModelingFlash, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_OffOn_UINT8, _put_Nikon_OffOn_UINT8 }, { N_("Modelling Flash"), "modelflash", PTP_D PC_NIKON_E4ModelingFlash, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_OffOn_UINT8, _put_Nikon_OffOn_UINT8 },
{ N_("Viewfinder Grid"), "viewfindergrid", PTP_D PC_NIKON_GridDisplay, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_OnOff_UINT8, _put_Nikon_OnOff_UINT8 }, { N_("Viewfinder Grid"), "viewfindergrid", PTP_D PC_NIKON_GridDisplay, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_OnOff_UINT8, _put_Nikon_OnOff_UINT8 },
{ N_("Image Review"), "imagereview", PTP_D PC_NIKON_ImageReview, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_OnOff_UINT8, _put_Nikon_OnOff_UINT8 }, { N_("Image Review"), "imagereview", PTP_D PC_NIKON_ImageReview, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_OnOff_UINT8, _put_Nikon_OnOff_UINT8 },
{ N_("Image Rotation Flag"), "imagerotationflag", PTP_D PC_NIKON_ImageRotation, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_OnOff_UINT8, _put_Nikon_OnOff_UINT8 }, { N_("Image Rotation Flag"), "imagerotationflag", PTP_D PC_NIKON_ImageRotation, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_OnOff_UINT8, _put_Nikon_OnOff_UINT8 },
{ N_("Release without CF card"), "nocfcardrelease", PTP_D PC_NIKON_NoCFCard, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_OnOff_UINT8, _put_Nikon_OnOff_UINT8 }, { N_("Release without CF card"), "nocfcardrelease", PTP_D PC_NIKON_NoCFCard, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_OnOff_UINT8, _put_Nikon_OnOff_UINT8 },
{ N_("Flash Mode Manual Power"), "flashmodemanualpower", PTP_D PC_NIKON_FlashModeManualPower, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_FlashModeManualPower, _put_Nikon_FlashModeManualPower }, { N_("Flash Mode Manual Power"), "flashmodemanualpower", PTP_D PC_NIKON_FlashModeManualPower, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_FlashModeManualPower, _put_Nikon_FlashModeManualPower },
{ N_("Auto Focus Area"), "autofocusarea", PTP_D PC_NIKON_AutofocusArea, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_AutofocusArea, _put_Nikon_AutofocusArea }, { N_("Auto Focus Area"), "autofocusarea", PTP_D PC_NIKON_AutofocusArea, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_AutofocusArea, _put_Nikon_AutofocusArea },
{ N_("Flash Exposure Compensation"), "flashexposurecompensation", PTP_ DPC_NIKON_FlashExposureCompensation, PTP_VENDOR_NIKON, PTP_DTC_INT8, _get_Niko n_FlashExposureCompensation, _put_Nikon_FlashExposureCompensation }, { N_("Flash Exposure Compensation"), "flashexposurecompensation", PTP_ DPC_NIKON_FlashExposureCompensation, PTP_VENDOR_NIKON, PTP_DTC_INT8, _get_Niko n_FlashExposureCompensation, _put_Nikon_FlashExposureCompensation },
skipping to change at line 9557 skipping to change at line 9983
{ N_("White Balance Bias Preset 1"), "whitebiaspreset1", PTP_D PC_NIKON_WhiteBalancePresetVal1, PTP_VENDOR_NIKON, PTP_DTC_UINT32, _get_Niko n_WBBiasPresetVal, _put_None }, { N_("White Balance Bias Preset 1"), "whitebiaspreset1", PTP_D PC_NIKON_WhiteBalancePresetVal1, PTP_VENDOR_NIKON, PTP_DTC_UINT32, _get_Niko n_WBBiasPresetVal, _put_None },
{ N_("White Balance Bias Preset 2"), "whitebiaspreset2", PTP_D PC_NIKON_WhiteBalancePresetVal2, PTP_VENDOR_NIKON, PTP_DTC_UINT32, _get_Niko n_WBBiasPresetVal, _put_None }, { N_("White Balance Bias Preset 2"), "whitebiaspreset2", PTP_D PC_NIKON_WhiteBalancePresetVal2, PTP_VENDOR_NIKON, PTP_DTC_UINT32, _get_Niko n_WBBiasPresetVal, _put_None },
{ N_("White Balance Bias Preset 3"), "whitebiaspreset3", PTP_D PC_NIKON_WhiteBalancePresetVal3, PTP_VENDOR_NIKON, PTP_DTC_UINT32, _get_Niko n_WBBiasPresetVal, _put_None }, { N_("White Balance Bias Preset 3"), "whitebiaspreset3", PTP_D PC_NIKON_WhiteBalancePresetVal3, PTP_VENDOR_NIKON, PTP_DTC_UINT32, _get_Niko n_WBBiasPresetVal, _put_None },
{ N_("White Balance Bias Preset 4"), "whitebiaspreset4", PTP_D PC_NIKON_WhiteBalancePresetVal4, PTP_VENDOR_NIKON, PTP_DTC_UINT32, _get_Niko n_WBBiasPresetVal, _put_None }, { N_("White Balance Bias Preset 4"), "whitebiaspreset4", PTP_D PC_NIKON_WhiteBalancePresetVal4, PTP_VENDOR_NIKON, PTP_DTC_UINT32, _get_Niko n_WBBiasPresetVal, _put_None },
{ N_("Selftimer Delay"), "selftimerdelay", PTP_D PC_NIKON_SelfTimer, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_SelfTimerDelay, _put_Nikon_SelfTimerDelay }, { N_("Selftimer Delay"), "selftimerdelay", PTP_D PC_NIKON_SelfTimer, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_SelfTimerDelay, _put_Nikon_SelfTimerDelay },
{ N_("Center Weight Area"), "centerweightsize", PTP_D PC_NIKON_CenterWeightArea, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_CenterWeight, _put_Nikon_CenterWeight }, { N_("Center Weight Area"), "centerweightsize", PTP_D PC_NIKON_CenterWeightArea, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_CenterWeight, _put_Nikon_CenterWeight },
{ N_("Flash Shutter Speed"), "flashshutterspeed", PTP_D PC_NIKON_FlashShutterSpeed, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_FlashShutterSpeed, _put_Nikon_FlashShutterSpeed }, { N_("Flash Shutter Speed"), "flashshutterspeed", PTP_D PC_NIKON_FlashShutterSpeed, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_FlashShutterSpeed, _put_Nikon_FlashShutterSpeed },
{ N_("Remote Timeout"), "remotetimeout", PTP_D PC_NIKON_RemoteTimeout, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_RemoteTimeout, _put_Nikon_RemoteTimeout }, { N_("Remote Timeout"), "remotetimeout", PTP_D PC_NIKON_RemoteTimeout, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_RemoteTimeout, _put_Nikon_RemoteTimeout },
{ N_("Remote Mode"), "remotemode", PTP_D PC_NIKON_RemoteMode, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_RemoteMode, _put_Nikon_RemoteMode }, { N_("Remote Mode"), "remotemode", PTP_D PC_NIKON_RemoteMode, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_RemoteMode, _put_Nikon_RemoteMode },
{ N_("Application Mode"), "applicationmode", PTP_D PC_NIKON_ApplicationMode, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_ApplicationMode, _put_Nikon_ApplicationMode }, { N_("Application Mode"), "applicationmode", PTP_D PC_NIKON_ApplicationMode, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_ApplicationMode, _put_Nikon_ApplicationMode },
{ N_("Application Mode"), "applicationmode", PTP_O C_NIKON_ChangeApplicationMode, PTP_VENDOR_NIKON, 0, _get_Niko n_ApplicationMode2, _put_Nikon_ApplicationMode2 },
{ N_("Optimize Image"), "optimizeimage", PTP_D PC_NIKON_OptimizeImage, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_OptimizeImage, _put_Nikon_OptimizeImage }, { N_("Optimize Image"), "optimizeimage", PTP_D PC_NIKON_OptimizeImage, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_OptimizeImage, _put_Nikon_OptimizeImage },
{ N_("Sharpening"), "sharpening", PTP_D PC_NIKON_ImageSharpening, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_Sharpening, _put_Nikon_Sharpening }, { N_("Sharpening"), "sharpening", PTP_D PC_NIKON_ImageSharpening, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_Sharpening, _put_Nikon_Sharpening },
{ N_("Tone Compensation"), "tonecompensation", PTP_D PC_NIKON_ToneCompensation, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_ToneCompensation, _put_Nikon_ToneCompensation }, { N_("Tone Compensation"), "tonecompensation", PTP_D PC_NIKON_ToneCompensation, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_ToneCompensation, _put_Nikon_ToneCompensation },
{ N_("Saturation"), "saturation", PTP_D PC_NIKON_Saturation, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_Saturation, _put_Nikon_Saturation }, { N_("Saturation"), "saturation", PTP_D PC_NIKON_Saturation, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_Saturation, _put_Nikon_Saturation },
{ N_("Hue Adjustment"), "hueadjustment", PTP_D PC_NIKON_HueAdjustment, PTP_VENDOR_NIKON, PTP_DTC_INT8, _get_Niko n_HueAdjustment, _put_Nikon_HueAdjustment }, { N_("Hue Adjustment"), "hueadjustment", PTP_D PC_NIKON_HueAdjustment, PTP_VENDOR_NIKON, PTP_DTC_INT8, _get_Niko n_HueAdjustment, _put_Nikon_HueAdjustment },
{ N_("Auto Exposure Bracketing"), "aeb", PTP_D PC_CANON_EOS_AEB, PTP_VENDOR_CANON, PTP_DTC_UINT16, _get_Cano n_EOS_AEB, _put_Canon_EOS_AEB }, { N_("Auto Exposure Bracketing"), "aeb", PTP_D PC_CANON_EOS_AEB, PTP_VENDOR_CANON, PTP_DTC_UINT16, _get_Cano n_EOS_AEB, _put_Canon_EOS_AEB },
{ N_("Auto Lighting Optimization"), "alomode", PTP_D PC_CANON_EOS_AloMode, PTP_VENDOR_CANON, PTP_DTC_UINT16, _get_Cano n_EOS_AloMode, _put_Canon_EOS_AloMode }, { N_("Auto Lighting Optimization"), "alomode", PTP_D PC_CANON_EOS_AloMode, PTP_VENDOR_CANON, PTP_DTC_UINT16, _get_Cano n_EOS_AloMode, _put_Canon_EOS_AloMode },
{ N_("Movie Sound"), "moviesound", PTP_D PC_NIKON_MovVoice, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_OffOn_UINT8, _put_Nikon_OffOn_UINT8 }, { N_("Movie Sound"), "moviesound", PTP_D PC_NIKON_MovVoice, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_OffOn_UINT8, _put_Nikon_OffOn_UINT8 },
{ N_("Manual Movie Setting"), "manualmoviesetting", PTP_D PC_NIKON_ManualMovieSetting, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_OnOff_UINT8, _put_Nikon_OnOff_UINT8 }, { N_("Manual Movie Setting"), "manualmoviesetting", PTP_D PC_NIKON_ManualMovieSetting, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_OnOff_UINT8, _put_Nikon_OnOff_UINT8 },
{ N_("Microphone"), "microphone", PTP_D PC_NIKON_MovMicrophone, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_Microphone, _put_Nikon_Microphone }, { N_("Microphone"), "microphone", PTP_D PC_NIKON_MovMicrophone, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_Microphone, _put_Nikon_Microphone },
skipping to change at line 9720 skipping to change at line 10147
{ N_("Image Quality 2"), "imagequality2", PTP_D PC_NIKON_1_ImageCompression, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_1_Compression, _put_Nikon_1_Compression }, { N_("Image Quality 2"), "imagequality2", PTP_D PC_NIKON_1_ImageCompression, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_1_Compression, _put_Nikon_1_Compression },
{ N_("Image Quality"), "imagequality", PTP_D PC_SONY_QX_CompressionSetting, PTP_VENDOR_SONY, PTP_DTC_UINT8, _get_Sony _QX_Compression, _put_Sony_QX_Compression }, { N_("Image Quality"), "imagequality", PTP_D PC_SONY_QX_CompressionSetting, PTP_VENDOR_SONY, PTP_DTC_UINT8, _get_Sony _QX_Compression, _put_Sony_QX_Compression },
/* And some D3s values */ /* And some D3s values */
{ N_("Continuous Shooting Speed High"), "shootingspeedhigh", PTP_D PC_NIKON_ContinuousSpeedHigh, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_D3s_ShootingSpeedHigh, _put_Nikon_D3s_ShootingSpeedHigh }, { N_("Continuous Shooting Speed High"), "shootingspeedhigh", PTP_D PC_NIKON_ContinuousSpeedHigh, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_D3s_ShootingSpeedHigh, _put_Nikon_D3s_ShootingSpeedHigh },
{ N_("Flash Sync. Speed"), "flashsyncspeed", PTP_D PC_NIKON_FlashSyncSpeed, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_D3s_FlashSyncSpeed, _put_Nikon_D3s_FlashSyncSpeed }, { N_("Flash Sync. Speed"), "flashsyncspeed", PTP_D PC_NIKON_FlashSyncSpeed, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_D3s_FlashSyncSpeed, _put_Nikon_D3s_FlashSyncSpeed },
{ N_("Flash Shutter Speed"), "flashshutterspeed", PTP_D PC_NIKON_FlashShutterSpeed, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_D3s_FlashShutterSpeed, _put_Nikon_D3s_FlashShutterSpeed }, { N_("Flash Shutter Speed"), "flashshutterspeed", PTP_D PC_NIKON_FlashShutterSpeed, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_D3s_FlashShutterSpeed, _put_Nikon_D3s_FlashShutterSpeed },
{ N_("Live View Size"), "liveviewsize", PTP_D PC_NIKON_LiveViewImageSize, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_LiveViewSize, _put_Nikon_LiveViewSize }, { N_("Live View Size"), "liveviewsize", PTP_D PC_NIKON_LiveViewImageSize, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Niko n_LiveViewSize, _put_Nikon_LiveViewSize },
{ N_("Live View Zoom Area"), "liveviewzoomarea", PTP_D PC_NIKON_LiveViewZoomArea, PTP_VENDOR_NIKON, PTP_DTC_UINT16, _get_INT, _put_INT },
{ 0,0,0,0,0,0,0 }, { 0,0,0,0,0,0,0 },
}; };
static struct menu menus[] = { static struct menu menus[] = {
{ N_("Camera Actions"), "actions", 0, 0, c amera_actions_menu, NULL, NULL }, { N_("Camera Actions"), "actions", 0, 0, c amera_actions_menu, NULL, NULL },
{ N_("Camera Settings"), "settings", 0x4b0, 0x0428, n ikon_d7000_camera_settings, NULL, NULL }, { N_("Camera Settings"), "settings", 0x4b0, 0x0428, n ikon_d7000_camera_settings, NULL, NULL },
{ N_("Camera Settings"), "settings", 0x4b0, 0x0430, n ikon_d7100_camera_settings, NULL, NULL }, { N_("Camera Settings"), "settings", 0x4b0, 0x0430, n ikon_d7100_camera_settings, NULL, NULL },
{ N_("Camera Settings"), "settings", 0x4b0, 0x0421, n ikon_d90_camera_settings, NULL, NULL }, { N_("Camera Settings"), "settings", 0x4b0, 0x0421, n ikon_d90_camera_settings, NULL, NULL },
skipping to change at line 9747 skipping to change at line 10175
{ N_("Capture Settings"), "capturesettings", 0x4b0, 0x0421, n ikon_d90_capture_settings, NULL, NULL }, { N_("Capture Settings"), "capturesettings", 0x4b0, 0x0421, n ikon_d90_capture_settings, NULL, NULL },
{ N_("Capture Settings"), "capturesettings", 0x4b0, 0x043c, n ikon_d500_capture_settings, NULL, NULL }, { N_("Capture Settings"), "capturesettings", 0x4b0, 0x043c, n ikon_d500_capture_settings, NULL, NULL },
{ N_("Capture Settings"), "capturesettings", 0x4b0, 0x0426, n ikon_d3s_capture_settings, NULL, NULL }, { N_("Capture Settings"), "capturesettings", 0x4b0, 0x0426, n ikon_d3s_capture_settings, NULL, NULL },
{ N_("Capture Settings"), "capturesettings", 0x4b0, 0x0429, n ikon_d5100_capture_settings, NULL, NULL }, { N_("Capture Settings"), "capturesettings", 0x4b0, 0x0429, n ikon_d5100_capture_settings, NULL, NULL },
{ N_("Capture Settings"), "capturesettings", 0x4b0, 0x0430, n ikon_d7100_capture_settings, NULL, NULL }, { N_("Capture Settings"), "capturesettings", 0x4b0, 0x0430, n ikon_d7100_capture_settings, NULL, NULL },
{ N_("Capture Settings"), "capturesettings", 0x4b0, 0x0440, n ikon_d7500_capture_settings, NULL, NULL }, { N_("Capture Settings"), "capturesettings", 0x4b0, 0x0440, n ikon_d7500_capture_settings, NULL, NULL },
{ N_("Capture Settings"), "capturesettings", 0x4b0, 0x0414, n ikon_d40_capture_settings, NULL, NULL }, { N_("Capture Settings"), "capturesettings", 0x4b0, 0x0414, n ikon_d40_capture_settings, NULL, NULL },
{ N_("Capture Settings"), "capturesettings", 0x4b0, 0x0441, n ikon_d850_capture_settings, NULL, NULL }, { N_("Capture Settings"), "capturesettings", 0x4b0, 0x0441, n ikon_d850_capture_settings, NULL, NULL },
{ N_("Capture Settings"), "capturesettings", 0x4b0, 0x0442, n ikon_z6_capture_settings, NULL, NULL }, /* Z7 */ { N_("Capture Settings"), "capturesettings", 0x4b0, 0x0442, n ikon_z6_capture_settings, NULL, NULL }, /* Z7 */
{ N_("Capture Settings"), "capturesettings", 0x4b0, 0x0443, n ikon_z6_capture_settings, NULL, NULL }, /* Z6 */ { N_("Capture Settings"), "capturesettings", 0x4b0, 0x0443, n ikon_z6_capture_settings, NULL, NULL }, /* Z6 */
{ N_("Capture Settings"), "capturesettings", 0x4b0, 0x0444, n
ikon_z6_capture_settings, NULL, NULL }, /* Z50 */
{ N_("Capture Settings"), "capturesettings", 0x4b0, 0x0448, n
ikon_z6_capture_settings, NULL, NULL }, /* Z5 guessed */
{ N_("Capture Settings"), "capturesettings", 0x4b0, 0x044b, n
ikon_z6_capture_settings, NULL, NULL }, /* Z7_2 guessed */
{ N_("Capture Settings"), "capturesettings", 0x4b0, 0x044c, n
ikon_z6_capture_settings, NULL, NULL }, /* Z6_2 guessed */
{ N_("Capture Settings"), "capturesettings", 0x4b0, 0, n ikon_generic_capture_settings, NULL, NULL }, { N_("Capture Settings"), "capturesettings", 0x4b0, 0, n ikon_generic_capture_settings, NULL, NULL },
{ N_("Capture Settings"), "capturesettings", 0, 0, c apture_settings_menu, NULL, NULL }, { N_("Capture Settings"), "capturesettings", 0, 0, c apture_settings_menu, NULL, NULL },
{ N_("WIFI profiles"), "wifiprofiles", 0, 0, N ULL, _get_wifi_profiles_menu, _put_wifi_profiles_menu }, { N_("WIFI profiles"), "wifiprofiles", 0, 0, N ULL, _get_wifi_profiles_menu, _put_wifi_profiles_menu },
}; };
/* /*
* Can do 3 things: * Can do 3 things:
* - get the whole widget dialog tree (confname = NULL, list = NULL, widget = ro otwidget) * - get the whole widget dialog tree (confname = NULL, list = NULL, widget = ro otwidget)
* - get the named single widget (confname = the specified property, widget = p roperty widget, list = NULL) * - get the named single widget (confname = the specified property, widget = p roperty widget, list = NULL)
 End of changes. 55 change blocks. 
68 lines changed or deleted 543 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)