summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2014-03-14 19:06:56 +0000
committerMarcus Meissner <marcus@jet.franken.de>2014-03-14 19:06:56 +0000
commit62a34a6cdb9cf181736716c361341d16a4e231b4 (patch)
treebf1047d289245df788f504d67c03f2783d2fc494
parente4431f0122d39110b0d68ed205edd604dcdc723d (diff)
downloadlibgphoto2-62a34a6cdb9cf181736716c361341d16a4e231b4.tar.gz
more sony improvements
more sony configuration values wait_for_event sony handling git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14823 67ed7778-7388-44ab-90cf-0a291f65f57c
-rw-r--r--camlibs/ptp2/config.c42
-rw-r--r--camlibs/ptp2/library.c93
-rw-r--r--camlibs/ptp2/ptp.c27
-rw-r--r--camlibs/ptp2/ptp.h8
4 files changed, 136 insertions, 34 deletions
diff --git a/camlibs/ptp2/config.c b/camlibs/ptp2/config.c
index a1b151053..8d326ce2f 100644
--- a/camlibs/ptp2/config.c
+++ b/camlibs/ptp2/config.c
@@ -1303,6 +1303,7 @@ static struct deviceproptableu16 whitebalance[] = {
{ N_("Shade"), 0x8011, PTP_VENDOR_NIKON },
{ N_("Color Temperature"), 0x8012, PTP_VENDOR_NIKON },
{ N_("Preset"), 0x8013, PTP_VENDOR_NIKON },
+
{ N_("Fluorescent Lamp 1"), 0x8001, PTP_VENDOR_FUJI },
{ N_("Fluorescent Lamp 2"), 0x8002, PTP_VENDOR_FUJI },
{ N_("Fluorescent Lamp 3"), 0x8003, PTP_VENDOR_FUJI },
@@ -1315,6 +1316,15 @@ static struct deviceproptableu16 whitebalance[] = {
{ N_("Preset Custom 3"), 0x800a, PTP_VENDOR_FUJI },
{ N_("Preset Custom 4"), 0x800b, PTP_VENDOR_FUJI },
{ N_("Preset Custom 5"), 0x800c, PTP_VENDOR_FUJI },
+
+ { N_("Shade"), 0x8011, PTP_VENDOR_SONY },
+ { N_("Cloudy"), 0x8010, PTP_VENDOR_SONY },
+ { N_("Fluorescent: Warm White"),0x8001, PTP_VENDOR_SONY },
+ { N_("Fluorescent: Cold White"),0x8002, PTP_VENDOR_SONY },
+ { N_("Fluorescent: Day White"), 0x8003, PTP_VENDOR_SONY },
+ { N_("Fluorescent: Daylight"), 0x8004, PTP_VENDOR_SONY },
+ { N_("Choose Color Temperature"),0x8012, PTP_VENDOR_SONY },
+ { N_("Preset"), 0x8023, PTP_VENDOR_SONY },
};
GENERIC16TABLE(WhiteBalance,whitebalance)
@@ -1946,6 +1956,19 @@ static struct deviceproptableu8 canon_size[] = {
};
GENERIC8TABLE(Canon_Size,canon_size)
+static struct deviceproptableu8 sony_size[] = {
+ { N_("Large"), 0x01, 0 },
+ { N_("Medium"), 0x02, 0 },
+ { N_("Small"), 0x03, 0 },
+};
+GENERIC8TABLE(Sony_ImageSize,sony_size)
+
+static struct deviceproptableu8 sony_aspectratio[] = {
+ { N_("16:9"), 0x01, 0 },
+ { N_("3:2"), 0x02, 0 },
+};
+GENERIC8TABLE(Sony_AspectRatio,sony_aspectratio)
+
/* actually in 1/10s of a second, but only 3 values in use */
static struct deviceproptableu16 canon_selftimer[] = {
{ N_("Not used"), 0, 0 },
@@ -2731,6 +2754,10 @@ static struct deviceproptableu16 capture_mode[] = {
{ N_("Quick Response Remote"), 0x8014, PTP_VENDOR_NIKON}, /* others nikons */
{ N_("Delayed Remote"), 0x8015, PTP_VENDOR_NIKON}, /* d90 */
{ N_("Quiet Release"), 0x8016, PTP_VENDOR_NIKON}, /* d5000 */
+
+ { N_("Continuous Low Speed"), 0x8012, PTP_VENDOR_SONY},
+ { N_("Selftimer 2s"), 0x8005, PTP_VENDOR_SONY},
+ { N_("Selftimer 10s"), 0x8004, PTP_VENDOR_SONY},
/*
{ N_("Continuous"), 0x8001, PTP_VENDOR_CASIO},
{ N_("Prerecord"), 0x8002, PTP_VENDOR_CASIO},
@@ -3910,7 +3937,7 @@ static struct deviceproptableu8 nikon_d3s_compression[] = {
};
GENERIC8TABLE(Nikon_D3s_Compression,nikon_d3s_compression)
-static struct deviceproptableu8 nikon_compression[] = {
+static struct deviceproptableu8 compressionsetting[] = {
{ N_("JPEG Basic"), 0x00, PTP_VENDOR_NIKON },
{ N_("JPEG Normal"), 0x01, PTP_VENDOR_NIKON },
{ N_("JPEG Fine"), 0x02, PTP_VENDOR_NIKON },
@@ -3918,8 +3945,13 @@ static struct deviceproptableu8 nikon_compression[] = {
{ N_("NEF+Basic"), 0x05, PTP_VENDOR_NIKON },
{ N_("NEF+Normal"), 0x06, PTP_VENDOR_NIKON },
{ N_("NEF+Fine"), 0x07, PTP_VENDOR_NIKON },
+
+ { N_("Standard"), 0x02, PTP_VENDOR_SONY },
+ { N_("Fine"), 0x03, PTP_VENDOR_SONY },
+ { N_("RAW"), 0x10, PTP_VENDOR_SONY },
+ { N_("RAW+JPEG"), 0x13, PTP_VENDOR_SONY },
};
-GENERIC8TABLE(Nikon_Compression,nikon_compression)
+GENERIC8TABLE(CompressionSetting,compressionsetting)
static struct deviceproptableu8 nikon_d90_highisonr[] = {
{ N_("Off"), 0, 0 },
@@ -5858,6 +5890,7 @@ static struct submenu image_settings_menu[] = {
{ N_("Image Format"), "imageformat", PTP_DPC_FUJI_Quality, PTP_VENDOR_FUJI, PTP_DTC_UINT16, _get_Fuji_ImageFormat, _put_Fuji_ImageFormat},
{ N_("Image Format Ext HD"), "imageformatexthd", PTP_DPC_CANON_EOS_ImageFormatExtHD, PTP_VENDOR_CANON, PTP_DTC_UINT16, _get_Canon_EOS_ImageFormat, _put_Canon_EOS_ImageFormat},
{ N_("Image Size"), "imagesize", PTP_DPC_ImageSize, 0, PTP_DTC_STR, _get_ImageSize, _put_ImageSize},
+ { N_("Image Size"), "imagesize", PTP_DPC_SONY_ImageSize, PTP_VENDOR_SONY, PTP_DTC_UINT8, _get_Sony_ImageSize, _put_Sony_ImageSize},
{ N_("Image Size"), "imagesize", PTP_DPC_CANON_ImageSize, PTP_VENDOR_CANON, PTP_DTC_UINT8, _get_Canon_Size, _put_Canon_Size},
{ N_("ISO Speed"), "iso", PTP_DPC_CANON_ISOSpeed, PTP_VENDOR_CANON, PTP_DTC_UINT16, _get_Canon_ISO, _put_Canon_ISO},
{ N_("ISO Speed"), "iso", PTP_DPC_ExposureIndex, 0, PTP_DTC_UINT16, _get_ISO, _put_ISO},
@@ -5866,6 +5899,7 @@ static struct submenu image_settings_menu[] = {
{ N_("WhiteBalance"), "whitebalance", PTP_DPC_CANON_WhiteBalance, PTP_VENDOR_CANON, PTP_DTC_UINT8, _get_Canon_WhiteBalance, _put_Canon_WhiteBalance},
{ N_("WhiteBalance"), "whitebalance", PTP_DPC_CANON_EOS_WhiteBalance, PTP_VENDOR_CANON, PTP_DTC_UINT8, _get_Canon_EOS_WhiteBalance, _put_Canon_EOS_WhiteBalance},
{ N_("Color Temperature"), "colortemperature", PTP_DPC_CANON_EOS_ColorTemperature, PTP_VENDOR_CANON, PTP_DTC_UINT32, _get_INT, _put_INT},
+ { N_("Color Temperature"), "colortemperature", PTP_DPC_SONY_ColorTemp, PTP_VENDOR_SONY, PTP_DTC_UINT16, _get_INT, _put_INT},
{ N_("WhiteBalance"), "whitebalance", PTP_DPC_WhiteBalance, 0, PTP_DTC_UINT16, _get_WhiteBalance, _put_WhiteBalance},
{ N_("WhiteBalance Adjust A") , "whitebalanceadjusta", PTP_DPC_CANON_EOS_WhiteBalanceAdjustA, PTP_VENDOR_CANON, PTP_DTC_INT16, _get_Canon_EOS_WBAdjust, _put_Canon_EOS_WBAdjust},
{ N_("WhiteBalance Adjust B") , "whitebalanceadjustb", PTP_DPC_CANON_EOS_WhiteBalanceAdjustB, PTP_VENDOR_CANON, PTP_DTC_INT16, _get_Canon_EOS_WBAdjust, _put_Canon_EOS_WBAdjust},
@@ -5913,7 +5947,7 @@ static struct submenu capture_settings_menu[] = {
{ N_("AF Beep Mode"), "afbeep", PTP_DPC_NIKON_BeepOff, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_OffOn_UINT8, _put_Nikon_OffOn_UINT8},
{ N_("F-Number"), "f-number", PTP_DPC_FNumber, 0, PTP_DTC_UINT16, _get_FNumber, _put_FNumber},
{ N_("Flexible Program"), "flexibleprogram", PTP_DPC_NIKON_FlexibleProgram, PTP_VENDOR_NIKON, PTP_DTC_INT8, _get_Range_INT8, _put_Range_INT8},
- { N_("Image Quality"), "imagequality", PTP_DPC_CompressionSetting, 0, PTP_DTC_UINT8, _get_Nikon_Compression, _put_Nikon_Compression},
+ { N_("Image Quality"), "imagequality", PTP_DPC_CompressionSetting, 0, PTP_DTC_UINT8, _get_CompressionSetting, _put_CompressionSetting},
{ N_("Focus Distance"), "focusdistance", PTP_DPC_FocusDistance, 0, PTP_DTC_UINT16, _get_FocusDistance, _put_FocusDistance},
{ N_("Focal Length"), "focallength", PTP_DPC_FocalLength, 0, PTP_DTC_UINT32, _get_FocalLength, _put_FocalLength},
{ N_("Focus Mode"), "focusmode", PTP_DPC_FocusMode, 0, PTP_DTC_UINT16, _get_FocusMode, _put_FocusMode},
@@ -5924,6 +5958,8 @@ static struct submenu capture_settings_menu[] = {
{ N_("Effect Mode"), "effectmode", PTP_DPC_NIKON_EffectMode, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_NIKON_EffectMode, _put_NIKON_EffectMode},
{ N_("Exposure Program"), "expprogram", PTP_DPC_ExposureProgramMode, 0, PTP_DTC_UINT16, _get_ExposureProgram, _put_ExposureProgram},
{ N_("Scene Mode"), "scenemode", PTP_DPC_NIKON_SceneMode, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_NIKON_SceneMode, _put_NIKON_SceneMode},
+ { N_("Aspect Ratio"), "aspectratio", PTP_DPC_SONY_AspectRatio, PTP_VENDOR_SONY, PTP_DTC_UINT8, _get_Sony_AspectRatio, _put_Sony_AspectRatio},
+
{ N_("HDR Mode"), "hdrmode", PTP_DPC_NIKON_HDRMode, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_OnOff_UINT8, _put_Nikon_OnOff_UINT8},
{ N_("HDR High Dynamic"), "hdrhighdynamic", PTP_DPC_NIKON_HDRHighDynamic, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_HDRHighDynamic, _put_Nikon_HDRHighDynamic},
{ N_("HDR Smoothing"), "hdrsmoothing", PTP_DPC_NIKON_HDRSmoothing, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_HDRSmoothing, _put_Nikon_HDRSmoothing},
diff --git a/camlibs/ptp2/library.c b/camlibs/ptp2/library.c
index 170fabd91..5a25c611a 100644
--- a/camlibs/ptp2/library.c
+++ b/camlibs/ptp2/library.c
@@ -1843,6 +1843,7 @@ static struct {
{PTP_OFC_CANON_CRW3, PTP_VENDOR_CANON, "image/x-canon-cr2"},
{PTP_OFC_CANON_MOV, PTP_VENDOR_CANON, "video/quicktime"},
{PTP_OFC_CANON_CHDK_CRW, PTP_VENDOR_CANON, "image/x-canon-cr2"},
+ {PTP_OFC_SONY_RAW, PTP_VENDOR_SONY, "image/x-sony-arw"},
{0, 0, NULL}
};
@@ -3191,9 +3192,11 @@ camera_sony_capture (Camera *camera, CameraCaptureType type, CameraFilePath *pat
PTPObjectInfo oi;
uint32_t newobject = 0;
static int capcnt = 0;
+ int dual = 0;
+ PTPDevicePropDesc dpd;
propval.u16 = 1;
- ret = ptp_sony_setdevicecontrolvalue (params, 0xD2C1, &propval, PTP_DTC_UINT16 );
+ ret = ptp_sony_setdevicecontrolvalueb (params, 0xD2C1, &propval, PTP_DTC_UINT16 );
if (ret != PTP_RC_OK)
return translate_ptp_result (ret);
@@ -3201,8 +3204,20 @@ camera_sony_capture (Camera *camera, CameraCaptureType type, CameraFilePath *pat
if (ret != PTP_RC_OK)
return translate_ptp_result (ret);
+ ret = ptp_generic_getdevicepropdesc (params, PTP_DPC_CompressionSetting, &dpd);
+ if (ret != PTP_RC_OK)
+ return translate_ptp_result (ret);
+ gp_log (GP_LOG_DEBUG, "ptp2/sony_capture", "dpd.CurrentValue.u8 = %x", dpd.CurrentValue.u8);
+ gp_log (GP_LOG_DEBUG, "ptp2/sony_capture", "dpd.FactoryDefaultValue.u8 = %x", dpd.FactoryDefaultValue.u8);
+ if (dpd.CurrentValue.u8 == 0)
+ dpd.CurrentValue.u8 = dpd.FactoryDefaultValue.u8;
+ if (dpd.CurrentValue.u8 == 0x13) {
+ gp_log (GP_LOG_DEBUG, "ptp2/sony_capture", "expecting raw+jpeg capture");
+ dual = 1;
+ }
+
propval.u16 = 2;
- ret = ptp_sony_setdevicecontrolvalue (params, 0xD2C7, &propval, PTP_DTC_UINT16 );
+ ret = ptp_sony_setdevicecontrolvalueb (params, 0xD2C7, &propval, PTP_DTC_UINT16 );
if (ret != PTP_RC_OK)
return translate_ptp_result (ret);
@@ -3218,6 +3233,8 @@ camera_sony_capture (Camera *camera, CameraCaptureType type, CameraFilePath *pat
gp_log (GP_LOG_DEBUG, "ptp2/sony_capture", "during event.code=%04x Param1=%08x", event.Code, event.Param1);
if (event.Code == 0xc201) {
newobject = event.Param1;
+ if (dual)
+ ptp_add_event (params, &event);
break;
}
}
@@ -3225,33 +3242,15 @@ camera_sony_capture (Camera *camera, CameraCaptureType type, CameraFilePath *pat
}
propval.u16 = 1;
- ret = ptp_sony_setdevicecontrolvalue (params, 0xD2C2, &propval, PTP_DTC_UINT16 );
+ ret = ptp_sony_setdevicecontrolvalueb (params, 0xD2C2, &propval, PTP_DTC_UINT16 );
if (ret != PTP_RC_OK)
return translate_ptp_result (ret);
propval.u16 = 1;
- ret = ptp_sony_setdevicecontrolvalue (params, 0xD2C1, &propval, PTP_DTC_UINT16 );
+ ret = ptp_sony_setdevicecontrolvalueb (params, 0xD2C1, &propval, PTP_DTC_UINT16 );
if (ret != PTP_RC_OK)
return translate_ptp_result (ret);
- for (tries = 0; tries < 5; tries++) {
- ret = ptp_sony_getalldevicepropdesc (params);
- if (ret != PTP_RC_OK)
- return translate_ptp_result (ret);
-
- ret = ptp_check_event (params);
- if (ret != PTP_RC_OK)
- return translate_ptp_result (ret);
- if (ptp_get_one_event(params, &event)) {
- gp_log (GP_LOG_DEBUG, "ptp2/sony_capture", "post event.code=%04x Param1=%08x", event.Code, event.Param1);
- if (event.Code == 0xc201) {
- newobject = event.Param1;
- break;
- }
- }
- usleep(10000);
- }
-
if (!newobject)
return GP_ERROR;
@@ -3260,7 +3259,10 @@ camera_sony_capture (Camera *camera, CameraCaptureType type, CameraFilePath *pat
if (ret != PTP_RC_OK) return translate_ptp_result (ret);
sprintf (path->folder,"/");
- sprintf (path->name, "capt%04d.jpg", capcnt++);
+ if (oi.ObjectFormat == PTP_OFC_SONY_RAW)
+ sprintf (path->name, "capt%04d.arw", capcnt++);
+ else
+ sprintf (path->name, "capt%04d.jpg", capcnt++);
return add_objectid_and_upload (camera, path, context, newobject, &oi);
}
@@ -4132,6 +4134,38 @@ downloadnow:
event.Code, event.Param1
);
handleregular:
+ if (params->deviceinfo.VendorExtensionID == PTP_VENDOR_SONY) {
+ switch (event.Code) {
+ case 0xc201: {
+ PTPObjectInfo oi;
+ static int capcnt = 0;
+
+ path = (CameraFilePath *)malloc(sizeof(CameraFilePath));
+ if (!path)
+ return GP_ERROR_NO_MEMORY;
+ ret = ptp_getobjectinfo (params, event.Param1, &oi);
+ if (ret != PTP_RC_OK) return translate_ptp_result (ret);
+
+ sprintf (path->folder,"/");
+ if (oi.ObjectFormat == PTP_OFC_SONY_RAW)
+ sprintf (path->name, "capt%04d.arw", capcnt++);
+ else
+ sprintf (path->name, "capt%04d.jpg", capcnt++);
+
+ ret = add_objectid_and_upload (camera, path, context, event.Param1, &oi);
+ if (ret == GP_OK) {
+ *eventtype = GP_EVENT_FILE_ADDED;
+ *eventdata = path;
+ return ret;
+ }
+ return ret;
+ }
+ case 0xc203: /* same as DevicePropChanged, just go there */
+ event.Code = PTP_EC_DevicePropChanged;
+ break;
+ }
+ /*fallthrough*/
+ }
switch (event.Code) {
case PTP_EC_CaptureComplete:
*eventtype = GP_EVENT_CAPTURE_COMPLETE;
@@ -4550,6 +4584,12 @@ camera_summary (Camera* camera, CameraText* summary, GPContext *context)
if (n >= spaceleft) return GP_OK; spaceleft -= n; txt += n;
}
break;
+ case PTP_VENDOR_SONY:
+ if (ptp_operation_issupported(params, PTP_OC_SONY_SetControlDeviceB)) {
+ n = snprintf (txt, spaceleft,_("Sony Capture"));
+ if (n >= spaceleft) return GP_OK; spaceleft -= n; txt += n;
+ }
+ break;
default:
/* does not belong to good vendor ... needs another detection */
if (params->device_flags & DEVICE_FLAG_OLYMPUS_XML_WRAPPED) {
@@ -5877,20 +5917,21 @@ delete_file_func (CameraFilesystem *fs, const char *folder,
SET_CONTEXT_P(params, context);
- if (!ptp_operation_issupported(params, PTP_OC_DeleteObject))
- return GP_ERROR_NOT_SUPPORTED;
-
if (!strcmp (folder, "/special"))
return GP_ERROR_NOT_SUPPORTED;
/* virtual file created by Nikon special capture */
if ( ((params->deviceinfo.VendorExtensionID == PTP_VENDOR_NIKON) ||
(params->deviceinfo.VendorExtensionID == PTP_VENDOR_CANON) ||
+ (params->deviceinfo.VendorExtensionID == PTP_VENDOR_SONY) ||
(params->device_flags & DEVICE_FLAG_OLYMPUS_XML_WRAPPED)) &&
!strncmp (filename, "capt", 4)
)
return GP_OK;
+ if (!ptp_operation_issupported(params, PTP_OC_DeleteObject))
+ return GP_ERROR_NOT_SUPPORTED;
+
camera->pl->checkevents = TRUE;
CPR (context, ptp_check_event (params));
/* compute storage ID value from folder patch */
diff --git a/camlibs/ptp2/ptp.c b/camlibs/ptp2/ptp.c
index b27eca11a..a55e18655 100644
--- a/camlibs/ptp2/ptp.c
+++ b/camlibs/ptp2/ptp.c
@@ -2932,7 +2932,7 @@ ptp_sony_getalldevicepropdesc (PTPParams* params)
dpddata = data+8; /* nr of entries 32bit, 0 32bit */
size -= 8;
while (size>0) {
- int i;
+ unsigned int i;
uint16_t propcode;
if (!ptp_unpack_Sony_DPD (params, dpddata, &dpd, size, &readlen))
@@ -2954,6 +2954,7 @@ ptp_sony_getalldevicepropdesc (PTPParams* params)
params->deviceproperties[i].prop = propcode;
}
params->deviceproperties[i].desc = dpd;
+#if 0
ptp_debug (params, "dpd.DevicePropertyCode %04x, readlen %d, getset %d", dpd.DevicePropertyCode, readlen, dpd.GetSet);
switch (dpd.DataType) {
case PTP_DTC_INT8:
@@ -2978,6 +2979,7 @@ ptp_sony_getalldevicepropdesc (PTPParams* params)
ptp_debug (params, "unknown type %x", dpd.DataType);
break;
}
+#endif
dpddata += readlen;
size -= readlen;
}
@@ -2986,7 +2988,26 @@ ptp_sony_getalldevicepropdesc (PTPParams* params)
}
uint16_t
-ptp_sony_setdevicecontrolvalue (PTPParams* params, uint16_t propcode,
+ptp_sony_setdevicecontrolvaluea (PTPParams* params, uint16_t propcode,
+ PTPPropertyValue *value, uint16_t datatype)
+{
+ PTPContainer ptp;
+ uint16_t ret;
+ uint32_t size;
+ unsigned char* dpv=NULL;
+
+ PTP_CNT_INIT(ptp);
+ ptp.Code = PTP_OC_SONY_SetControlDeviceA;
+ ptp.Param1 = propcode;
+ ptp.Nparam = 1;
+ size = ptp_pack_DPV(params, value, &dpv, datatype);
+ ret = ptp_transaction(params, &ptp, PTP_DP_SENDDATA, size, &dpv, NULL);
+ free(dpv);
+ return ret;
+}
+
+uint16_t
+ptp_sony_setdevicecontrolvalueb (PTPParams* params, uint16_t propcode,
PTPPropertyValue *value, uint16_t datatype)
{
PTPContainer ptp;
@@ -3100,7 +3121,7 @@ ptp_generic_setdevicepropvalue (PTPParams* params, uint16_t propcode,
if ( (params->deviceinfo.VendorExtensionID == PTP_VENDOR_SONY) &&
ptp_operation_issupported(params, PTP_OC_SONY_SetControlDeviceB)
)
- return ptp_sony_setdevicecontrolvalue (params, propcode, value, datatype);
+ return ptp_sony_setdevicecontrolvaluea (params, propcode, value, datatype);
return ptp_setdevicepropvalue (params, propcode, value, datatype);
}
diff --git a/camlibs/ptp2/ptp.h b/camlibs/ptp2/ptp.h
index 1886b55cc..397a918a8 100644
--- a/camlibs/ptp2/ptp.h
+++ b/camlibs/ptp2/ptp.h
@@ -948,6 +948,8 @@ typedef struct _PTPObjectInfo PTPObjectInfo;
#define PTP_OFC_CANON_MOV2 0xb105
/* CHDK specific raw mode */
#define PTP_OFC_CANON_CHDK_CRW 0xb1ff
+/* Sony */
+#define PTP_OFC_SONY_RAW 0xb101
/* MTP extensions */
#define PTP_OFC_MTP_MediaCard 0xb211
#define PTP_OFC_MTP_MediaCardGroup 0xb212
@@ -2332,7 +2334,7 @@ struct _PTPParams {
/* PTP: Device Property Caching */
PTPDeviceProperty *deviceproperties;
- int nrofdeviceproperties;
+ unsigned int nrofdeviceproperties;
/* PTP: Canon specific flags list */
PTPCanon_Property *canon_props;
@@ -2849,7 +2851,9 @@ uint16_t ptp_nikon_writewifiprofile (PTPParams* params, PTPNIKONWifiProfile* pro
uint16_t ptp_sony_sdioconnect (PTPParams* params, uint32_t p1, uint32_t p2, uint32_t p3);
uint16_t ptp_sony_get_vendorpropcodes (PTPParams* params, uint16_t **props, unsigned int *size);
uint16_t ptp_sony_getalldevicepropdesc (PTPParams* params);
-uint16_t ptp_sony_setdevicecontrolvalue (PTPParams* params, uint16_t propcode,
+uint16_t ptp_sony_setdevicecontrolvaluea (PTPParams* params, uint16_t propcode,
+ PTPPropertyValue* value, uint16_t datatype);
+uint16_t ptp_sony_setdevicecontrolvalueb (PTPParams* params, uint16_t propcode,
PTPPropertyValue* value, uint16_t datatype);
/**
* ptp_nikon_deletewifiprofile: