Merge branch 'master' of github.com:ZoneMinder/zoneminder
commit
b2dcf39936
|
@ -528,10 +528,20 @@ void EventStream::processCommand(const CmdMsg *msg) {
|
|||
x = ((unsigned char)msg->msg_data[1]<<8)|(unsigned char)msg->msg_data[2];
|
||||
y = ((unsigned char)msg->msg_data[3]<<8)|(unsigned char)msg->msg_data[4];
|
||||
Debug(1, "Got PAN command, to %d,%d", x, y);
|
||||
send_frame = true;
|
||||
if (paused) {
|
||||
step = 1;
|
||||
send_twice = true;
|
||||
}
|
||||
break;
|
||||
case CMD_SCALE :
|
||||
scale = ((unsigned char)msg->msg_data[1]<<8)|(unsigned char)msg->msg_data[2];
|
||||
Debug(1, "Got SCALE command, to %d", scale);
|
||||
send_frame = true;
|
||||
if (paused) {
|
||||
step = 1;
|
||||
send_twice = true;
|
||||
}
|
||||
break;
|
||||
case CMD_PREV :
|
||||
Debug(1, "Got PREV command");
|
||||
|
|
|
@ -121,6 +121,7 @@ class Event extends ZM_Object {
|
|||
public function StartDateTimeSecs() {
|
||||
return strtotime($this->{'StartDateTime'});
|
||||
}
|
||||
|
||||
public function EndDateTimeSecs() {
|
||||
return strtotime($this->{'EndDateTime'});
|
||||
}
|
||||
|
@ -256,16 +257,19 @@ class Event extends ZM_Object {
|
|||
}
|
||||
|
||||
public function getStreamSrc( $args=array(), $querySep='&' ) {
|
||||
|
||||
$streamSrc = '';
|
||||
$Server = $this->Server();
|
||||
|
||||
# If we are in a multi-port setup, then use the multiport, else by
|
||||
# passing null Server->Url will use the Port set in the Server setting
|
||||
$streamSrc .= $Server->Url(
|
||||
ZM_MIN_STREAMING_PORT ?
|
||||
if ($args['mode'] == 'mp4') { #Downloading a video file. It is possible to reconsider the condition later.
|
||||
#If the port is different from 80, the browser will start watching the video instead of downloading.
|
||||
$port = null;
|
||||
} else {
|
||||
$port = ZM_MIN_STREAMING_PORT ?
|
||||
ZM_MIN_STREAMING_PORT+$this->{'MonitorId'} :
|
||||
null);
|
||||
null;
|
||||
}
|
||||
$streamSrc = $Server->Url($port);
|
||||
|
||||
if ( $this->{'DefaultVideo'} and $args['mode'] != 'jpeg' ) {
|
||||
$streamSrc .= $Server->PathToIndex();
|
||||
|
@ -317,8 +321,8 @@ class Event extends ZM_Object {
|
|||
}
|
||||
|
||||
function createListThumbnail( $overwrite=false ) {
|
||||
# The idea here is that we don't really want to use the analysis jpeg as the thumbnail.
|
||||
# The snapshot image will be generated during capturing
|
||||
# The idea here is that we don't really want to use the analysis jpeg as the thumbnail.
|
||||
# The snapshot image will be generated during capturing
|
||||
if ( file_exists($this->Path().'/snapshot.jpg') ) {
|
||||
Debug("snapshot exists");
|
||||
$frame = null;
|
||||
|
@ -380,7 +384,7 @@ class Event extends ZM_Object {
|
|||
|
||||
function getThumbnailSrc( $args=array(), $querySep='&' ) {
|
||||
# The thumbnail is theoretically the image with the most motion.
|
||||
# We always store at least 1 image when capturing
|
||||
# We always store at least 1 image when capturing
|
||||
|
||||
$streamSrc = '';
|
||||
$Server = $this->Server();
|
||||
|
@ -525,7 +529,7 @@ class Event extends ZM_Object {
|
|||
'imageClass' => $alarmFrame?'alarm':'normal',
|
||||
'isAnalysisImage' => $isAnalysisImage,
|
||||
'hasAnalysisImage' => $hasAnalysisImage,
|
||||
'FrameId' => $frame['FrameId'],
|
||||
'FrameId' => $frame['FrameId'],
|
||||
);
|
||||
|
||||
return $imageData;
|
||||
|
@ -677,6 +681,7 @@ class Event extends ZM_Object {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function canEdit($u=null) {
|
||||
global $user;
|
||||
if (!$u) $u=$user;
|
||||
|
@ -840,5 +845,4 @@ class Event extends ZM_Object {
|
|||
} # end sub GenerateVideo
|
||||
|
||||
} # end class
|
||||
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue