Compare commits

...

5 Commits

Author SHA1 Message Date
Bastien Nocera
f8aa82a554 0.4.0 2011-04-18 18:02:37 +01:00
Bastien Nocera
1451a2dde2 build: Quiet by default 2011-04-08 15:38:33 +01:00
Sergio Cerlesi
d2e957683f Added support for Validity VFS101
USB ID 138a:0001
2011-04-08 15:37:03 +01:00
Sergio Cerlesi
a3ae96c214 Fix function fpi_im_resize on create new image
The function fpi_im_resize copy the new resized image into old fp_img
instead of newimg so, new image is empty and often it generated a
segmentation fault error.
2011-02-22 19:14:02 +00:00
Sergio Cerlesi
3dd905d4e9 Fix return timeout of fp_get_next_timeout
On function fp_get_next_timeout if exist fprint timeout or libusb
timeout the function return the smaller of they.

But if one of that not exist and have a smaller value the function
return a timeout that not exist.
2011-02-18 13:59:28 +00:00
8 changed files with 1613 additions and 3 deletions

6
NEWS
View File

@@ -1,6 +1,12 @@
This file lists notable changes in each release. For the full history of all
changes, see ChangeLog.
2011-04-18: v0.4.0 release
* Add support for Validity VFS101 (USB ID 138a:0001)
* Fix crasher when resizing a fingerprint image
* Fix wrong timeout being returned when either of
libusb or libfprint doesn't have a timeout
2010-09-08: v0.3.0 release
* Add support for UPEK TCS4C (USB ID 147e:1000)
* Use NSS instead of OpenSSL for GPL compliance

View File

@@ -1,9 +1,12 @@
AC_INIT([libfprint], [0.3.0])
AC_INIT([libfprint], [0.4.0])
AM_INIT_AUTOMAKE([1.11 dist-bzip2 no-dist-gzip check-news])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([libfprint/core.c])
AM_CONFIG_HEADER([config.h])
# Enable silent build when available (Automake 1.11)
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AC_PREREQ([2.50])
AC_PROG_CC
AC_PROG_LIBTOOL
@@ -20,7 +23,7 @@ AC_SUBST(lt_major)
AC_SUBST(lt_revision)
AC_SUBST(lt_age)
all_drivers="upeke2 upekts upektc upeksonly vcom5s uru4000 fdu2000 aes1610 aes2501 aes4000"
all_drivers="upeke2 upekts upektc upeksonly vcom5s uru4000 fdu2000 aes1610 aes2501 aes4000 vfs101"
require_imaging='no'
require_aeslib='no'
@@ -34,6 +37,7 @@ enable_fdu2000='no'
enable_aes1610='no'
enable_aes2501='no'
enable_aes4000='no'
enable_vfs101='no'
AC_ARG_WITH([drivers],[AS_HELP_STRING([--with-drivers],
[List of drivers to enable])],
@@ -88,6 +92,10 @@ for driver in `echo ${drivers} | sed -e 's/,/ /g' -e 's/,$//g'`; do
require_imaging="yes"
enable_aes4000="yes"
;;
vfs101)
AC_DEFINE([ENABLE_VFS101], [], [Build Validity VFS101 driver])
enable_vfs101="yes"
;;
esac
done
@@ -102,6 +110,7 @@ AM_CONDITIONAL([ENABLE_AES1610], [test "$enable_aes1610" = "yes"])
AM_CONDITIONAL([ENABLE_AES2501], [test "$enable_aes2501" = "yes"])
AM_CONDITIONAL([ENABLE_AES4000], [test "$enable_aes4000" = "yes"])
AM_CONDITIONAL([REQUIRE_AESLIB], [test "$require_aeslib" = "yes"])
AM_CONDITIONAL([ENABLE_VFS101], [test "$enable_vfs101" = "yes"])
PKG_CHECK_MODULES(LIBUSB, [libusb-1.0 >= 0.9.1])
@@ -263,6 +272,11 @@ if test x$enable_aes4000 != xno ; then
else
AC_MSG_NOTICE([ aes4000 driver disabled])
fi
if test x$enable_vfs101 != xno ; then
AC_MSG_NOTICE([** vfs101 driver enabled])
else
AC_MSG_NOTICE([ vfs101 driver disabled])
fi
if test x$require_aeslib != xno ; then
AC_MSG_NOTICE([** aeslib helper functions enabled])
else

View File

@@ -12,6 +12,7 @@ AES2501_SRC = drivers/aes2501.c drivers/aes2501.h
AES4000_SRC = drivers/aes4000.c
FDU2000_SRC = drivers/fdu2000.c
VCOM5S_SRC = drivers/vcom5s.c
VFS101_SRC = drivers/vfs101.c
EXTRA_DIST = \
$(UPEKE2_SRC) \
@@ -24,6 +25,7 @@ EXTRA_DIST = \
$(AES4000_SRC) \
$(FDU2000_SRC) \
$(VCOM5S_SRC) \
$(VFS101_SRC) \
aeslib.c aeslib.h \
imagemagick.c \
gdkpixbuf.c
@@ -122,6 +124,10 @@ if ENABLE_AES4000
DRIVER_SRC += $(AES4000_SRC)
endif
if ENABLE_VFS101
DRIVER_SRC += $(VFS101_SRC)
endif
if REQUIRE_IMAGEMAGICK
OTHER_SRC += imagemagick.c
libfprint_la_CFLAGS += $(IMAGING_CFLAGS)

View File

@@ -368,6 +368,9 @@ static struct fp_img_driver * const img_drivers[] = {
#ifdef ENABLE_AES1610
&aes1610_driver,
#endif
#ifdef ENABLE_VFS101
&vfs101_driver,
#endif
/*#ifdef ENABLE_UPEKTC
&upektc_driver,
#endif

1570
libfprint/drivers/vfs101.c Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -265,6 +265,9 @@ extern struct fp_img_driver fdu2000_driver;
#ifdef ENABLE_VCOM5S
extern struct fp_img_driver vcom5s_driver;
#endif
#ifdef ENABLE_VFS101
extern struct fp_img_driver vfs101_driver;
#endif
extern libusb_context *fpi_usb_ctx;
extern GSList *opened_devices;

View File

@@ -75,7 +75,7 @@ struct fp_img *fpi_im_resize(struct fp_img *img, unsigned int factor)
for (x = 0; x < newimg->width; x++) {
guchar *p, *r;
r = img->data + y * img->width + x;
r = newimg->data + y * newimg->width + x;
p = pixels + y * rowstride + x * 3;
r[0] = p[0];
}

View File

@@ -270,6 +270,14 @@ API_EXPORTED int fp_get_next_timeout(struct timeval *tv)
if (r_fprint == 0 && r_libusb == 0)
return 0;
/* if fprint have no pending timeouts return libusb timeout */
else if (r_fprint == 0)
*tv = libusb_timeout;
/* if libusb have no pending timeouts return fprint timeout */
else if (r_libusb == 0)
*tv = fprint_timeout;
/* otherwise return the smaller of the 2 timeouts */
else if (timercmp(&fprint_timeout, &libusb_timeout, <))
*tv = fprint_timeout;