Commit Graph

1186 Commits

Author SHA1 Message Date
Mr-DaveDev
a86fda8fb7 Travis update for 18.04 2018-06-09 14:17:28 -06:00
Mr-DaveDev
189974106b Native Language Revisions
* Revise MOTION_LOG macro

* Add native_language option

* Additional languages

* Add log messages to po files
2018-06-09 14:17:02 -06:00
tosiara
a47e929049 Add O_CLOEXEC flag to the open of V4L2, socket and extpipe
* Add O_CLOEXEC flag to the open of V4L2, socket and extpipe
Fixes https://github.com/Motion-Project/motion/issues/705

* Add CLOEXEC
2018-06-09 14:16:19 -06:00
Mr-DaveDev
37f04eb5c2 Add status and text UI get (#707)
* Status and Text UI get

* Additional webu text revisions
1.  Only provide webcontrol parms in the list on the main thread.
2.  Use main configuration values when parm is not in camera specific config file
3.  Break out of loop once parm is found in get
4.  Check for numeric thread number when requesting status
5.  Send result messages when user requests actions/track/set

* Add event listener for completed pause/start
2018-05-16 21:47:32 -06:00
Mr-DaveDev
13ad6c2ee5 Update for ffmpeg.c (#712) 2018-05-16 21:40:17 -06:00
Matt Schatz
00d3b25d95 Fix possible crash and config listing in webu (#706)
* webu_text_list: list config options from requested thread

* webu_parseurl: Disallow a negative thread number (prevents a possbile segfault)
2018-04-17 21:46:16 -06:00
Uatschitchun
ff794450d0 Update de.po (#701)
German Translation updates
2018-04-11 17:27:31 -06:00
genius3000
182c8a34d5 Fix memory leak from read_camera_dir() (#694)
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
2018-04-05 20:32:56 -06:00
Mr-DaveDev
bbce178196 Warn high framerates on mmal cams (#693) 2018-04-05 20:09:30 -06:00
Mr-DaveDev
1a90e9294e Web Interface Revisions (#692)
* Web conf value duplication

* Clear configuration upon menu item

* Additional clarity on webcontrol_parms

* Revise default fonts
2018-04-05 20:08:40 -06:00
genius3000
d5c18031c2 Enhance 'lightswitch' with a config option of ignored frames (#689)
* 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
2018-04-03 18:24:08 -06:00
Mr-DaveDev
8acede9089 Implement DEFINEs for memory sizes in webu.c(#687) 2018-04-03 18:12:48 -06:00
Mr-DaveDev
f3d5dc8985 Initiate translations (#682) 2018-03-25 17:12:01 -06:00
Mr-DaveDev
4ff191be82 Implement Translations via Gettext
Implement translations of Motion log messages and web control using the gettext function.
2018-03-25 16:39:57 -06:00
Mr-DaveDev
d73418102c Move function preview_save into event module (#681) 2018-03-25 15:24:49 -06:00
sander1234567890
a0816e72f0 Event timestamp and SQL improvements (#668)
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.
2018-03-25 15:01:57 -06:00
genius3000
c5f935bfcf New WebUI improvements (#675)
* Open guide in new window or tab

* Pad the bottom of header-center for a smoother look

* Pad the bottom of 'main-content' below 'live-preview'

* Dropdown

* Allow closing the dropdown menus by clicking elsewhere on the page
2018-03-23 21:33:14 -06:00
genius3000
e2eba6b52a Update to utilize the configuration printing to the log (#674) 2018-03-13 20:28:57 -06:00
Mr-DaveDev
1e86c7a109 Watchdog and RTSP time
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.
2018-03-13 19:53:38 -06:00
tosiara
aa0b70f3ea Comment updates 2018-03-05 18:30:00 -07:00
tosiara
7fe644e7a2 Updated lithuanian translation (#664) 2018-03-04 13:18:55 -07:00
Jony
5789a66942 Add Swedish to translate.c 2018-03-03 11:07:16 -07: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
James Cowgill
9b93a417e3 Fix build errors with FFmpeg 4.0 2018-02-25 13:13:57 -07:00
Mr-DaveDev
7dad4b1e25 Remove redundant checks for image type 2018-02-25 13:12:18 -07:00
Mr-DaveDev
93e2718341 Saving highres image when using 'best' configuration option. 2018-02-23 10:25:05 -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
void-user
fcc66b8c91 Setjmp fixes for jpegutils.c (#650)
* Move setjmp invocation back into decoding function.

Behavior is undefined if longjmp is called after the function containing
setjmp invocation has terminated.

* Revert "Add error checking on jpeg utils (#563)"

This is dead code because longjmp invocation ensures control is returned
to the existing error path.

This reverts commit caea41df75.

* Silence spurious gcc 4.8.4 warning.
2018-02-12 21:41:55 -07:00
Mr-DaveDev
e9e0142baa Method specifier for autobright 2018-02-12 07:40:22 -07:00
genius3000
4664455596 Fix some config issues in recent commits (#649)
* Fix issues with vid_control_params handling of depreciated parameters
* Moved the comment of calling copy_vid_ctrl to where it actually happens
* The if checks for the names were inverse of what they needed to be and ALL
depreciated parameters were taking this path

copy_vid_ctrl:
* make it static like its forward declaration
* power_line_frequency is default at -1, so 0 needs to be copied over
but anything with a value of 0 was being skipped

* Fix handling of depreciated text_double
Copying the bool value of text_double directly to text_scale copies
a value of 0 for off and 1 for on, which ends up with no text or
the default of no upscaling, respectively.
We need to handle this with a custom function to translate the bool
to 1 (for no upscaling) and 2 (for typical double upscaling).

* Update motion-dist.conf.in for text_scale
2018-02-12 07:36:53 -07:00
jackxbritton
11e6339f44 Cross origin resource sharing (CORS) config parameter
* Add configuration parameter for a cross origin resource sharing on the Motion stream
2018-02-11 11:30:24 -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
christophe-lohr
44c8f5911d track generic move
Add track_generic_move parameter to execute external script for moving camera

Provide environment variables that can be used by external script for tracking.
2018-02-10 07:30:13 -07:00
Mr-DaveDev
39d4c7750a Revise call to copy_vid_ctrl 2018-02-09 17:37:45 -07:00
Andrea Cioni
baf003ad4b Correct HTML header termination
Add double \r\n to properly terminate some webcontrol headers

Closes #641
2018-02-06 21:31:09 -07:00
Alistair McMillan
79bd21bb13 Update Mac build instructions
Remove sudo reference from sample brew install 
Include automake package to get autoreconf command
Include postgresql package to get libpq-fe.h file
2018-02-04 07:48:45 -07:00
Mr-DaveDev
82c84fbb27 RTSP High resolution
Resolve segfault during startup when using the netcam_highres options
2018-02-02 18:21:03 -07:00
Mr-DaveDev
6fae7e3dbf Guide Update for conversion specifiers 2018-01-31 21:22:55 -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
Mr-DaveDev
3d627d5a63 Remove 17.04 from Travis tests
17.04 has reached EOL so remove it from Travis tests
2018-01-25 18:55:20 -07:00
Christian G. Warden
a8334bc35f Fix typo in manual 2018-01-25 18:54:16 -07:00
Mr-DaveDev
999a37485e Update documentation for %{ver} specifier 2018-01-11 20:47:58 -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
76529907a6 Pass Through Revisions
Pass through revisions 
1.  Reset index in the reconnect situation.
2.  Lock array during initial read when opening context.
2018-01-11 17:56:45 -07:00
Mr-DaveDev
c194fa8a6d Guide Update
1.  Change from htmlpreview to rawgit.
2.  In guide have top menu always point to home page.
3.  Include the home page in the usage notice.
4.  Reference home page guide as preferred default
5.  Update changelog with revisions since 4.1.1
2018-01-07 18:37:01 -07:00
Mr-DaveDev
7637a3dcd0 Update Web Control
Update the Motion webcontrol to reference the project documentation
2018-01-02 17:56:36 -07:00
Mr-DaveDev
a9d9acc0f1 Update Motion Guide
Update Motion Guide
2018-01-02 17:55:43 -07:00
Mr-DaveDev
06486e4fea Validate parmeters for v4l2 via netcam
Closes #590
2018-01-01 13:08:16 -07:00
Mr-DaveDev
4d3e8b06cf Capture first images for non-v4l2 devices
Closes #541
2018-01-01 13:07:42 -07:00