zoneminder/web/includes/Frame.php

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
1.1 KiB
PHP
Raw Permalink Normal View History

<?php
namespace ZM;
require_once('database.php');
require_once('Event.php');
require_once('Object.php');
class Frame extends ZM_Object {
protected static $table = 'Frames';
2019-09-23 02:21:59 +08:00
protected $defaults = array(
'Id' => null,
'EventId' => 0,
'FrameId' => 0,
'Type' => 'Normal',
'TimeStamp' => 0,
'Delta' => 0.00,
'Score' => 0,
);
public static function find( $parameters = array(), $options = array() ) {
return ZM_Object::_find(get_class(), $parameters, $options);
}
public static function find_one( $parameters = array(), $options = array() ) {
return ZM_Object::_find_one(get_class(), $parameters, $options);
}
2017-05-31 01:47:30 +08:00
public function Storage() {
return $this->Event()->Storage();
}
2017-05-31 01:47:30 +08:00
public function Event() {
return new Event( $this->{'EventId'} );
}
public function getImageSrc( $show='capture' ) {
return '?view=image&fid='.$this->{'FrameId'}.'&eid='.$this->{'EventId'}.'&show='.$show;
#return '?view=image&fid='.$this->{'Id'}.'&show='.$show.'&filename='.$this->Event()->MonitorId().'_'.$this->{'EventId'}.'_'.$this->{'FrameId'}.'.jpg';
} // end function getImageSrc
} # end class Frame
?>