* Add support for Sony 'Live Display: Setting Effect ON/OFF'.
This setting toggles exposure preview on the live view / preview image.
* Add support for Sony A7R3/A7R3A 'Focus Area' settings.
Co-authored-by: Mark Watson <watsonmw@gmai.com>
Note that this skips the 'make distcheck' stage due to two reasons:
* GitHub considers macOS cpu cycles to be very expensive, and
distcheck basically doubles the build cycles
* For reasons yet unknown, 'make distcheck' on macOS fails with
the compiler being unable to create an executable.
* Wrap unsafe libltdl calls with locking
https://github.com/gphoto/libgphoto2/issues/166
* 848: do not install internal header gphoto2-port-mutex.h
* 848: wrap symbol declarations in #ifdef _GPHOTO2_INTERNAL_CODE
* 848: Use proper include guard macro
* 848: Encapsulate the lock/unlock code inside functions
This hides the pthread usage as an implementation detail inside the
gpi_libltdl_lock() and gpi_libltdl_unlock() functions.
* 848: Rename from *-mutex.[ch] to *-locking.[ch]
The *-lock.[ch] name is implementation neutral.
* 848: update libgphoto2_port version number
* 848: internal headers do not require __cplusplus checks
* 848: add copyright comment at the beginning of *.[ch]
* 848: add an unlocked variant of gp_abilities_list_load_dir to avoid lots of unlock/lock codes
* 848: remove unnecessary whitespace addition
Co-authored-by: kadler15 <spurfan15@gmail.com>
Co-authored-by: Hans Ulrich Niedermann <hun@n-dimensional.de>
`read` can (and, in my case, did) return partial result instead of reading the whole number of bytes provided, leading to errors.
I replaced `open` / `read` with `fopen` / `fread` instead, which don't suffer from this issue, as well as extracted into a helper function.
- Consumers won't have to guess the path (which depends on the version of the library).
- Consumers don't have to have access to the path (/usr/share/...) might be readonly to them.
- Consumer can point VCAMERADIR to a temporary directory, ensuring a clean slate before each test.
I've noticed in my tests that for many files the CameraFileInfo incorrectly had `info.audio` marked as available (with various flags).
Thanks to valgrind I found that it's because `CameraFileInfo` is zero-filled in some places, but not others, so the `audio.fields` (as well as entire `audio`) was filled with uninitialized data.
I tried to find all usages of `info.file.fields = ...` and `info.preview.fields = ...` and zero-initialize them in the same way as it already is in other places.