spacing and quotes
This commit is contained in:
parent
c2ac7ed4a9
commit
204086a56d
|
@ -389,7 +389,7 @@ class Event extends ZM_Object {
|
||||||
if ( ( !$frame ) and file_exists($eventPath.'/snapshot.jpg') ) {
|
if ( ( !$frame ) and file_exists($eventPath.'/snapshot.jpg') ) {
|
||||||
# No frame specified, so look for a snapshot to use
|
# No frame specified, so look for a snapshot to use
|
||||||
$captImage = 'snapshot.jpg';
|
$captImage = 'snapshot.jpg';
|
||||||
Logger::Debug("Frame not specified, using snapshot");
|
Logger::Debug('Frame not specified, using snapshot');
|
||||||
$frame = array('FrameId'=>'snapshot', 'Type'=>'', 'Delta'=>0);
|
$frame = array('FrameId'=>'snapshot', 'Type'=>'', 'Delta'=>0);
|
||||||
} else {
|
} else {
|
||||||
$captImage = sprintf('%0'.ZM_EVENT_IMAGE_DIGITS.'d-analyze.jpg', $frame['FrameId']);
|
$captImage = sprintf('%0'.ZM_EVENT_IMAGE_DIGITS.'d-analyze.jpg', $frame['FrameId']);
|
||||||
|
@ -401,19 +401,19 @@ class Event extends ZM_Object {
|
||||||
$videoPath = $eventPath.'/'.$Event->DefaultVideo();
|
$videoPath = $eventPath.'/'.$Event->DefaultVideo();
|
||||||
|
|
||||||
if ( !file_exists($videoPath) ) {
|
if ( !file_exists($videoPath) ) {
|
||||||
Error("Event claims to have a video file, but it does not seem to exist at $videoPath" );
|
Error('Event claims to have a video file, but it does not seem to exist at '.$videoPath);
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
#$command ='ffmpeg -v 0 -i '.$videoPath.' -vf "select=gte(n\\,'.$frame['FrameId'].'),setpts=PTS-STARTPTS" '.$eventPath.'/'.$captImage;
|
#$command ='ffmpeg -v 0 -i '.$videoPath.' -vf "select=gte(n\\,'.$frame['FrameId'].'),setpts=PTS-STARTPTS" '.$eventPath.'/'.$captImage;
|
||||||
$command ='ffmpeg -ss '. $frame['Delta'] .' -i '.$videoPath.' -frames:v 1 '.$eventPath.'/'.$captImage;
|
$command ='ffmpeg -ss '. $frame['Delta'] .' -i '.$videoPath.' -frames:v 1 '.$eventPath.'/'.$captImage;
|
||||||
Logger::Debug( "Running $command" );
|
Logger::Debug('Running '.$command);
|
||||||
$output = array();
|
$output = array();
|
||||||
$retval = 0;
|
$retval = 0;
|
||||||
exec($command, $output, $retval);
|
exec($command, $output, $retval);
|
||||||
Logger::Debug("Retval: $retval, output: " . implode("\n", $output));
|
Logger::Debug("Retval: $retval, output: " . implode("\n", $output));
|
||||||
} else {
|
} else {
|
||||||
Error("Can't create frame images from video because there is no video file for event ".$Event->Id().' at ' .$Event->Path() );
|
Error('Can\'t create frame images from video because there is no video file for event '.$Event->Id().' at ' .$Event->Path());
|
||||||
}
|
}
|
||||||
} // end if capture file exists
|
} // end if capture file exists
|
||||||
} // end if analyze file exists
|
} // end if analyze file exists
|
||||||
|
@ -421,7 +421,7 @@ class Event extends ZM_Object {
|
||||||
|
|
||||||
$captPath = $eventPath.'/'.$captImage;
|
$captPath = $eventPath.'/'.$captImage;
|
||||||
if ( !file_exists($captPath) ) {
|
if ( !file_exists($captPath) ) {
|
||||||
Error("Capture file does not exist at $captPath");
|
Error('Capture file does not exist at '.$captPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
$analImage = sprintf('%0'.ZM_EVENT_IMAGE_DIGITS.'d-analyse.jpg', $frame['FrameId']);
|
$analImage = sprintf('%0'.ZM_EVENT_IMAGE_DIGITS.'d-analyse.jpg', $frame['FrameId']);
|
||||||
|
@ -484,7 +484,7 @@ class Event extends ZM_Object {
|
||||||
);
|
);
|
||||||
|
|
||||||
return $imageData;
|
return $imageData;
|
||||||
}
|
} # getImageSrc
|
||||||
|
|
||||||
public function link_to($text=null) {
|
public function link_to($text=null) {
|
||||||
if ( !$text )
|
if ( !$text )
|
||||||
|
|
Loading…
Reference in New Issue