Commit Graph

126 Commits

Author SHA1 Message Date
Mr-DaveDev
b5b8496492 OpenBSD compile 2019-02-03 10:40:17 -07:00
Mr-DaveDev
37c088a933 Prevent movie_passthrough updates via webcontrol
Closes #836
2018-11-20 18:20:36 -07:00
Mr-DaveDev
ccea9a3690 Remove privacy mask areas from motion detection 2018-11-20 18:19:03 -07:00
Mr-DaveDev
0353dca523 Add threshold_maximum 2018-10-11 18:15:55 -06:00
Mr-DaveDev
ecfb537359 Remove legacy substream 2018-10-11 18:13:46 -06:00
Mr-DaveDev
5c95ed8fe2 Add eventstart and eventend for webcontrol
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
2018-09-08 19:28:02 -06:00
Mr-DaveDev
219a36e568 Generic Tracking
1.  Maintain a aggregate count of moves
2.  Send aggregate counts as negative when invoking center.

closes #690
2018-08-24 19:40:49 -06:00
Mr-DaveDev
cfde202388 Database Functions
1.  Resolve Sqlite3 equal NULL after watchdog
2.  Consolidate database routines in motion.c into dbse_ functions.

closes #521
2018-08-24 19:39:26 -06:00
Mr-DaveDev
029fc161cd Additional Stream Options
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)
2018-08-22 18:24:56 -06:00
Mr-DaveDev
5d863a19dc Revisions to configuration options
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.
2018-08-17 21:00:45 -06:00
Mr-DaveDev
3cd68cab49 Implement libmicrohttpd
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 #526 
Closes #661 
Closes #709 
Closes #737 
Closes #750
2018-08-01 20:20:15 -06:00
Mr-DaveDev
c1db494aaf Revisions to main
* Decompose the `main` function into calls to smaller functions
2018-06-11 19:01:26 -06:00
Mr-DaveDev
9b6297387b Replace webhttpd (#658)
Replace the webhttpd module with new webu and translation modules
2018-03-01 18:07:06 -07:00
Mr-DaveDev
7dad4b1e25 Remove redundant checks for image type 2018-02-25 13:12:18 -07:00
Mr-DaveDev
b856ac66ac Validate text_scale parameter
* Validate text_scale
2018-02-21 17:32:27 -07:00
Mr-DaveDev
288b9f7a01 pthread macro 2018-02-16 10:38:10 -07:00
jackxbritton
113ff690b5 Add text_scale config parameter. (#640)
Replace configuration parameter of `text_double` with `text_scale`

Closes #395
2018-02-10 17:40:27 -07:00
Mr-DaveDev
46b5f88140 Add vid_control_params and refactor video_v4l2.c
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 #363 
Closes #551 
Closes #552 
Closes #582 
Closes #608 
Closes #613
2018-01-31 18:50:08 -07:00
tosiara
4be1638499 Revise %{host} option and add %{ver}
Set the hostname when loading the configuration options and add a new conversion specifier for Motion version number.
2018-01-11 20:47:13 -07:00
Mr-DaveDev
631200a928 Pass Through
Implement pass through using concept from @iskunk fork.  

Closes #124
2017-12-30 07:54:55 -07:00
Mr-DaveDev
35cd0b37ac Remove defaults for SQL parameters 2017-12-17 11:21:24 -07:00
Mr-DaveDev
eef702b3d7 Fix builds on musl based systems
* 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
2017-12-09 15:42:16 -07:00
Mr-DaveDev
336734e44e Compiler Warnings (#535)
* 17.10 Compiler Revisions
* Config Changes
2017-11-06 18:55:39 -07:00
Mr-DaveDev
fbb3c2e022 Limit parameters available on webcontrol (#530)
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
2017-11-01 18:13:05 -06:00
Mr-DaveDev
69ad4fb350 High Resolution (#522)
* 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.
2017-10-28 17:29:16 -06:00
genius3000
c03a4f98cb Add a runtime argument to dump config options (#513)
* 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
2017-10-15 10:30:46 -06:00
tosiara
7d8ba03cfc Motion substream (#454)
Add option to output a sub-stream from Motion
2017-10-15 10:29:43 -06:00
MrDave
3b7164f7f9 Autotool Update
1.  Revised the MYSQL/PGSQL to search directories
2.  Revised the MYSQL/PGSQL to use the package config files if available.
3.  Revised the CPU options to honor the --without-optimizecpu option.
4.  Revised the include for MYSQL/PGSQL to conform with search and package results.
2017-08-27 14:42:03 -06:00
genius3000
5afafcb09f Flag files loaded by camera_dir
Add an (int) flag to the context structure to flag config files
loaded by `camera_dir`. We do this to skip writing them out
as separate `camera` lines.
Also fixed the printing of a blank line to the config when
printing out the default disabled `camera` line.
2017-08-16 23:55:14 -06:00
Joseph Heenan
ecd2f77f6d Merge pull request #385 from ffontaine/master
Put back the detection of pthread_setname_np, to fix builds on platforms using uclibc-ng or musl.
2017-07-20 09:45:15 +01:00
Diogo Gomes
667dd72ef2 minor improvements
indentation
shorted string comparison
2017-05-25 23:16:58 +01:00
Diogo Gomes
8c589bbc5a Image Flip
Addresses issue:

https://github.com/Motion-Project/motion/issues/325
2017-05-23 00:43:43 +01:00
Fabrice Fontaine
4b76ddaf96 Put back the detection of pthread_setname_np
pthread_setname_np is a nonstandard GNU extension so put back its
detection, deleted by commit ab5835d435,
to be able to cross-compile motion with non glibc toolchains

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2017-05-12 20:45:25 +02:00
Daniel Richard G
3c0a22ad1e Various fixes to Motion's interaction with FFmpeg vis-a-vis RTSP
* 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
2017-04-23 16:31:31 -04:00
Joseph Heenan
8a1b9a982e Merge pull request #359 from Mr-DaveDev/hyper
SQL Event ID
2017-03-19 09:57:34 +00:00
Pascal Martin
34cceefd43 Improved privacy mask performances 2017-03-06 21:51:38 -08:00
MrDave
1c7996bdd4 SQL Event ID
Additional revisions for the change related to the sql event id
including variable names to conform with norm as well as documentation
updates.
2017-03-04 20:36:27 -07:00
Mike Wilson
1cd4cccb96 SQL Event ID 2017-03-04 16:33:48 -07:00
MrDave
4cecdd5f03 FreeBSD instead of BSD for pthread_np.h 2017-03-02 20:07:59 -07:00
MrDave
329eade94a Autotool Rewrite
Update the autotools to use packaged applications/locations and
remove the obsolete options.
2017-02-12 22:08:08 -07:00
MrDave
1a41fe8ab7 v4l2 Revisions
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
2017-02-12 16:20:27 -07:00
Radek Hvizdos
31364dc841 Add initial webp image compression support.
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.
2017-01-26 19:06:11 +01:00
MrDave
a500a80299 Merge motion-project/master 2016-12-14 22:12:37 -07:00
MrDave
d6fabf8d84 Merge lastest changes from upstream into branch 2016-12-11 21:53:26 -07:00
Sebastiaan Lokhorst
29667fce7c Fix OpenBSD and NetBSD compilation 2016-12-12 02:14:20 +01:00
MrDave
b2dec836e8 Add mask_privacy option
This commit adds the functionality to completely mask out
user specified areas of the images via a pgm file.   The
masking is applied only to the y component of the image
From reviewing the resulting image, it does not appear that
it is necessary to apply the mask to the cr or cb components.
It may be desired to apply the mask to these components in the
future to have a true digital mask rather than just a visual
mask.  As indicated in the code comments, the resulting blocked
section appear as white in the images since this facilitates
quicker processing.
2016-12-11 16:16:20 -07:00
MrDave
0fe81b6bdc Revise time on images
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.
2016-12-10 14:48:35 -07:00
Sebastiaan Lokhorst
b9b5bda2e2 Remove unneeded include 2016-12-09 23:12:42 +01:00
MrDave
dbf6232823 Split motion_loop - framerate
Add motionloop_framerate function
2016-12-05 19:07:12 -07:00
MrDave
4716b137f1 Split motion_loop - parmsupdate
Add the motionloop_parmsupdate function
2016-12-05 19:00:04 -07:00