Merge branch 'master' of github.com:ZoneMinder/ZoneMinder

pull/2300/head
Isaac Connor 2018-11-09 10:47:00 -05:00
commit abada5c95c
2 changed files with 32 additions and 9 deletions

View File

@ -164,6 +164,29 @@ Height (pixels)
Web Site Refresh
If the website in question has static content, optionally enter a time period in seconds for ZoneMinder to refresh the content.
Storage Tab
-----------
The storage section allows for each monitor to configure if and how video and audio are recorded.
Save JPEGs
Records video in individual JPEG frames. Storing JPEG frames requires more storage space than h264 but it allows to view an event anytime while it is being recorded.
* Disabled video is not recorded as JPEG frames. If this setting is selected, then "Video Writer" should be enabled otherwise there is no video recording at all.
* Frames only video is recorded in individual JPEG frames.
* Analysis images only (if available) video is recorded in invidual JPEG frames with an overlay of the motion detection analysis information. Note that this overlay remains permanently visible in the frames.
* Frames + Analysis images (if available) video is recorded twice, once as normal individual JPEG frames and once in invidual JPEG frames with analysis information overlaid.
Video Writer
Records video in real video format. It provides much better compression results than saving JPEGs, thus longer video history can be stored.
* Disabled video is not recorded in video format. If this setting is selected, then "Save JPEGs" should be enabled otherwise there is no video recording at all.
* X264 Encode the video or picture frames received from the camera are transcoded into h264 and stored as a video. This option is useful if the camera cannot natively stream h264.
* H264 Camera Passthrough this option assumes that the camera is already sending an h264 stream. Video will be recorded as is, without any post-processing in zoneminder. Video characteristics such as bitrate, encoding mode, etc. should be set directly in the camera.
Recording Audio
Check the box labeled "Whether to store the audio stream when saving an event." in order to save audio (if available) when events are recorded.
Timestamp Tab
-------------

View File

@ -441,11 +441,11 @@ sub databaseLevel {
$databaseLevel = $this->limit($databaseLevel);
if ( $this->{databaseLevel} != $databaseLevel ) {
if ( ( $databaseLevel > NOLOG ) and ( $this->{databaseLevel} <= NOLOG ) ) {
if ( !$this->{dbh} ) {
$this->{dbh} = ZoneMinder::Database::zmDbConnect();
if ( ! ( $ZoneMinder::Database::dbh or ZoneMinder::Database::zmDbConnect() ) ) {
Warning("Failed connecting to db. Not using database logging.");
$this->{databaseLevel} = NOLOG;
return NOLOG;
}
} elsif ( $databaseLevel <= NOLOG && $this->{databaseLevel} > NOLOG ) {
undef($this->{dbh});
}
$this->{databaseLevel} = $databaseLevel;
}
@ -558,12 +558,12 @@ sub logPrint {
}
if ( $level <= $this->{databaseLevel} ) {
if ( ! ( $this->{dbh} and $this->{dbh}->ping() ) ) {
if ( ! ( $ZoneMinder::Database::dbh and $ZoneMinder::Database::dbh->ping() ) ) {
$this->{sth} = undef;
# Turn this off because zDbConnect will do logging calls.
my $oldlevel = $this->{databaseLevel};
$this->{databaseLevel} = NOLOG;
if ( ! ( $this->{dbh} = ZoneMinder::Database::zmDbConnect() ) ) {
if ( ! ZoneMinder::Database::zmDbConnect() ) {
#print(STDERR "Can't log to database: ");
return;
}
@ -571,10 +571,10 @@ sub logPrint {
}
my $sql = 'INSERT INTO Logs ( TimeKey, Component, ServerId, Pid, Level, Code, Message, File, Line ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, NULL )';
$this->{sth} = $this->{dbh}->prepare_cached($sql) if ! $this->{sth};
$this->{sth} = $ZoneMinder::Database::dbh->prepare_cached($sql) if ! $this->{sth};
if ( !$this->{sth} ) {
$this->{databaseLevel} = NOLOG;
Error("Can't prepare log entry '$sql': ".$this->{dbh}->errstr());
Error("Can't prepare log entry '$sql': ".$ZoneMinder::Database::dbh->errstr());
return;
}
@ -590,7 +590,7 @@ sub logPrint {
);
if ( !$res ) {
$this->{databaseLevel} = NOLOG;
Error("Can't execute log entry '$sql': ".$this->{dbh}->errstr());
Error("Can't execute log entry '$sql': ".$ZoneMinder::Database::dbh->errstr());
}
} # end if doing db logging
} # end if level < effectivelevel