Commit Graph

1208 Commits

Author SHA1 Message Date
Mr-DaveDev
d2bed89087 Framerate for mmalcam 2018-08-22 06:50:31 -06:00
Mr-DaveDev
90763ba943 Add static file processing via netcam_url
1.  Add static movie processing via netcam_url
2.  Remove file netcam_url which only processed single image
3.  Remove experimental protocol of mjpg
2018-08-19 20:03:17 -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
tosiara
197ac4e15e Fixed corrupted PPM
Wrong array pointer increment caused V splane to run out of array bounds
2018-08-10 09:13:49 -06:00
Mr-DaveDev
0572a64ba9 Edits on configuration dimensions 2018-08-05 19:26:31 -06:00
tosiara
1f7838b921 Aligned whitespaces 2018-08-01 20:53:31 -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
tosiara
b4e45a6cc7 Fixed 422p conversion: one line of UV was missing (#767)
Reported by @notorca https://github.com/tosiara/motion/pull/28
2018-07-17 18:03:32 -06:00
Mr-DaveDev
58ac5f89f5 Revised Pixel format (#756)
* YUV422P format
* RGB format
2018-07-09 17:33:22 -06:00
Mr-DaveDev
dff5dd21b4 Preferred codec revision (#754) 2018-07-09 17:32:54 -06:00
Mr-DaveDev
1b16fe9f75 Check for invalid dimensions (#749) 2018-07-04 19:11:09 -06:00
Mr-DaveDev
3f9ab60089 ffmpeg 4.0 revision 2018-07-04 19:10:45 -06:00
Mr-DaveDev
0581449f45 Revise pktarray mutex locking for ffmpeg_passthrough 2018-07-04 09:55:32 -06:00
Perelandric
43b9c2b299 update to reflect correct 'output_pictures' default (#739)
The default setting for 'output_pictures' option was changed
from 'on' to 'off', but the docs had not been updated.

This change brings the docs into agreement with the new default.
2018-06-26 06:38:16 -06:00
Matt Schatz
1b320733e8 Fix webu_process_action for a default single camera config (#736)
When using the single 'motion.conf' file for a single camera setup,
the webu actions are skipping over the only thread due to assuming
that thread '0' is just motion and all cameras are subsequent.
This leaves the webu actions useless to the default single camera,
single config setup.

Fix this by checking that more than one camera thread exists to use
the thread loop, using the given thread number ('0') otherwise.
2018-06-21 19:38:05 -06:00
Mr-DaveDev
66b57a7264 Test return code for msgfmt (#734) 2018-06-17 20:39:52 -06:00
Perelandric
239f4bfb3b Remove incorrect escaping (#733)
Thanks!
2018-06-17 18:48:00 -06:00
Perelandric
c9b653417a Add missing return to avoid contradictory logging (#732)
closes #731
2018-06-17 18:47:06 -06:00
Sébastien VACHER
57944cde43 Update French Translation
Update fr.po
2018-06-14 22:02:31 -06:00
Mr-DaveDev
17e8369653 Revise regex for v4l2 and file url parse 2018-06-13 19:21:13 -06:00
Mr-DaveDev
74333c80f5 Add stream_grey
* Add stream_grey closes #506
2018-06-13 19:20:48 -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
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