1. Add separate stream for motion images.
2. Add separate stream for source images from camera.
3. Add additional preview option(3) for showing live stream next to motion stream.
4. Add additional preview option(4) for showing source images from camera.
5. Refactor webu_stream to improve efficiency
6. Improved shutdown process for webu_streams.
7. Revised variable name in webu_html to correlate with what it contains.(camid instead of thrd)
Revisions to configuration options.
1. Revise config options to be `movie_` and `picture_`
2. Revise config options to align with topic and code.
* motion_video_pipe, ipv6_enabled, rtsp_uses_tcp
* switchfilter, logfile, process_id_file
3. Revise depreciated options to still be valid for webcontrol and config files.
4. Revise distributed config files to only include most common options
5. Revise sequence of config options to be arranged by topic.
6. Revise code to use names consistent with config parms.
7. Revise manual, guide and code to specify same default values.
8. Update guide and manual to reflect revised option names.
Implement micro-httpd for providing webcontrol and streams
1. Add tls support for webcontrol and streams. aka ssl/tls, https
2. Add functionality to provide streams on single port
3. Add functionality for additional authentication methods of webcontrol.
4. Add functionality for providing static images
5. Update documentation for new functionality.
6. Resolve issue with stream_preview_newline
7. Add functionality for specifying camera in webcontrol and streams via camera_id
8. Depreciated functionality to specify substream via port
9. Add functionality to specify substream via a URL
10. Revise `quit` to only be available via text (programmatic) interface
11. Added functionality for CORS header on webcontrol interface
Closes#526Closes#661Closes#709Closes#737Closes#750
Use the same timestamp for FILECREATE and FILECLOSE events
Propagate timestamp to the FILECREATE and FILECLOSE events, so the
timestamp available for the "Conversion Specifiers" for SQL queries
matches the timestamp used in filenames.
Move FILE_CREATE event call from picture.c:put_picture() to its calling functions in event.c.
Add new option to execute a SQL query on the FILECLOSE event
Don't try to execute empty sqlquery strings
Always clear result with PQclear
Improve Postgresql error handling
Don't regard PGRES_TUPLES_OK status as error.
Print Postgresql error status and error message on error.
* Timelapse Options
1. Revise the configuration options to have some of the timelapse options use distinct configuration values.
Closes#43
* Whitespace
* 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.
* Change how the path access is verified. Instead of creating a dummy file use access() function
* Extpipe path check improvement
* Minor extpipe event path check code optimization
* 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
1. Revise the PTS to allow for the capture of the first image by revising the initialization of last_pts
2. Elminate the incrementing by 1 when we have timing issues since this puts all subsequent
frames out of sync with timing/pts problems
3. Unref the packets when encode and PTS functions return errors to prevent leaks.
4. Revise logging to report more values when in test mode.
We eliminate gaps in movie by resetting movie start time. By doing so,
we unintentionally reset the PTS value that has to be monotonically
increasing. This fixes it by offsetting the PTS value by a base PTS
value.
Signed-off-by: Joo Aun Saw <jasaw81@gmail.com>
* 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
Only basic webp compression is supported (the only tunable is 0-100%
compression adjustment), without EXIF metadata.
Motion build scripts are configured to build in the support by default
and will emit an error if the needed library is missing. Suport can be
manualy disabled at configuration stage adding --without-libwebp.
Documentation update will follow in a separate commit.
Tested on x86-64 Linux only.
This update removes the components for v4l and implements only
the v4l2 and BSD option. This commit also consolidates some
of the pre-processor directives and only uses the WITHOUT_V4L2
instead of the multiple. The checks for the HAVE_LINUX_VIDEODEV2_H
were removed from the code because the WITHOUT_V4L2 is actually
set based upon the existance of the HAVE_LINUX_VIDEODEV2_H.
Finally, this renames some files to be more consistent.
The previous method for calculating the PTS was to extract the time when
the particular function was being executed. e.g. The time when the open
ffmpeg function was executed, the time that the image was encoded into the
movie. This commit revises that behaviour to use instead the timevalues
that are attached to each image. This is done to handle the precapture
situation in which all the precapture images were sent in at once at the
start of the event. For the open function, the timevalue is obtained
from the oldest image in the ring buffer.
This commit revises the time variable that is attached to the images
this revises from the tm structure to a timevalue structure so that we
can get to a precision level of greater than one second.
1. Consolidate the HAVE_FFMPEG pre-processor directives that are scattered
through the code into the ffmpeg.c module. This makes it so that a single
pre-processor check can be used rather than surrounding every call scattered
through the code.
2. Always compile/include the ffmpeg.c module
The current definitions (char codec_swf[3] = "swf" etc) are declared
one character too short resulting in stack corruption or crashes in
some cases.
To avoid the possibility of an error at all, we change ffmpeg_open to
take a const char * as it doesn't need to alter the string.
Closes https://github.com/Mr-Dave/motion/issues/109