Commit Graph

7832 Commits

Author SHA1 Message Date
Marcus Meissner
12ce4ce163 only free objectinfo when we got a new one, https://github.com/gphoto/gphoto2/issues/493 2022-03-20 11:17:59 +01:00
Marcus Meissner
0715318cf8 fixed another memory corruption
fixes https://github.com/gphoto/libgphoto2/issues/774
2022-03-10 16:55:02 +01:00
Marcus Meissner
4bf39024c9 rename the m531 new id... seems to be a dup otherwise 2022-03-05 13:44:41 +01:00
Marcus Meissner
260b764f01 ssync from libmtp 2022-03-05 13:41:14 +01:00
Marcus Meissner
340b0c8d65 added kodak m531 2022-02-28 17:29:51 +01:00
Marcus Meissner
e7d1b1e208 we need to copy over objectinfo, as oi.Storage is used... https://github.com/gphoto/libgphoto2/issues/770 2022-02-12 16:14:39 +01:00
Alexandr Shevchenko
ae1b23a013 merge from libmtp 2022-01-31 10:52:26 +01:00
Marcus Meissner
1bb8d8e9dc added sony dsc-w830 debug 2022-01-31 09:40:44 +01:00
Marcus Meissner
59bcb27a50 warning fixes for recent panasonic commit 2022-01-23 17:12:49 +01:00
Marcus Meissner
fca76c5bd7 sony fnumber needs to return the current setting even if not in list 2022-01-23 17:12:49 +01:00
Hans Ulrich Niedermann
3fa40feb46 pragma away the warnings for GNU style initializer designators
Use #pragma to allow GNU style range designators in the
camlibs/pentax/js0n.c state machine table initializers.
2022-01-22 16:38:42 +01:00
Hans Ulrich Niedermann
6cbdd744b8 Allow clang compile with initializer overrides
This catches clang in a clang specific C preprocessor conditional
before clang gets a chance to mess up at pretending to be gcc.

The camlibs/pentax/js0n.c state machine tables use a lot of both
GNU style range designators [ a ... b ], and later overrides some
of the values in the range. This is not very pure C, but relatively
effient to code, so we can accept silencing some warnings here.

Fixes: https://github.com/gphoto/libgphoto2/issues/761
2022-01-22 16:38:42 +01:00
Marcus Meissner
12676bbb86 added hp photosmart e331 2022-01-22 16:01:05 +01:00
Marcus Meissner
1c0520f9de added NULL ptr check to property case 2022-01-22 13:36:40 +01:00
Marcus Meissner
0310c50d09 free objectinfo only if we got and objectinfo (OK reply) , fixes https://github.com/gphoto/gphoto2/issues/480 2022-01-19 14:12:04 +01:00
Marcus Meissner
dd8ef92154 add some safety measures to get config 2022-01-18 17:19:01 +01:00
Bart H. Plague
fac2ae7aa2 Added PTP support for Panasonic BGH1 2022-01-18 10:36:29 +01:00
Marcus Meissner
4602672a02 added nikon d6 as reported 2022-01-12 17:05:03 +01:00
Marcus Meissner
d873d06c8a added zv-e10 to default wait on start
https://github.com/gphoto/gphoto2/issues/477
2022-01-10 09:54:50 +01:00
Miloš Komarčević
2cc7f01553 Fix lumix linking on mingw 2022-01-07 09:32:59 +01:00
Marcus Meissner
07a2176e11 keep canon eos remotemode=1 on exit, to keep the display on
https://github.com/gphoto/gphoto2/issues/465
2022-01-03 10:30:12 +01:00
Marcus Meissner
8c2ee45f8d sync from libmtp 2021-12-29 16:08:33 +01:00
Marcus Meissner
1bcb968969 fix camera name, fixes https://github.com/gphoto/libgphoto2/issues/754 2021-12-27 13:36:07 +01:00
Marcus Meissner
2df30adbc0 adjust hex id to have 4 digits, fixes https://github.com/gphoto/libgphoto2/issues/753 2021-12-20 11:05:54 +01:00
Ole Dalgaard
b2d8e106ae Add Nikon Zfc support 2021-12-09 16:58:41 +01:00
Marcus Meissner
1411713cf5 remove dup k1 2021-12-08 12:02:54 +01:00
Marcus Meissner
87685f8af1 added Sony ILCE-7RM4A https://github.com/gphoto/libgphoto2/issues/749 2021-12-08 11:24:34 +01:00
Marcus Meissner
200520d212 added pentax k1 id 2021-12-06 14:42:33 +01:00
Marcus Meissner
efaa845934 aded sony sx-hx80 2021-12-06 13:57:25 +01:00
Marcus Meissner
4bd1999aaf added pentax k1
https://github.com/gphoto/gphoto2/issues/469
2021-12-06 13:57:25 +01:00
Marcus Meissner
67b9668d6b added pentax k1 2021-12-06 13:57:25 +01:00
Wolfram Sang
bd1591ea87 ptp2: add Canon IXUS 132 2021-12-03 13:31:39 +01:00
tomsch1
056cf78bff Create sony-a7r3a.txt
Added description for Sony ILCE-7RM3A
2021-11-29 13:44:10 +01:00
tomsch1
25d0eadafa Update library.c
Added USB id for Sony ILCE-7RM3A
2021-11-29 13:44:10 +01:00
Marcus Meissner
3833721e85 fixed an uninit variable 2021-11-23 13:46:31 +01:00
Marcus Meissner
0a276d832d factor out more instances of 'add handle to filesystem' 2021-11-21 16:29:57 +01:00
Marcus Meissner
7d3f1b7143 factory out 2 more instances for standardized object adding 2021-11-21 11:21:10 +01:00
Marcus Meissner
204d41b26e Factored out more things into add_object_to_fs_and_path helper
(tested: nikon z, and eos m6 m2)
2021-11-21 11:15:44 +01:00
Marcus Meissner
4099bca723 we need to refetch the ptp object after get_folder_from_handle, as that call might invalidatze the poionter 2021-11-20 15:52:28 +01:00
Hans Ulrich Niedermann
b6fae4fcce ptp2/ptp.c: Rewrite PTP_CNT_INIT to build with pure C99
This rewrites the variadic macro PTP_CNT_INIT() and the ptp_init_container()
function such that they compile with the strictest compiler available:

    clang -std=c99 -pedantic -Wall -Wextra -Weverything

