Browsers may limit the number of simultaneous streams. The value of
maximum persistent connections needs to be adjusted to be greater than
the number of camera streams.
Adjust the parse routines to allow for both quoted names and quoted values.
Transition webcontrol_cors_header to webcontrol_header_params
Transition stream_cors_header to stream_header_parms
Closes#1330
* Implement %{dbeventid} for PostgreSQL and SQLite3.
dbse.c: Add %{dbeventid} support for PostgreSQL and SQLite3.
Make PostgreSQL session recovery asynchronous to avoid blocking
image capture during DBMS session reestablishment. Includes
minor mods to dbse.h, motion.c, motion.h, util.c and util.h.
doc/motion_config.html: Edit sections OptDetail_Database,
database_*, and sql_query* for clarity, consistency, and
coverage of new database support.
man/motion.1: Update descriptions of configuration options
database_* and sql_query*, including Postgresql and SQLite3
%{dbeventid} support.
* issue 1284, dbse.c: clarify confusing DB close message
1. clarify closure message wording: MySQL and/or MariaDB library closure
2. issue closure messages only for DBMSs in use (not simply compiled-in)
3. standardize spelling and case of DBMS names in all messages issued by dbse.c
Includes minor supporting changes in dbse.h and motion.c.
* po/dbeventid.pot furnished for merge into po/motion.pot when opportune
Includes all end-user messages (i.e., no debug messages) from modules
modfied for issues 1306, 1307, and 1284: dbse.c and util.c.
(These modules are not yet covered by po/POTFILES.in or po/motion.pot.)
This change introduces new HTTP endpoints in the stream web server returning
status information regarding a particular or all cameras as a JSON object.
These are useful in implementing system monitoring, e.g. via Nagios or Icinga.
"{IP}:{port0}/cameras.json": JSON object with IDs and names of all cameras,
e.g.:
$ curl -s http://127.0.0.1:8081/cameras.json | jq -rMC .
{
"cameras": [
{
"id": 1,
"name": "Lobby"
},
{
"id": 3,
"name": "Lobby"
}
]
}
"{IP}:{port0}/{camid}/status.json": JSON object with information about a single
camera, e.g.:
$ curl -s http://127.0.0.1:8081/3/status.json | jq -rMC .
{
"id": 3,
"name": "Lobby",
"image_width": 640,
"image_height": 480,
"fps": 15,
"missing_frame_counter": 1561,
"running": 1,
"lost_connection": 1,
"currenttime": 1573400729,
"currenttime_iso8601": "2019-11-10T15:45:29+0000",
"lasttime": 0,
"lasttime_iso8601": null,
"lasttime_elapsed": null,
"eventtime": 0,
"eventtime_iso8601": null,
"eventtime_elapsed": null,
"connectionlosttime": 1573400614,
"connectionlosttime_iso8601": "2019-11-10T15:43:34+0000",
"connectionlosttime_elapsed": 115
}
Additional endpoints:
- "{IP}:{port0}/status.json": JSON object with information about all cameras
- "{IP}:{portX}/status.json": JSON object with information about the camera
running on port {portX}
Signed-off-by: Michael Hanselmann <public@hansmi.ch>
Co-authored-by: Mr-Dave <motionmrdave@gmail.com>
Add netcam_params and netcam_high_params options.
Allow user specification of any additional options to netcams.
Implement a standard set of routines for parsing parameters provided for both video devices and netcams.
Revise option names for consistency
vid_control_params => video_params
mmalcam_control_params => mmalcam_params
videodevice => video_device
tunerdevice => tuner_device
netcam_highres => netcam_high_url
Conversion to use video_params for the following:
v4l2_palette => video_params option of palette
input => video_params option of input
frequency => video_params option of frequency
norm => video_params option of norm
Conversion to use netcam_params for the following:
netcam_rate => netcam_params option of capture_rate
netcam_decoder => netcam_params option of decoder
netcam_use_tcp => netcam_params option of rtsp_transport
netcam_proxy => netcam_params option of proxy
netcam_keepalive => netcam_params option of keepalive
netcam_tolerant_check => netcam_params option of tolerant_check
Closes#927