Merge branch 'storageareas' of github.com:ConnorTechnology/ZoneMinder into storageareas

This commit is contained in:
Isaac Connor 2017-05-05 17:53:13 -04:00
commit 82bdc208ac
2 changed files with 10 additions and 10 deletions

View File

@ -203,19 +203,17 @@ if ( $event_id ) {
$concat_name = $filter_name if $concat_name eq ''; $concat_name = $filter_name if $concat_name eq '';
} }
my $sql = " SELECT max(F.Delta)-min(F.Delta) as FullLength, my $sql = " SELECT (SELECT max(Delta) FROM Frames WHERE EventId=Events.Id)-(SELECT min(Delta) FROM Frames WHERE EventId=Events.Id) as FullLength,
E.*, Events.*,
unix_timestamp(E.StartTime) as Time, unix_timestamp(Events.StartTime) as Time,
M.Name as MonitorName, M.Name as MonitorName,
M.Width as MonitorWidth, M.Width as MonitorWidth,
M.Height as MonitorHeight, M.Height as MonitorHeight,
M.Palette M.Palette
FROM Frames as F FROM Events
INNER JOIN Events as E on F.EventId = E.Id INNER JOIN Monitors as M on Events.MonitorId = M.Id
INNER JOIN Monitors as M on E.MonitorId = M.Id WHERE Events.Id = ?
WHERE EventId = ? ";
GROUP BY F.EventId"
;
my $sth = $dbh->prepare_cached( $sql ) or Fatal( "Can't prepare '$sql': ".$dbh->errstr() ); my $sth = $dbh->prepare_cached( $sql ) or Fatal( "Can't prepare '$sql': ".$dbh->errstr() );
Debug($sql); Debug($sql);

View File

@ -1043,7 +1043,9 @@ function createVideo( $event, $format, $rate, $scale, $overwrite=false ) {
$command .= " -s ".sprintf( "%.2f", ($scale/SCALE_BASE) ); $command .= " -s ".sprintf( "%.2f", ($scale/SCALE_BASE) );
if ( $overwrite ) if ( $overwrite )
$command .= " -o"; $command .= " -o";
$result = exec( escapeshellcmd( $command ), $output, $status ); $command = escapeshellcmd( $command );
$result = exec( $command, $output, $status );
Debug("generating Video $command: result($result outptu:(".implode("\n", $output )." status($status");
return( $status?"":rtrim($result) ); return( $status?"":rtrim($result) );
} }