Currently if "x${DISTRO}" isn't set to "Linux", unsafe header/library
path for cross-compilation such as '-I/usr/local/include' are used.
As a result, motion can't be cross-compiled, so change "x${DISTRO}" to
"${DISTRO}" as it seems that this was the intended use.
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
* Added <assert.h> to motion.h, so we can do assertions
* Changed the return-code semantics of rtsp_decode_video() and
rtsp_decode_packet() to a tristate: negative on error, zero if no
output is currently available, positive if output was successfully
obtained
* Assert that avcodec_send_packet() never returns AVERROR(EAGAIN)
(i.e. we never overfill the codec with packets)
* Treat AVERROR(EAGAIN) from avcodec_receive_frame() as a no-output,
non-error condition (it means we need to send more packets before we
can get a frame)
* Changed netcam_read_rtsp_image() to handle the case where the codec
has a frame ready for output without needing any new packets
* Simplified the logic in the netcam_read_rtsp_image() packet-read loop
* Improved wording of some log messages
* Removed needless variable initializations
Added libraries, include directories and extra source files to
enable a succesfull cross-compile with CMake.
Signed-off-by: Olivier Schonken <olivier.schonken@gmail.com>
When logging, use cnt->conf.netcam_url instead of rtsp->path, as the
latter may contain a security-sensitive "user:password@" string. We add
a new rtsp->netcam_url field that is a read-only pointer to the former.
Also, don't try to LOG("%s", NULL).
* Use a dedicated "active" flag to tell if a netcam->rtsp context is
connected and running, rather than checking
(netcam->rtsp->format_context != NULL), because the latter may be true
without a working connection
* netcam_open_codec() and netcam_rtsp_open_context() should not return 0
if something is wrong
* Pass a netcam context into netcam_interrupt_rtsp() instead of
netcam->rtsp so that the callback can check netcam->finish and react
appropriately to the shutdown signal
* Use openlog() and closelog() so that we don't leak a file descriptor
(hello Valgrind) when the program exits in syslog mode
* Update comments to reflect actual log text being generated
* Moved va_end() closer to its corresponding va_start()
* Define new LOGMODE_NONE mode so that we can close out logging
completely at program end
Resolve crash when decode returned invalid results
Catch interupts on opening netcam
Eliminate option to use h264 with videodevice
Revise configure for pthread
Revise config file to point to guide
This commit resolves some of the netcam v4l2 items and a few other
small issues
1. Use the correct return codes for the new function rtsp_decode_video
2. Silence the notices on reconnecting
3. Revise the v4l2 to video4linux2 for old libav versions
4. Add additional options for the input_format
5. Do not permit users to specify zero for camera height or width
6. Eliminates pthread detection
7. Revise the ffmpeg messages to INF
8. Adds H264 palette option
This commit adds functionality to use a v4l2 device via the netcam_url
option. This will allow for more v4l2 devices since the netcam_url
uses the ffmpeg libraries which should be able to to decode and transform
the unusual pixel formats and sizes.
* ffmpeg 3.1 Revisions
The ffmpeg versions after 3.1 eliminated the stream codec which was used
in many different ways in the previous code. This commit revises the ffmpeg
module to use smaller functions and eliminates the greyscale image handling
since all images are yuv.
* ffmpeg gop and pts
Gop: Revise the gop based upon the fps of the requested video
to make sure we get enough I frames for low fps videos.
PTS: Revise the PTS for the timelapse videos as well as permit
debug messages of the PTS when in test mode.
* Libav Problem
Closes#144
This commit includes:
1. Consolidate functions into appropriate modules
2. Rename modules to reflect contents (v4l2, bktr, common)
3. Combines v4l2 and bktr so they can be used together
4. Implements functional prefixes
5. Uses HAVE_V4L2, HAVE_BKTR instead of WITHOUT_
6. Include pthread_np.h for FreeBSD
The webp image format option is not available on older distributions
This commit revises the default for the webp to OFF. Once the older
distributions reach EOL, the default can be changed back to ON.