The (Object) Handle member is not part of the "ObjectInfo dataset" in the
specification but added here to avoid having to carry it around by
separate means throughout the code base, as it is regularly required in
combination. While the spec always refers to this item as "ObjectHandle",
the term "Handle" is only used in this context, so we omit the
"Object"-prefix for brevity.
Switching from oid/ObjectID, which is nowere to be found the spec,
increases consistency with the spec and the rest of the code base.
This allows to remove the struct _PTPCanon_New_Object from the codebase.
@msmeissn I added 2 TODO comments for you take a close look, pointing out:
* a memory leak that I did not want to touch because I can't test it
* a presumed bug fix where newobject was 0 when passed to ptp_getobject
The "_len"-suffix to denote the length of an array of values is more
readable than the "nrof"-prefix and also used 3 times more often in the
rest of the code base.
Also replace the params->deviceproperties name with params->dpd_cache to
make it clearer what it actually is: an array of cached DevicePropDesc
structs.
The PTPDeviceInfo struct contains information about the Operations, Events,
DeviceProperties, ImageFormats and CaptureFormats. With 3 of those 5 the
variables contained the additional "Supported" string, which does not add
any discriminating value and only makes for very long and therefore less
readable code lines and it is inconsistent.
Also use the term "DeviceProps" here as well for brevity and consistency.
There are lots of other symbols like GetDevicePropValue that use the short
version "PropValue" already. Also the variables of this type are also most
often called "propval".
The terms ObjectCompressedSize and ThumbCompressedSize come from the PTP
specification. But I find them to be overly verbose because there is no
other size than this "compressed" size.
Other places like the CameraFileInfoFile struct also use the term "size"
instead of "compressed_size" for the same thing.
With the re-enabled FocusInfoEx, the 5Ds spams the log and the
--wait-event console output with a 64 entry long focus info list.
Assuming no tooling is dependent on the particular string format of the
FocusInfoEx value, since it seems to only ever contain a no-empty
set of selected AF-points at the beginning of the capture process, where
the event is 'swollowed' by the focus detection code. This changeset
strips it down to only contain the list of selected AF-points, meaning
without focus, we now get a simple "{}".
Furthermore, the olcmask 0x0100 (FocusInfo) data of the 5Ds, R8 and R5m2
has been analyzed and the in-focus detection code during trigger_capture
has been improved. See code comments for details.
I believe this was broken since
99dceba032
With my 5Ds the datasize and size are always equal (which is how I would
expect it to be). Hence I always got a "bad size" value back.
Makefile cleanups:
* sipix/blink.c is already in _SOURCES, no need for EXTRA_DIST
* Formatting fix for quicktake Makefile
* Formatting fix for largan lmini Makefile
The EOS event handling code was partly using the term "change_entry" or
"entry" when referring to an event. I found this unnecessarily confusing.
This is mostly a symbol rename patch:
* PTPCanon_changes_entry -> PTPCanonEOSEvent
* PTP_CANON_EOS_CHANGES_TYPE_* -> PTP_EOSEvent_*
* entry -> event
* backlogentries -> eos_events
* type -> ec (event code)
* proptype -> dpc (device property code)
* a few more ptp_unpack internal offset constants renamed
The current `imageformat` with it's table lookup for every RAW+JPEG
combination became cumbersome to maintain and outdated. This leads to
e.g. lost of unsupported JPEG variants for e.g. the 5Ds, R5m2, 1DX.
The used naming also became inconsistent with the addition of the 1DXm2
labels in 1402f88d1a
This patch adds an (incompatible) new imageformat2 widget as a temporary
test to then hopefully replace the existing imageformat. I expect this new
implementation to fix all "Unknown value" occurrences of all currently
available EOS cameras.
I chose to do away with the verbose and arbitrary labels like
"Smaller Fine JPEG" and instead tried to mimic the strings that are
actually used by the cameras, like 'S2', etc. I added a 'c' for the
higher compression versions, along the lines of 'cRAW'. The 'c' could
also stand for 'coarse' to describe the blocky curve that is used by the
Canons to distinguish between lower and higher Jpeg quality.
Here is some sample output from the 5Ds:
Choice: 5 cM2
Choice: 6 S1
Choice: 7 cS1
Choice: 8 S2
Choice: 9 S3
Choice: 10 RAW + L
Choice: 11 RAW + cL
Choice: 12 RAW + M1
Choice: 13 RAW + cM1
This brings my original ptp_unpack_EOS_ImageFormat() documentation
up-to-date with new M1/M2 and new 0/1 compression info added with 5Ds,
1DXm2 and R5m2.
It also fixes the problem that led to a double entry of e.g. `RAW` in the
imageformat config output visible in #1028 and also in the 1DX sample here:
5b7f7c168d/camlibs/ptp2/cameras/canon-eos-1dx.txt (L255-L269)
Generally looking for MTP prop names when searching for a Canon prop was
the wrong approach. This leads to "Aperture" beeing called "Secure Time".
Instead just copy the 3 MTP prop names actually required into the
Canon prop name list.