Skip to content

Commit

Permalink
Merge pull request #1 from gphoto/master
Browse files Browse the repository at this point in the history
upstream sync
  • Loading branch information
elijahparker authored Apr 10, 2017
2 parents 467c92a + 767b244 commit 04e69a0
Show file tree
Hide file tree
Showing 53 changed files with 9,287 additions and 2,411 deletions.
24 changes: 23 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
libgphoto2 2.5.12.1 development release
libgphoto2 2.5.13.1 development release
------------------------------------------------------------------------------
libgphoto2 2.5.13 release

pentax:
* Now using the pktriggercord codebase
* lots of improvements
* Please report missing Pentax K USB ids that are supported by pktriggercord!

ptp2:
* iPhone iOS 10.2 and later storage handling fixed, added dynamic storage handling
* Sony Alpha Live View support.
* Canon EOS M series capture enabled. (not fully working yet)
* Various crashes and endless loops fixed that were found by the AFL fuzzer.
* Various bugfixes in Nikon, Canon capture
* New USB Ids:
* Sony: SLT A37, DSC-RX100M5
* Nikon KeyMission 360
* Canon PowerShot G16
* Canon EOS M5, EOS M10
* Fuji Fujifilm XT-2
* GoPro Hero 5 Black

------------------------------------------------------------------------------
libgphoto2 2.5.12 release

Expand Down
4 changes: 2 additions & 2 deletions camlibs/enigma13/enigma13.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ static char* enigma13_static_toc=NULL;
static int enigma13_about (Camera *camera, CameraText *about, GPContext *context)
{
strcpy (about->text, _("Download program for Digital Dream Enigma 1.3. "
"by <[email protected]>, and adapted from spca50x driver."
"Thanks you, spca50x team, it was easy to port your driver on this cam! "));
"by <[email protected]>, and adapted from spca50x driver. "
"Thank you, spca50x team, it was easy to port your driver on this cam! "));
return (GP_OK);
}

Expand Down
41 changes: 29 additions & 12 deletions camlibs/konica/qm150.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,22 @@
* information header and use this number with all functions !!
*/

#define _BSD_SOURCE
#define _DEFAULT_SOURCE

#include "config.h"

#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <gphoto2/gphoto2-library.h>
#include <gphoto2/gphoto2-result.h>
#include <gphoto2/gphoto2-port-log.h>
#include <exif.h>

#ifdef HAVE_LIBEXIF
# include <libexif/exif-data.h>
# include <libexif/exif-utils.h>
#endif


