Wait for 3 empty frames before stopping the scan
The driver used to stop the scan immediately after an empty frame
(by checking for hist sum == 0), but it is possible to get empty
frames in the middle of the scan due to low finger pressure.
Waiting for 3 empty frames stop the driver wrongly aborting the scan
too early.
https://bugs.freedesktop.org/show_bug.cgi?id=56715
We can only create the udev rules file when we're not cross-compiling,
so allow people to disable updating the file when building from
tarballs.
If you run with --enable-udev-rules=no and the
60-fprint-autosuspend.rules doesn't exist, you're on your own.
Instead of hardcoding whatever the new fashion is every few months, which might
even differ between distributions, just put the rules where udev says we should.
https://bugs.freedesktop.org/show_bug.cgi?id=50426
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.
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.
The libfprint library is generally built with C calling conventions.
Which makes it difficult to link to C++ programs as it is.
This patch adds the support for linking with C++ code - by telling the C++
compiler to use C calling conventions for libfprint functions.
Reported-by: Guus Ellenkamp <guus@activediscovery.net>
Signed-off-by: Kunal Gangakhedkar <kunal.gangakhedkar@gmail.com>
Don't consider the scan complete unless theres at least
MIN_ROWS recorded or very long blank read occurred.
Typical problem spot: one brief touch before starting the
actual scan. Happens most commonly if scan is started from
before the first joint resulting in a gap after the inital touch.
http://lists.reactivated.net/pipermail/fprint/2009-December/001406.html
Check all the drivers for one that'll drive our device in
question, and prefer ones that have a discover() method that runs
successfully to a driver without such a method.
This allow drivers to both reject devices (if 2 drivers handle
the same USB IDs), or a single driver to handle variants of the
same device (through the devtype out value of the discover method).
Most fingerprint readers can be suspended safely, so use
the udev rules to autosuspend them when they appear.
The script itself contains whitelists and blacklists.
When imaging support is required, we prefer to use gdk-pixbuf,
as it's already on things like Live CDs.
Also fix the examples building against the system libfprint.