1. Add eventstart/eventend as options for webcontrol api.
2. Revise action names on webcontrol html.
3. Revise variable name in code from makemovie to event_stop.
4. Revise some code indentation for code-folding in IDE
Closes#796
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
In commit da556d7 (store the value of 'camera_dir'), a memory leak
was introduced due to not freeing this memory in context_destroy().
I followed the advice in PR #639 to correct this.
Valgrind was used to find this leak and test for successful fixing.
Config included a 'camera_dir' with two camera config files.
Command ran: valgrind --leak-check=full ./bin/motion -n
Before:
HEAP SUMMARY:
in use at exit: 91,538 bytes in 13 blocks
total heap usage: 4,227 allocs, 4,214 frees, 20,448,321 bytes allocated
126 bytes in 3 blocks are definitely lost in loss record 8 of 11
at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x406A6D: mymalloc (motion.c:3401)
by 0x40D0CF: mystrdup (conf.c:2687)
by 0x40D30C: mystrcpy (conf.c:2664)
by 0x40D30C: copy_string (conf.c:2470)
by 0x40D565: read_camera_dir (conf.c:2883)
by 0x40CA10: conf_process (conf.c:2034)
by 0x40D850: conf_load (conf.c:2236)
by 0x407063: cntlist_create (motion.c:2876)
by 0x407063: motion_startup (motion.c:2930)
by 0x4052B7: main (motion.c:3128)
LEAK SUMMARY:
definitely lost: 126 bytes in 3 blocks
indirectly lost: 0 bytes in 0 blocks
possibly lost: 0 bytes in 0 blocks
still reachable: 91,412 bytes in 10 blocks
suppressed: 0 bytes in 0 blocks
After:
HEAP SUMMARY:
in use at exit: 91,412 bytes in 10 blocks
total heap usage: 4,201 allocs, 4,191 frees, 20,447,579 bytes allocated
LEAK SUMMARY:
definitely lost: 0 bytes in 0 blocks
indirectly lost: 0 bytes in 0 blocks
possibly lost: 0 bytes in 0 blocks
still reachable: 91,412 bytes in 10 blocks
suppressed: 0 bytes in 0 blocks
* Rename 'lightswitch' to 'lightswitch_percent' and properly deprecate the old option
* Add 'lightswitch_frames' for how many frames to ignore Defaulting to the original '5' and set a hard range of '1-1000'
* Updated config guide and supplied example config
Also updated the 'lightswitch_percent' comments in the config to match those in conf.c
Closes#686
1. Revert to just capturing time directly rather than in a routine.
2. Check for null format context pointer before writing trailer.
3. Terminate movie when lost connection.
4. Clean up context when failed resize.
5. Unlock mutex on failed first image.
6. Fix memory leak when recovering from watchdog timeout.
1. Revise v4l2 for new control option of vid_control_params
2. Refactor most of the video_v4l2.c code
3. Revisions required for video_bktr.c
4. Revise sequence for configuration parms on webui to ensure similar parameters are together.
Closes#363Closes#551Closes#552Closes#582Closes#608Closes#613
* 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
Implement a new configuration option which allows users to specify the
type of parameters which can be accessed via the webcontrol page. The
new option permits levels 0(none) to 3(restricted) with a default of
none. This option is to enhance the security associated with the
application for users that may expose the webcontrol port publicly.
Close#515
* 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.
* Add a runtime argument to dump config options
In order to simplify support requests, we can now dump all enabled
config options to the log(file), with argument 'o' for 'options'.
Any likely sensitive information will be redacted.
* Documentation update for dump config argument
1. Revise the developer warnings to treat all warnings as errors
2. Revise a few of the comparisons of signed to unsigned.
3. Isolate the setjmp to separate function since it is warning on 14.04
4. Remove redundant clang OSX test since gcc is really clang according to travis logs
* 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