#ifdef ENABLE_NLS
# include <libintl.h>
Expand Down Expand Up @@ -334,11 +340,13 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
CameraFileType type, CameraFile *file, void *data,
GPContext *context)
{
unsigned char *d,*thumbnail;
unsigned char *d;
int image_number, image_no, len, ret;
long long_len;
CameraFileInfo file_info;
exifparser exifdat;
#ifdef HAVE_LIBEXIF
ExifData *ed;
#endif

GP_DEBUG ("*** ENTER: get_file_func ***");

image_no = gp_filesystem_number(fs, folder, filename, context);
Expand Down Expand Up @@ -366,7 +374,6 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
break;
case GP_FILE_TYPE_PREVIEW:
len = file_info.preview.size;
long_len = (long)len;
if (!(d = (unsigned char *)malloc(len)))
return (GP_ERROR_NO_MEMORY);
ret = k_getdata(image_no, GP_FILE_TYPE_PREVIEW, len,
Expand All @@ -375,13 +382,23 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
free(d);
return ret;
}
exifdat.header = d;
exifdat.data = d+12;
thumbnail = gpi_exif_get_thumbnail_and_size(&exifdat,
&long_len);
#ifdef HAVE_LIBEXIF
ed = exif_data_new_from_data ((unsigned char*)d, len);
if (ed->data) {
gp_file_set_mime_type (file, GP_MIME_JPEG);
ret = gp_file_append(file, (char*)ed->data, ed->size);
exif_data_unref (ed);
free (d);
return GP_OK;
}
exif_data_unref (ed);
free(d);
d = thumbnail;
break;
return GP_ERROR_NOT_SUPPORTED;
#else
gp_context_error(context, _("Compiled without EXIF support, no thumbnails available."));
free(d);
return GP_ERROR_NOT_SUPPORTED;
#endif
case GP_FILE_TYPE_EXIF:
len = file_info.preview.size;
if (!(d = (unsigned char *)malloc(len)))
Expand Down
2 changes: 2 additions & 0 deletions camlibs/minolta/dimagev/data.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

#include "config.h"

#include <stdio.h>

#include "dimagev.h"

#define GP_MODULE "dimagev"
Expand Down
2 changes: 2 additions & 0 deletions camlibs/minolta/dimagev/dimagev.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

#include "config.h"

#include <stdio.h>

#ifdef ENABLE_NLS
# include <libintl.h>
# undef _
Expand Down
2 changes: 0 additions & 2 deletions camlibs/minolta/dimagev/dimagev.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@
#include <gphoto2/gphoto2.h>
#include <gphoto2/gphoto2-port.h>

#include <exif.h>

#define DIMAGEV_VERSION "$Revision$"

/* These are the repsonse codes. */
Expand Down
17 changes: 0 additions & 17 deletions camlibs/minolta/dimagev/download.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ int dimagev_get_picture(dimagev_t *dimagev, int file_number, CameraFile *file) {
dimagev_packet *p, *r;
unsigned char char_buffer, command_buffer[3];
char *data;
#ifdef _gphoto_exif_
exifparser exifdat;
#endif

if ( dimagev->data->host_mode != (unsigned char) 1 ) {

Expand Down Expand Up @@ -190,20 +187,6 @@ int dimagev_get_picture(dimagev_t *dimagev, int file_number, CameraFile *file) {
return GP_ERROR_IO;
}

#ifdef _gphoto_exif_
exifdat.header = (unsigned char *)data;
exifdat.data = (unsigned char *)data + 12 ;

if ( gpi_exif_stat(&exifdat) != 0 ) {
GP_DEBUG( "dimagev_get_picture::unable to stat EXIF tags");
free(data);
return GP_OK;
}

/* gpi_exif_dump(&exifdat); */

#endif

gp_file_set_data_and_size (file, data, size);

return GP_OK;
Expand Down
2 changes: 2 additions & 0 deletions camlibs/minolta/dimagev/info.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

#include "config.h"

#include <stdio.h>

#include "dimagev.h"

#define GP_MODULE "dimagev"
Expand Down
2 changes: 2 additions & 0 deletions camlibs/minolta/dimagev/packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

#include "config.h"

#include <stdio.h>

#include "dimagev.h"

#define GP_MODULE "dimagev"
Expand Down
4 changes: 2 additions & 2 deletions camlibs/pentax/Makefile-files
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# -*- Makefile -*-

EXTRA_DIST += pentax/README.pentax pentax/ChangeLog
EXTRA_DIST += pentax/README.pentax pentax/ChangeLog pentax/exiftool_pentax_lens.txt

camlibdoc_DATA += pentax/README.pentax
EXTRA_LTLIBRARIES += pentax.la

pentax_la_SOURCES = pentax/pslr.c pentax/pslr.h pentax/library.c
pentax_la_SOURCES = pentax/pslr.c pentax/library.c pentax/pslr_enum.c pentax/pslr_lens.c pentax/pslr_model.c pentax/pslr_enum.h pentax/pslr.h pentax/pslr_lens.h pentax/pslr_model.h pentax/pslr_scsi.h pentax/exiftool_pentax_lens.txt
pentax_la_CFLAGS = $(AM_CFLAGS) $(NO_UNUSED_CFLAGS) $(CFLAGS) -DLIBGPHOTO2
pentax_la_LDFLAGS = $(camlib_ldflags)
pentax_la_DEPENDENCIES = $(camlib_dependencies)
Expand Down
Loading

0 comments on commit 04e69a0

Please sign in to comment.