summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--camlibs/lumix/lumix.c8
-rw-r--r--camlibs/ptp2/cameras/canon-eos-m50.txt689
-rw-r--r--camlibs/ptp2/cameras/sony-nex5.txt61
-rw-r--r--camlibs/ptp2/config.c61
-rw-r--r--camlibs/ptp2/library.c20
-rw-r--r--camlibs/ptp2/ptp.h3
6 files changed, 832 insertions, 10 deletions
diff --git a/camlibs/lumix/lumix.c b/camlibs/lumix/lumix.c
index 5cb8ee450..d465f333d 100644
--- a/camlibs/lumix/lumix.c
+++ b/camlibs/lumix/lumix.c
@@ -1893,12 +1893,8 @@ camera_init (Camera *camera, GPContext *context)
}
gp_filesystem_set_funcs (camera->fs, &fsfuncs, camera);
-/*
- startup code might need:
-
- loadCmd(camera,"cam.cgi?mode=accctrl&type=req_acc&value=4D454930-0100-1000-8001-020D0090325B&value2=GT-I9300");
- loadCmd(camera,"cam.cgi?mode=setsetting&type=device_name&value=GT-I9300");
-*/
+ loadCmd(camera,"cam.cgi?mode=accctrl&type=req_acc&value=0&value2=libgphoto2/lumix");
+ loadCmd(camera,"cam.cgi?mode=setsetting&type=device_name&value=libgphoto2/lumix");
if (switchToRecMode (camera) != NULL) {
int numpix;
diff --git a/camlibs/ptp2/cameras/canon-eos-m50.txt b/camlibs/ptp2/cameras/canon-eos-m50.txt
index 8436bd285..2b7acee52 100644
--- a/camlibs/ptp2/cameras/canon-eos-m50.txt
+++ b/camlibs/ptp2/cameras/canon-eos-m50.txt
@@ -3445,3 +3445,692 @@ event 242: EOS event OLCInfoChanged (size 90)
79: 00
80: 00
81: 00
+
+/main/actions/syncdatetimeutc
+Label: Synchronize camera date and time with PC
+Readonly: 0
+Type: TOGGLE
+Current: 0
+END
+/main/actions/syncdatetime
+Label: Synchronize camera date and time with PC
+Readonly: 0
+Type: TOGGLE
+Current: 0
+END
+/main/actions/uilock
+Label: UI Lock
+Readonly: 0
+Type: TOGGLE
+Current: 2
+END
+/main/actions/autofocusdrive
+Label: Drive Canon DSLR Autofocus
+Readonly: 0
+Type: TOGGLE
+Current: 0
+END
+/main/actions/manualfocusdrive
+Label: Drive Canon DSLR Manual focus
+Readonly: 0
+Type: RADIO
+Current: None
+Choice: 0 Near 1
+Choice: 1 Near 2
+Choice: 2 Near 3
+Choice: 3 None
+Choice: 4 Far 1
+Choice: 5 Far 2
+Choice: 6 Far 3
+END
+/main/actions/cancelautofocus
+Label: Cancel Canon DSLR Autofocus
+Readonly: 0
+Type: TOGGLE
+Current: 0
+END
+/main/actions/eoszoom
+Label: Canon EOS Zoom
+Readonly: 0
+Type: TEXT
+Current: 0
+END
+/main/actions/eoszoomposition
+Label: Canon EOS Zoom Position
+Readonly: 0
+Type: TEXT
+Current: 0,0
+END
+/main/actions/viewfinder
+Label: Canon EOS Viewfinder
+Readonly: 0
+Type: TOGGLE
+Current: 2
+END
+/main/actions/eosremoterelease
+Label: Canon EOS Remote Release
+Readonly: 0
+Type: RADIO
+Current: None
+Choice: 0 None
+Choice: 1 Press Half
+Choice: 2 Press Full
+Choice: 3 Release Half
+Choice: 4 Release Full
+Choice: 5 Immediate
+Choice: 6 Press 1
+Choice: 7 Press 2
+Choice: 8 Press 3
+Choice: 9 Release 1
+Choice: 10 Release 2
+Choice: 11 Release 3
+END
+/main/actions/opcode
+Label: PTP Opcode
+Readonly: 0
+Type: TEXT
+Current: 0x1001,0xparam1,0xparam2
+END
+/main/settings/datetimeutc
+Label: Camera Date and Time
+Readonly: 0
+Type: DATE
+Current: 1589491752
+Printable: gio 14 mag 2020, 23:29:12
+Help: Use 'now' as the current time when setting.
+
+END
+/main/settings/datetime
+Label: Camera Date and Time
+Readonly: 0
+Type: DATE
+Current: 1589491752
+Printable: gio 14 mag 2020, 23:29:12
+Help: Use 'now' as the current time when setting.
+
+END
+/main/settings/output
+Label: Camera Output
+Readonly: 0
+Type: RADIO
+Current: Unknown value 0008
+Choice: 0 Off
+Choice: 1 TFT
+Choice: 2 PC
+Choice: 3 TFT + PC
+Choice: 4 Setting 4
+Choice: 5 Setting 5
+Choice: 6 Setting 6
+Choice: 7 Setting 7
+Choice: 8 Unknown value 0008
+Choice: 9 Unknown value 0009
+Choice: 10 Unknown value 000a
+Choice: 11 Unknown value 000b
+END
+/main/settings/movierecordtarget
+Label: Recording Destination
+Readonly: 0
+Type: RADIO
+Current: Unknown value 0003
+Choice: 0 Card
+Choice: 1 None
+Choice: 2 Unknown value 0003
+END
+/main/settings/evfmode
+Label: EVF Mode
+Readonly: 0
+Type: RADIO
+Current: 1
+Choice: 0 1
+END
+/main/settings/ownername
+Label: Owner Name
+Readonly: 0
+Type: TEXT
+Current:
+END
+/main/settings/artist
+Label: Artist
+Readonly: 0
+Type: TEXT
+Current:
+END
+/main/settings/copyright
+Label: Copyright
+Readonly: 0
+Type: TEXT
+Current:
+END
+/main/settings/focusarea
+Label: Focus Area
+Readonly: 0
+Type: TEXT
+Current: 1431656279
+END
+/main/settings/autopoweroff
+Label: Auto Power Off
+Readonly: 0
+Type: TEXT
+Current: 60
+END
+/main/settings/depthoffield
+Label: Depth of Field
+Readonly: 0
+Type: TEXT
+Current: 0
+END
+/main/settings/capturetarget
+Label: Capture Target
+Readonly: 0
+Type: RADIO
+Current: Memory card
+Choice: 0 Internal RAM
+Choice: 1 Memory card
+END
+/main/settings/capture
+Label: Capture
+Readonly: 0
+Type: TOGGLE
+Current: 0
+END
+/main/status/serialnumber
+Label: Serial Number
+Readonly: 0
+Type: TEXT
+Current: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+END
+/main/status/manufacturer
+Label: Camera Manufacturer
+Readonly: 0
+Type: TEXT
+Current: Canon.Inc
+END
+/main/status/cameramodel
+Label: Camera Model
+Readonly: 0
+Type: TEXT
+Current: Canon EOS M50
+END
+/main/status/deviceversion
+Label: Device Version
+Readonly: 0
+Type: TEXT
+Current: 3-1.0.1
+END
+/main/status/vendorextension
+Label: Vendor Extension
+Readonly: 0
+Type: TEXT
+Current: None
+END
+/main/status/model
+Label: Camera Model
+Readonly: 0
+Type: TEXT
+Current: 1042
+END
+/main/status/Battery Level
+Label: Battery Level
+Readonly: 1
+Type: TEXT
+Current: 67%
+END
+/main/status/batterylevel
+Label: Battery Level
+Readonly: 0
+Type: TEXT
+Current: 50%
+END
+/main/status/lensname
+Label: Lens Name
+Readonly: 0
+Type: TEXT
+Current: EF-M22mm f/2 STM
+END
+/main/status/eosserialnumber
+Label: Serial Number
+Readonly: 0
+Type: TEXT
+Current: 663044008624
+END
+/main/status/availableshots
+Label: Available Shots
+Readonly: 0
+Type: TEXT
+Current: 28859
+END
+/main/imgsettings/imageformat
+Label: Image Format
+Readonly: 0
+Type: RADIO
+Current: RAW + Large Fine JPEG
+Choice: 0 Large Fine JPEG
+Choice: 1 Large Normal JPEG
+Choice: 2 Medium Fine JPEG
+Choice: 3 Medium Normal JPEG
+Choice: 4 Small Fine JPEG
+Choice: 5 Small Normal JPEG
+Choice: 6 Smaller JPEG
+Choice: 7 RAW + Large Fine JPEG
+Choice: 8 RAW + Large Normal JPEG
+Choice: 9 RAW + Medium Fine JPEG
+Choice: 10 RAW + Medium Normal JPEG
+Choice: 11 RAW + Small Fine JPEG
+Choice: 12 RAW + Small Normal JPEG
+Choice: 13 RAW + Smaller JPEG
+Choice: 14 Unknown value 0303
+Choice: 15 Unknown value 0302
+Choice: 16 Unknown value 0313
+Choice: 17 Unknown value 0312
+Choice: 18 Unknown value 03d3
+Choice: 19 Unknown value 03d2
+Choice: 20 Unknown value 03e3
+Choice: 21 RAW
+Choice: 22 Large Fine JPEG
+END
+/main/imgsettings/imageformatsd
+Label: Image Format SD
+Readonly: 0
+Type: RADIO
+Current: RAW + Large Fine JPEG
+Choice: 0 Large Fine JPEG
+Choice: 1 Large Normal JPEG
+Choice: 2 Medium Fine JPEG
+Choice: 3 Medium Normal JPEG
+Choice: 4 Small Fine JPEG
+Choice: 5 Small Normal JPEG
+Choice: 6 Smaller JPEG
+Choice: 7 RAW + Large Fine JPEG
+Choice: 8 RAW + Large Normal JPEG
+Choice: 9 RAW + Medium Fine JPEG
+Choice: 10 RAW + Medium Normal JPEG
+Choice: 11 RAW + Small Fine JPEG
+Choice: 12 RAW + Small Normal JPEG
+Choice: 13 RAW + Smaller JPEG
+Choice: 14 Unknown value 0303
+Choice: 15 Unknown value 0302
+Choice: 16 Unknown value 0313
+Choice: 17 Unknown value 0312
+Choice: 18 Unknown value 03d3
+Choice: 19 Unknown value 03d2
+Choice: 20 Unknown value 03e3
+Choice: 21 RAW
+Choice: 22 Large Fine JPEG
+END
+/main/imgsettings/imageformatcf
+Label: Image Format CF
+Readonly: 0
+Type: RADIO
+Current: RAW + Large Fine JPEG
+Choice: 0 Large Fine JPEG
+Choice: 1 Large Normal JPEG
+Choice: 2 Medium Fine JPEG
+Choice: 3 Medium Normal JPEG
+Choice: 4 Small Fine JPEG
+Choice: 5 Small Normal JPEG
+Choice: 6 Smaller JPEG
+Choice: 7 RAW + Large Fine JPEG
+Choice: 8 RAW + Large Normal JPEG
+Choice: 9 RAW + Medium Fine JPEG
+Choice: 10 RAW + Medium Normal JPEG
+Choice: 11 RAW + Small Fine JPEG
+Choice: 12 RAW + Small Normal JPEG
+Choice: 13 RAW + Smaller JPEG
+Choice: 14 Unknown value 0303
+Choice: 15 Unknown value 0302
+Choice: 16 Unknown value 0313
+Choice: 17 Unknown value 0312
+Choice: 18 Unknown value 03d3
+Choice: 19 Unknown value 03d2
+Choice: 20 Unknown value 03e3
+Choice: 21 RAW
+Choice: 22 Large Fine JPEG
+END
+/main/imgsettings/iso
+Label: ISO Speed
+Readonly: 0
+Type: RADIO
+Current: 100
+Choice: 0 Auto
+Choice: 1 100
+Choice: 2 125
+Choice: 3 160
+Choice: 4 200
+Choice: 5 250
+Choice: 6 320
+Choice: 7 400
+Choice: 8 500
+Choice: 9 640
+Choice: 10 800
+Choice: 11 1000
+Choice: 12 1250
+Choice: 13 1600
+Choice: 14 2000
+Choice: 15 2500
+Choice: 16 3200
+Choice: 17 4000
+Choice: 18 5000
+Choice: 19 6400
+Choice: 20 8000
+Choice: 21 10000
+Choice: 22 12800
+Choice: 23 16000
+Choice: 24 20000
+Choice: 25 25600
+Choice: 26 51200
+END
+/main/imgsettings/whitebalance
+Label: WhiteBalance
+Readonly: 0
+Type: RADIO
+Current: Manual
+Choice: 0 Auto
+Choice: 1 Unknown value 0017
+Choice: 2 Daylight
+Choice: 3 Shadow
+Choice: 4 Cloudy
+Choice: 5 Tungsten
+Choice: 6 Fluorescent
+Choice: 7 Flash
+Choice: 8 Manual
+Choice: 9 Color Temperature
+END
+/main/imgsettings/colortemperature
+Label: Color Temperature
+Readonly: 0
+Type: TEXT
+Current: 3000
+END
+/main/imgsettings/whitebalanceadjusta
+Label: WhiteBalance Adjust A
+Readonly: 0
+Type: RADIO
+Current: 0
+Choice: 0 -9
+Choice: 1 -8
+Choice: 2 -7
+Choice: 3 -6
+Choice: 4 -5
+Choice: 5 -4
+Choice: 6 -3
+Choice: 7 -2
+Choice: 8 -1
+Choice: 9 0
+Choice: 10 1
+Choice: 11 2
+Choice: 12 3
+Choice: 13 4
+Choice: 14 5
+Choice: 15 6
+Choice: 16 7
+Choice: 17 8
+Choice: 18 9
+END
+/main/imgsettings/whitebalanceadjustb
+Label: WhiteBalance Adjust B
+Readonly: 0
+Type: RADIO
+Current: 0
+Choice: 0 -9
+Choice: 1 -8
+Choice: 2 -7
+Choice: 3 -6
+Choice: 4 -5
+Choice: 5 -4
+Choice: 6 -3
+Choice: 7 -2
+Choice: 8 -1
+Choice: 9 0
+Choice: 10 1
+Choice: 11 2
+Choice: 12 3
+Choice: 13 4
+Choice: 14 5
+Choice: 15 6
+Choice: 16 7
+Choice: 17 8
+Choice: 18 9
+END
+/main/imgsettings/whitebalancexa
+Label: WhiteBalance X A
+Readonly: 0
+Type: TEXT
+Current: 0
+END
+/main/imgsettings/whitebalancexb
+Label: WhiteBalance X B
+Readonly: 0
+Type: TEXT
+Current: 0
+END
+/main/imgsettings/colorspace
+Label: Color Space
+Readonly: 0
+Type: RADIO
+Current: sRGB
+Choice: 0 sRGB
+Choice: 1 AdobeRGB
+END
+/main/capturesettings/zoomspeed
+Label: Zoom Speed
+Readonly: 0
+Type: TEXT
+Current: 0
+END
+/main/capturesettings/exposurecompensation
+Label: Exposure Compensation
+Readonly: 0
+Type: RADIO
+Current: 0
+Choice: 0 -3
+Choice: 1 -2.6
+Choice: 2 -2.3
+Choice: 3 -2
+Choice: 4 -1.6
+Choice: 5 -1.3
+Choice: 6 -1
+Choice: 7 -0.6
+Choice: 8 -0.3
+Choice: 9 0
+Choice: 10 0.3
+Choice: 11 0.6
+Choice: 12 1
+Choice: 13 1.3
+Choice: 14 1.6
+Choice: 15 2
+Choice: 16 2.3
+Choice: 17 2.6
+Choice: 18 3
+END
+/main/capturesettings/focusmode
+Label: Focus Mode
+Readonly: 0
+Type: RADIO
+Current: One Shot
+Choice: 0 One Shot
+END
+/main/capturesettings/continuousaf
+Label: Continuous AF
+Readonly: 0
+Type: RADIO
+Current: Off
+Choice: 0 Off
+Choice: 1 On
+END
+/main/capturesettings/aspectratio
+Label: Aspect Ratio
+Readonly: 0
+Type: RADIO
+Current: 3:2
+Choice: 0 3:2
+Choice: 1 4:3
+Choice: 2 16:9
+Choice: 3 1:1
+END
+/main/capturesettings/storageid
+Label: Storage Device
+Readonly: 0
+Type: TEXT
+Current: 00020001
+END
+/main/capturesettings/highisonr
+Label: High ISO Noise Reduction
+Readonly: 0
+Type: RADIO
+Current: Off
+Choice: 0 High
+Choice: 1 Low
+Choice: 2 Off
+Choice: 3 Normal
+Choice: 4 Multi-Shot
+END
+/main/capturesettings/autoexposuremode
+Label: Canon Auto Exposure Mode
+Readonly: 0
+Type: RADIO
+Current: AV
+Choice: 0 P
+Choice: 1 TV
+Choice: 2 AV
+Choice: 3 Manual
+Choice: 4 Bulb
+Choice: 5 A_DEP
+Choice: 6 DEP
+Choice: 7 Custom
+Choice: 8 Lock
+Choice: 9 Green
+Choice: 10 Night Portrait
+Choice: 11 Sports
+Choice: 12 Portrait
+Choice: 13 Landscape
+Choice: 14 Closeup
+Choice: 15 Flash Off
+END
+/main/capturesettings/drivemode
+Label: Drive Mode
+Readonly: 0
+Type: RADIO
+Current: Single
+Choice: 0 Single
+Choice: 1 Continuous high speed
+Choice: 2 Continuous low speed
+Choice: 3 Timer 10 sec
+Choice: 4 Timer 2 sec
+Choice: 5 Unknown value 0007
+END
+/main/capturesettings/picturestyle
+Label: Picture Style
+Readonly: 0
+Type: RADIO
+Current: Auto
+Choice: 0 Auto
+Choice: 1 Standard
+Choice: 2 Portrait
+Choice: 3 Landscape
+Choice: 4 Unknown value 0088
+Choice: 5 Neutral
+Choice: 6 Faithful
+Choice: 7 Monochrome
+Choice: 8 User defined 1
+Choice: 9 User defined 2
+Choice: 10 User defined 3
+END
+/main/capturesettings/aperture
+Label: Aperture
+Readonly: 0
+Type: RADIO
+Current: 2
+Choice: 0 2
+Choice: 1 2.2
+Choice: 2 2.5
+Choice: 3 2.8
+Choice: 4 3.2
+Choice: 5 3.5
+Choice: 6 4
+Choice: 7 4.5
+Choice: 8 5
+Choice: 9 5.6
+Choice: 10 6.3
+Choice: 11 7.1
+Choice: 12 8
+Choice: 13 9
+Choice: 14 10
+Choice: 15 11
+Choice: 16 13
+Choice: 17 14
+Choice: 18 16
+Choice: 19 18
+Choice: 20 20
+Choice: 21 22
+END
+/main/capturesettings/shutterspeed
+Label: Shutter Speed
+Readonly: 0
+Type: RADIO
+Current: 1
+Choice: 0 1
+END
+/main/capturesettings/meteringmode
+Label: Metering Mode
+Readonly: 0
+Type: RADIO
+Current: Evaluative
+Choice: 0 Evaluative
+Choice: 1 Partial
+Choice: 2 Spot
+Choice: 3 Center-weighted average
+END
+/main/capturesettings/bracketmode
+Label: Bracket Mode
+Readonly: 0
+Type: TEXT
+Current: 0
+END
+/main/capturesettings/aeb
+Label: Auto Exposure Bracketing
+Readonly: 0
+Type: RADIO
+Current: off
+Choice: 0 off
+Choice: 1 +/- 1/3
+Choice: 2 +/- 2/3
+Choice: 3 +/- 1
+Choice: 4 +/- 1 1/3
+Choice: 5 +/- 1 2/3
+Choice: 6 +/- 2
+END
+/main/other/d402
+Label: PTP Property 0xd402
+Readonly: 1
+Type: TEXT
+Current: Canon EOS M50
+END
+/main/other/d407
+Label: PTP Property 0xd407
+Readonly: 1
+Type: TEXT
+Current: 1
+END
+/main/other/d406
+Label: PTP Property 0xd406
+Readonly: 0
+Type: TEXT
+Current: Unknown Initiator
+END
+/main/other/d303
+Label: PTP Property 0xd303
+Readonly: 1
+Type: TEXT
+Current: 1
+END
+/main/other/5001
+Label: Battery Level
+Readonly: 1
+Type: MENU
+Current: 67
+Choice: 0 100
+Choice: 1 0
+Choice: 2 75
+Choice: 3 0
+Choice: 4 50
+END
diff --git a/camlibs/ptp2/cameras/sony-nex5.txt b/camlibs/ptp2/cameras/sony-nex5.txt
new file mode 100644
index 000000000..ff1a01dc3
--- /dev/null
+++ b/camlibs/ptp2/cameras/sony-nex5.txt
@@ -0,0 +1,61 @@
+Camera summary:
+Manufacturer: Sony Corporation
+Model: Sony Digital Still Camera
+ Version: (null)
+
+Capture Formats:
+Display Formats: Script, JPEG
+
+Device Capabilities:
+ File Download, No File Deletion, File Upload
+ No Image Capture, No Open Capture, No vendor specific capture
+
+Storage Devices Summary:
+store_00020001:
+ StorageDescription: None
+ VolumeLabel: None
+ Storage Type: Removable RAM (memory card)
+ Filesystemtype: Generic Hierarchical
+ Access Capability: Read-Only
+ Maximum Capability: 31902400512 (30424 MB)
+ Free Space (Bytes): 24029200384 (22916 MB)
+ Free Space (Images): -1
+
+Device Property Summary:
+
+/main/actions/opcode
+Label: PTP Opcode
+Readonly: 0
+Type: TEXT
+Current: 0x1001,0xparam1,0xparam2
+END
+/main/status/serialnumber
+Label: Serial Number
+Readonly: 0
+Type: TEXT
+Current: None
+END
+/main/status/manufacturer
+Label: Camera Manufacturer
+Readonly: 0
+Type: TEXT
+Current: Sony Corporation
+END
+/main/status/cameramodel
+Label: Camera Model
+Readonly: 0
+Type: TEXT
+Current: Sony Digital Still Camera
+END
+/main/status/deviceversion
+Label: Device Version
+Readonly: 0
+Type: TEXT
+Current: None
+END
+/main/status/vendorextension
+Label: Vendor Extension
+Readonly: 0
+Type: TEXT
+Current: None
+END
diff --git a/camlibs/ptp2/config.c b/camlibs/ptp2/config.c
index b263f4baf..6c4981c62 100644
--- a/camlibs/ptp2/config.c
+++ b/camlibs/ptp2/config.c
@@ -3348,6 +3348,54 @@ static struct deviceproptableu8 nikon_hdrhighdynamic[] = {
};
GENERIC8TABLE(Nikon_HDRHighDynamic,nikon_hdrhighdynamic);
+static struct deviceproptableu8 nikon_aebracketstep[] = {
+ { N_("1/3 EV"), 0, 0 },
+ { N_("1/2 EV"), 1, 0 },
+ { N_("2/3 EV"), 2, 0 },
+ { N_("1 EV"), 3, 0 },
+ { N_("2 EV"), 4, 0 },
+ { N_("3 EV"), 5, 0 },
+};
+GENERIC8TABLE(Nikon_AEBracketStep,nikon_aebracketstep);
+
+static struct deviceproptableu8 nikon_wbbracketstep[] = {
+ { N_("1 EV"), 0, 0 },
+ { N_("2 EV"), 1, 0 },
+ { N_("3 EV"), 2, 0 },
+};
+GENERIC8TABLE(Nikon_WBBracketStep,nikon_wbbracketstep);
+
+static struct deviceproptableu8 nikon_adlbracketstep[] = {
+ { N_("Auto"), 0, 0 },
+ { N_("Low"), 1, 0 },
+ { N_("Normal"), 2, 0 },
+ { N_("High"), 3, 0 },
+ { N_("Extra high"), 4, 0 },
+};
+GENERIC8TABLE(Nikon_ADLBracketStep,nikon_adlbracketstep);
+
+static struct deviceproptableu8 nikon_bracketpattern[] = {
+ { N_("2 images (normal and under)"), 0, 0 },
+ { N_("2 images (normal and over)"), 1, 0 },
+ { N_("3 images (normal and 2 unders)"), 2, 0 },
+ { N_("3 images (normal and 2 overs)"), 3, 0 },
+ { N_("3 images (normal, under and over)"), 4, 0 },
+ { N_("5 images (normal, 2 unders and 2 overs)"), 5, 0 },
+ { N_("7 images (normal, 3 unders and 3 overs)"), 6, 0 },
+ { N_("9 images (normal, 4 unders and 4 overs)"), 7, 0 },
+ { N_("0 image"), 8, 0 },
+};
+GENERIC8TABLE(Nikon_BracketPattern,nikon_bracketpattern);
+
+static struct deviceproptableu8 nikon_adlbracketpattern[] = {
+ { N_("2 shots (Off -> User setting)"), 0, 0 },
+ { N_("3 shots (Off -> Low -> User setting)"), 1, 0 },
+ { N_("4 shots (Off -> Low -> Normal -> High)"), 2, 0 },
+ { N_("5 shots (Off -> Low -> Normal -> High -> Extra High)"), 3, 0 },
+ { N_("0 image"), 4, 0 },
+};
+GENERIC8TABLE(Nikon_ADLBracketPattern,nikon_adlbracketpattern);
+
static struct deviceproptableu8 nikon_hdrsmoothing[] = {
{ N_("Auto"), 3, 0 },
{ N_("Low"), 2, 0 },
@@ -8453,12 +8501,14 @@ static struct submenu camera_status_menu[] = {
{ N_("Battery Level"), "batterylevel", PTP_DPC_BatteryLevel, 0, PTP_DTC_UINT8, _get_BatteryLevel, _put_None },
{ N_("Battery Level"), "batterylevel", PTP_DPC_CANON_EOS_BatteryPower, PTP_VENDOR_CANON, PTP_DTC_UINT16, _get_Canon_EOS_BatteryLevel, _put_None },
{ N_("Battery Level"), "batterylevel", PTP_DPC_SONY_BatteryLevel, PTP_VENDOR_SONY, PTP_DTC_INT8, _get_SONY_BatteryLevel, _put_None },
- { N_("Camera Orientation"), "orientation", PTP_DPC_NIKON_CameraOrientation, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_CameraOrientation, _put_None },
{ N_("Mirror Up Status"), "mirrorupstatus", PTP_DPC_NIKON_MirrorUpStatus, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_OnOff_UINT8, _put_None },
{ N_("Mirror Up Shooting Count"),"mirrorupshootingcount", PTP_DPC_NIKON_MirrorUpReleaseShootingCount, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_INT, _put_None },
- { N_("Camera Orientation"), "orientation2", PTP_DPC_NIKON_AngleLevel, PTP_VENDOR_NIKON, PTP_DTC_INT32, _get_Nikon_AngleLevel, _put_None },
+ { N_("Continuous Shooting Count"),"continousshootingcount", PTP_DPC_NIKON_ContinousShootingCount, PTP_VENDOR_NIKON, PTP_DTC_UINT8,_get_INT, _put_None },
+ { N_("Camera Orientation"), "orientation", PTP_DPC_NIKON_CameraOrientation, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_CameraOrientation, _put_None },
+ { N_("Camera Orientation"), "orientation2", PTP_DPC_NIKON_AngleLevel, PTP_VENDOR_NIKON, PTP_DTC_INT32, _get_Nikon_AngleLevel, _put_None },
{ N_("Camera Orientation"), "orientation", PTP_DPC_CANON_RotationAngle, PTP_VENDOR_CANON, PTP_DTC_UINT16, _get_Canon_CameraOrientation, _put_None },
{ N_("Flash Open"), "flashopen", PTP_DPC_NIKON_FlashOpen, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_OnOff_UINT8, _put_None },
+ { N_("Active Folder"), "activefolder", PTP_DPC_NIKON_ActiveFolder, PTP_VENDOR_NIKON, PTP_DTC_UINT16, _get_INT, _put_None },
{ N_("Flash Charged"), "flashcharged", PTP_DPC_NIKON_FlashCharged, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_OnOff_UINT8, _put_None },
{ N_("Lens Name"), "lensname", PTP_DPC_NIKON_LensID, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_LensID, _put_None },
{ N_("Lens Name"), "lensname", PTP_DPC_CANON_EOS_LensName, PTP_VENDOR_CANON, PTP_DTC_STR, _get_STR, _put_None },
@@ -8713,6 +8763,13 @@ static struct submenu capture_settings_menu[] = {
{ N_("EV Step"), "evstep", PTP_DPC_NIKON_EVStep, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_EVStep, _put_Nikon_EVStep },
{ N_("Bracket Set"), "bracketset", PTP_DPC_NIKON_BracketSet, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_BracketSet, _put_Nikon_BracketSet },
{ N_("Bracket Order"), "bracketorder", PTP_DPC_NIKON_BracketOrder, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_BracketOrder, _put_Nikon_BracketOrder },
+ { N_("AE Bracketing Step"), "aebracketingstep", PTP_DPC_NIKON_AutoExposureBracketStep, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_AEBracketStep, _put_Nikon_AEBracketStep },
+ { N_("WB Bracketing Step"), "wbbracketingstep", PTP_DPC_NIKON_WhiteBalanceBracketStep, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_WBBracketStep, _put_Nikon_WBBracketStep },
+ { N_("AE Bracketing Pattern"), "aebracketingpattern", PTP_DPC_NIKON_AutoExposureBracketProgram,PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_BracketPattern, _put_Nikon_BracketPattern },
+ { N_("WB Bracketing Pattern"), "wbbracketingpattern", PTP_DPC_NIKON_WhiteBalanceBracketProgram,PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_BracketPattern, _put_Nikon_BracketPattern },
+ { N_("AE Bracketing Count"), "aebracketingcount", PTP_DPC_NIKON_AutoExposureBracketCount, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_INT, _put_None },
+ { N_("ADL Bracketing Pattern"), "adlbracketingpattern", PTP_DPC_NIKON_ADLBracketingPattern, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_ADLBracketPattern, _put_Nikon_ADLBracketPattern },
+ { N_("ADL Bracketing Step"), "adlbracketingstep", PTP_DPC_NIKON_ADLBracketingStep, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_ADLBracketStep, _put_Nikon_ADLBracketStep },
{ N_("Burst Number"), "burstnumber", PTP_DPC_BurstNumber, 0, PTP_DTC_UINT16, _get_INT, _put_INT },
{ N_("Burst Interval"), "burstinterval", PTP_DPC_BurstInterval, 0, PTP_DTC_UINT16, _get_Milliseconds, _put_Milliseconds },
{ N_("Maximum Shots"), "maximumshots", PTP_DPC_NIKON_MaximumShots, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_INT, _put_None },
diff --git a/camlibs/ptp2/library.c b/camlibs/ptp2/library.c
index 9d557d40c..eb613f7c8 100644
--- a/camlibs/ptp2/library.c
+++ b/camlibs/ptp2/library.c
@@ -919,6 +919,8 @@ static struct {
{"Sony:DSC-HX5V (PTP mode)", 0x054c, 0x0491, 0},
/* tux droid <gnutuxdroid@gmail.com> */
{"Sony:SLT-A55 (PTP mode)", 0x054c, 0x04a3, 0},
+ /* em33kay@gmail.com */
+ {"Sony:NEX5 (PTP mode)", 0x054c, 0x04a5, 0},
/* http://sourceforge.net/tracker/?func=detail&atid=358874&aid=3515558&group_id=8874 */
{"Sony:SLT-A35 (PTP mode)", 0x054c, 0x04a7, 0},
/* t.ludewig@gmail.com */
@@ -3033,7 +3035,9 @@ camera_capture_preview (Camera *camera, CameraFile *file, GPContext *context)
ptp_free_devicepropdesc (&dpd);
/* do not set it everytime, it will cause delays */
ret = ptp_canon_eos_getdevicepropdesc (params, PTP_DPC_CANON_EOS_EVFOutputDevice, &dpd);
- if ((ret == PTP_RC_OK) && (dpd.CurrentValue.u32 != 2)) {
+ /* see config.c what kind of values we have ... it seems to be a mask. bit 0 is TFT, bit 1 PC, bit 2 MOBILE, bit 3 MOBILE2? */
+ /* so lets see it only if it does not have any bit set (discounted bit 0) */
+ if ((ret == PTP_RC_OK) && ((dpd.CurrentValue.u32 & ~1) == 0)) {
/* 2 means PC, 1 means TFT */
val.u32 = 2;
C_PTP_MSG (ptp_canon_eos_setdevicepropvalue (params, PTP_DPC_CANON_EOS_EVFOutputDevice, &val, PTP_DTC_UINT32),
@@ -4806,6 +4810,7 @@ camera_olympus_omd_capture (Camera *camera, CameraCaptureType type, CameraFilePa
while (ptp_get_one_event(params, &event)) {
switch (event.Code) {
case 0xc002:
+ case PTP_EC_OLYMPUS_ObjectAdded: /* seen in newer traces, https://github.com/gphoto/gphoto2/issues/310 */
case PTP_EC_ObjectAdded:
newobject = event.Param1;
goto downloadfile;
@@ -6204,7 +6209,7 @@ sonyout:
return GP_OK;
}
if (params->deviceinfo.VendorExtensionID == PTP_VENDOR_GP_OLYMPUS_OMD)
- {
+ {
do {
C_PTP_REP (ptp_check_event (params));
@@ -6213,9 +6218,19 @@ sonyout:
GP_LOG_D ("received event Code %04x, Param 1 %08x", event.Code, event.Param1);
switch (event.Code) {
case 0xC002:
+ case PTP_EC_OLYMPUS_ObjectAdded:
case PTP_EC_ObjectAdded:
newobject = event.Param1;
goto downloadomdfile;
+ case PTP_EC_OLYMPUS_CaptureComplete:
+ *eventtype = GP_EVENT_CAPTURE_COMPLETE;
+ *eventdata = NULL;
+ return GP_OK;
+ case PTP_EC_OLYMPUS_PropChanged:
+ *eventtype = GP_EVENT_UNKNOWN;
+ C_MEM (*eventdata = malloc(strlen("PTP Property 0123 changed to 0x012345678")+1));
+ sprintf (*eventdata, "PTP Property %04x changed to 0x%08x", event.Param1, event.Param2);
+ return GP_OK;
default:
GP_LOG_D ("unexpected unhandled event Code %04x, Param 1 %08x", event.Code, event.Param1);
break;
@@ -6615,6 +6630,7 @@ camera_summary (Camera* camera, CameraText* summary, GPContext *context)
PTPStreamInfo streaminfo;
if ((1<<i) & propval.u32) {
+ APPEND_TXT ("\t");
switch (i) {
case 0: APPEND_TXT (_("Video"));
break;
diff --git a/camlibs/ptp2/ptp.h b/camlibs/ptp2/ptp.h
index 9d01603ec..e28f0e769 100644
--- a/camlibs/ptp2/ptp.h
+++ b/camlibs/ptp2/ptp.h
@@ -1138,6 +1138,9 @@ typedef struct _PTPIPHeader PTPIPHeader;
#define PTP_EC_PANASONIC_ObjectAdded 0xC108
#define PTP_EC_PANASONIC_ObjectAddedSDRAM 0xC109
+#define PTP_EC_OLYMPUS_CaptureComplete 0xC101 /* guessing */
+#define PTP_EC_OLYMPUS_ObjectAdded 0xC102
+#define PTP_EC_OLYMPUS_PropChanged 0xC108
/* constants for GetObjectHandles */
#define PTP_GOH_ALL_STORAGE 0xffffffff