* Fix pthread_setname_np detection
Commit 6617c6f2c8 replaced
AC_LINK_IFELSE with AC_COMPILE_IFELSE. This has broken the
pthread_setname_np detection as compilation will always succeed even if
pthread_setname_np is not available (if the function is not found, a
simple warning will be displayed in config.log).
The correct fix is to put back AC_LINK_IFELSE with -pthread in LIBS
otherwise compilation will fail on toolchain without pthread_setname_np.
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
* Check for pthread_getname_np
On some toolchains (like musl), pthread_setname_np is available but not
pthread_getname_np so add this check in configure.ac
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
* Revision for detection of XSI vs GNU variants of strerror
* High Resolution
Refactor the netcam_rtsp module and associated image variables to allow for processing a dual stream from rtsp cameras.
Continue the process of segregating the functionality of the netcams into distinct modules based upon their function.
* Changed MOTION_LOG macro and remover "%s:" from the format string
Function name will be now auto added
* Re-applied log-update after conflict resolution
* Some old style logging still remaining, updated
We add a simple wrapper #define to hide the difference between the
Mac and other platforms version of this function. The tests should
cover all our supported platforms, so remove the configure test.
Remove option ipv6_enabled (IPv6 is always enabled)
Add option localhost_ipv4 (the user must choose to listen to IPv4 and IPv6 localhost, only relevant when the localhost option is set to on)
Based on a commit originally by Chris Roberts <86montecarlo@gmail.com>
camera_name allows naming of threads, is displayed in the motion control
webpage, and a new specifier (%$) added enabling it to be used for
filenames and such.
The changes I have made since Chris's commit:
1. Change format specifier for threadname from %E to %$
This avoids clashing with any known strftime format specifiers.
(According to the Debian stable strftime man page - it seems we've
already used all spare letters to mean other things.)
2. Behaviour if camera_name is not set is now unchanged
(Previous it would display "thread 1 -- NULL" if the thread name was
unset, and I don't believe how printf deals with NULL values for %s
specifiers is guaranteed.)
3. Thread name is reflected into the system thread name
Uses pthread_setname_np. There's a autoconf test for it, which looks
for the version that takes the thread id and thread name. I believe
this should work on all recent linux, and maybe other platforms too.
(It won't work on macOS; autoconf will disable it - but I deliberately
always use the pthread_setname_np(pthread_self(), name) form so that
it could easily be adapted for macOS in the future.)
4. The parameter has been renamed from thread_name to camera_name, as
that seems to better reflect how the user will see it.