This is achieved by moving the code argument to be the first of the
variable arguments, and adapting the parameter counting and argument
handling inside ptp_init_container() accordingly.

As the code in ptp_init_container() which handles the va_args and puts
them into PTPContainer Param<N> fields relies on a particular memory
layout of the PTPContainer struct, this adds compile time assertions
which check the memory layout is the one the code expects.

Closes: https://github.com/gphoto/libgphoto2/pull/740
2021-11-12 00:54:39 +01:00
Hans Ulrich Niedermann
8527242022 ptp2/ptp.c: tell emacs the c-file-style 2021-11-11 23:41:48 +01:00
Marcus Meissner
9e0efee77b handle motorola as MTP... fixes https://github.com/gphoto/gphoto2/issues/463 2021-11-07 17:28:26 +01:00
Marcus Meissner
3b52c7a967 sync from libmtp
also fixes https://github.com/gphoto/gphoto2/issues/463
2021-11-07 17:24:23 +01:00
Marcus Meissner
b42d16c92f added creative auto mode dial setting 2021-11-07 17:16:31 +01:00
Hans Ulrich Niedermann
ea00220b6f Update the checks for libjpeg (GP_LIBJPEG)
Update the checks for libjpeg to try libjpeg.pc with
PKG_CHECK_MODULES first, and also to allow explicitly
set LIBJPEG_CFLAGS and LIBJPEG_LIBS.

The old detection logic did not allow specifying the location
of libjpeg at all. It only allowed either disabling libjpeg
or using libjpeg from the default include and linker paths.

So this also changes the places in the Makefiles where we
used to add @LIBJPEG@ to the linker to both link with
$(LIBJPEG_LIBS) and compile with $(LIBJPEG_CFLAGS).

The new configure logic keeps --without-jpeg to force-
disable libjpeg, but updates the detection of libjpeg
to first try the LIBJPEG_* variables if given, otherwise
try PKG_CHECK_MODULES for libjpeg, and only then falls
back to the old way of just trying the default include
and link locations for libjpeg.

This mentions more information in the configure summary
if not building with libjpeg.

This is the first time we make it possible to build with
libjpeg from e.g. FreeBSD ports' or MacOS homebrew's
jpeg-turbo packages.
2021-11-03 22:02:49 +01:00
Marcus Meissner
6950d1681d avoid duplicate mvoie / liveview prohibition code strings for translation 2021-10-31 11:53:38 +01:00
Hans Ulrich Niedermann
7205701c7d POTFILES.in: Add remaining source files using i18n.h
Add remaining source files including libgphoto2/i18n.h
or libgphoto2_port/i18n.h to the respective POTFILES.in,
regardless of whether or not the source file actually
contains translated strings.
2021-10-25 06:51:34 +02:00
Hans Ulrich Niedermann
0b2b6207c2 Factor out i18n stuff into separate i18n.h files
Factor out the i18n definitions into i18n.h include files:
One include file each for libgphoto2 and for libgphoto2_port.

This removes the complete

    #ifdef ENABLE_NLS
    #  include <libintl.h>
    #  undef _
    #  define _(String) dgettext (GETTEXT_PACKAGE, String)
    #  ifdef gettext_noop
    #    define N_(String) gettext_noop (String)
    #  else
    #    define N_(String) (String)
    #  endif
    #else
    #  define _(String) (String)
    #  define N_(String) (String)
    #endif

block (which in some occasions defines even more macros)
and replaces it with a single line

    #include "libgphoto2/i18n.h"

for camlibs and libgphoto2 itself and with

    #include "libgphoto2_port/i18n.h"

for iolibs and libgphoto2_port itself.

This gives us two central locations to change the defintions.
2021-10-25 00:20:21 +02:00
Hans Ulrich Niedermann
208a49c263 tp6081-dump: include <unistd.h> for close(2), add more static 2021-10-25 00:18:07 +02:00
David Rosca
967897cd85 ptp2: Reload object info on PTP_CANON_EOS_CHANGES_TYPE_OBJECTINFO_CHANGE 2021-10-22 13:27:07 +02:00