Commit Graph

7816 Commits

Author SHA1 Message Date
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
David Rosca
1866f1803c filesys: Add gp_filesystem_set_info_dirty
Use it in ptp2 PTP_EC_ObjectInfoChanged.
2021-10-22 13:27:07 +02:00
Marcus Meissner
6afb51faea emit a FILE CHANGED event if the ObjectInfo changes.
e.g. if you select "protect" on the camera.
2021-10-20 14:14:53 +02:00
Marcus Meissner
334dd3132e only ovbrwrite the PEF header for the K100D.
see https://github.com/gphoto/gphoto2/issues/459
2021-10-17 17:34:01 +02:00
Marcus Meissner
0e30b685a3 added pentax k3 II in ptzp mode 2021-10-16 11:10:13 +02:00
David Rosca
d42e11a98e ptp2: Disconnect PTP/IP connection in camera_exit 2021-10-14 17:28:34 +02:00
Hans Ulrich Niedermann
45cd04e329 Rename bayer.[ch] to stv0680-bayer.[ch]
To make it obvious that this is specific to the stv0680 camlib,
rename its bayer.[ch] source files to stv0680-bayer.[ch].

This is not strictly necessary, but should help when someone
new to it reads the stv0680 source.
2021-10-11 09:20:50 +02:00
Hans Ulrich Niedermann
767ee8bad4 Avoid accidental include file name collisions
There are five libgphoto2 internal *.h include files inside the
source tree's `libgphoto2/` folder. Internal means they are part
of the libgphoto2 implementation, and are not part of the public
libgphoto2 API or ABI. These files have names which are so
generic that it is difficult to see from a `#include` statement
that the included file is actually part of libgphoto2:

    bayer-types.h
    bayer.h
    exif.h
    gamma.h
    jpeg.h

While building, an additional file is created inside the `libgphoto2/`
folder with a name which does hint to its relationship with libgphoto2:

    gphoto2-endian.h

To reduce the probability of accidental conflicts with include files
which might also be called the same very generic name, this changes
the use of these include files to a preprocessor directive like

    #include "libgphoto2/bayer.h>

instead of

    #include "bayer.h"

To enforce the need for the "libgphoto2/" part in the #include
preprocessor directive, this also removes the respective `-I`
arguments for the `libgphoto2` subdir (both in source tree and in
build tree) from `*_CPPFLAGS`.

This change was inspired by `libgphoto2/` and `camlibs/stv0680/`
containing very different include files both called `bayer.h`.
2021-10-11 09:20:50 +02:00
Hans Ulrich Niedermann
f1f09cefea utf-8: convert old camlibs/**/*.txt files from latin1
This converts the old camlibs/**/*.txt files from iso-8859-1
to utf-8.
2021-10-09 10:50:07 +02:00
Hans Ulrich Niedermann
b01e0ff433 utf-8: change xml/html from iso-8859-1 to utf-8 2021-10-09 10:50:07 +02:00
Hans Ulrich Niedermann
6fdc5f8f37 utf-8: Convert ISO-8859 text to UTF-8
Convert the easy ISO-8859 text to UTF-8.

The difficult ISO-8859 text will will be eliminated
by future commits.
2021-10-09 10:50:07 +02:00
Hans Ulrich Niedermann
9cb01c2641 Use a single definition of BayerTile enum
Use a single definition of BayerTile enum inside a new
include file bayer-types.h instead of (conditionally!)
duplicating the definition from libgphoto2/bayer.h to
camlibs/stv680-demosaic-sharpen.h.
2021-10-07 00:04:30 +02:00
Marcus Meissner
eb0430ab31 fix build after bayer.h change 2021-10-06 10:48:31 +02:00
Hans Ulrich Niedermann
0dbeaf7cbf Use consistently named non-reserved CPP macros for header files
C preprocessor macros beginning/ending with underscores are
reserved for system use as well as macros containing a double
underscore anywhere, so application software macros are
supposed to be named differently.

For a header file gphoto2-abilities-list.h, this
consistently uses a macro name
LIBGPHOTO2_GPHOTO2_ABILITIES_LIST_H
for the usual

    #ifndef LIBGPHOTO2_GPHOTO2_ABILITIES_LIST_H
    #define LIBGPHOTO2_GPHOTO2_ABILITIES_LIST_H
    ... content of the header file ...
    #endif /* !defined(LIBGPHOTO2_GPHOTO2_ABILITIES_LIST_H) */

Found using "clang -Weverything".

This should work, unless when run with an ancient C preprocessor
which might only the first 8 or 10 characters to distinguish
macro names and ignores the remainder of the name.
2021-10-05 16:07:20 +02:00
Marcus Meissner
bacd412861 emit only matching resetuilock if we did setuilock 2021-10-04 13:52:47 +02:00
Marcus Meissner
12f59ff596 fixed return code from unprepare capture during EOS exit
https://github.com/jim-easterbrook/python-gphoto2/issues/128
https://github.com/gphoto/libgphoto2/issues/352
2021-10-04 13:27:52 +02:00
Hans Ulrich Niedermann
04539528d4 Use proper format string for FDHANDLE type
Use %d for int, and %p for GPPort *.

The old %x was inappropriate for both.
2021-10-03 17:05:41 +02:00