Changed stills views to use single capture mode of zms.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1055 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
parent
16fcbb4983
commit
2271d05d02
|
@ -24,7 +24,6 @@ web_DATA = \
|
||||||
zm_html_view_frame.php \
|
zm_html_view_frame.php \
|
||||||
zm_html_view_frames.php \
|
zm_html_view_frames.php \
|
||||||
zm_html_view_function.php \
|
zm_html_view_function.php \
|
||||||
zm_html_view_imagefetch.php \
|
|
||||||
zm_html_view_login.php \
|
zm_html_view_login.php \
|
||||||
zm_html_view_logout.php \
|
zm_html_view_logout.php \
|
||||||
zm_html_view_monitor.php \
|
zm_html_view_monitor.php \
|
||||||
|
@ -88,7 +87,6 @@ EXTRA_DIST = \
|
||||||
zm_html_view_frame.php \
|
zm_html_view_frame.php \
|
||||||
zm_html_view_frames.php \
|
zm_html_view_frames.php \
|
||||||
zm_html_view_function.php \
|
zm_html_view_function.php \
|
||||||
zm_html_view_imagefetch.php \
|
|
||||||
zm_html_view_login.php \
|
zm_html_view_login.php \
|
||||||
zm_html_view_logout.php \
|
zm_html_view_logout.php \
|
||||||
zm_html_view_monitor.php \
|
zm_html_view_monitor.php \
|
||||||
|
|
|
@ -148,7 +148,6 @@ web_DATA = \
|
||||||
zm_html_view_frame.php \
|
zm_html_view_frame.php \
|
||||||
zm_html_view_frames.php \
|
zm_html_view_frames.php \
|
||||||
zm_html_view_function.php \
|
zm_html_view_function.php \
|
||||||
zm_html_view_imagefetch.php \
|
|
||||||
zm_html_view_login.php \
|
zm_html_view_login.php \
|
||||||
zm_html_view_logout.php \
|
zm_html_view_logout.php \
|
||||||
zm_html_view_monitor.php \
|
zm_html_view_monitor.php \
|
||||||
|
@ -213,7 +212,6 @@ EXTRA_DIST = \
|
||||||
zm_html_view_frame.php \
|
zm_html_view_frame.php \
|
||||||
zm_html_view_frames.php \
|
zm_html_view_frames.php \
|
||||||
zm_html_view_function.php \
|
zm_html_view_function.php \
|
||||||
zm_html_view_imagefetch.php \
|
|
||||||
zm_html_view_login.php \
|
zm_html_view_login.php \
|
||||||
zm_html_view_logout.php \
|
zm_html_view_logout.php \
|
||||||
zm_html_view_monitor.php \
|
zm_html_view_monitor.php \
|
||||||
|
|
|
@ -399,6 +399,7 @@ function createVideo( $event, $rate, $scale, $overwrite=0 )
|
||||||
return( $status?"":rtrim($result) );
|
return( $status?"":rtrim($result) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Now deprecated
|
||||||
function createImage( $monitor, $scale )
|
function createImage( $monitor, $scale )
|
||||||
{
|
{
|
||||||
if ( is_array( $monitor ) )
|
if ( is_array( $monitor ) )
|
||||||
|
|
|
@ -124,7 +124,6 @@ switch( $view )
|
||||||
case "watchfeed" :
|
case "watchfeed" :
|
||||||
case "watchstatus" :
|
case "watchstatus" :
|
||||||
case "watchevents" :
|
case "watchevents" :
|
||||||
case "imagefetch" :
|
|
||||||
case "settings" :
|
case "settings" :
|
||||||
case "events" :
|
case "events" :
|
||||||
case "filter" :
|
case "filter" :
|
||||||
|
|
|
@ -59,8 +59,6 @@ $scale = (int)(($width_scale<$height_scale)?$width_scale:$height_scale);
|
||||||
|
|
||||||
if ( $mode != "stream" )
|
if ( $mode != "stream" )
|
||||||
{
|
{
|
||||||
// Prompt an image to be generated
|
|
||||||
createImage( $monitor, $scale );
|
|
||||||
if ( ZM_WEB_REFRESH_METHOD == "http" )
|
if ( ZM_WEB_REFRESH_METHOD == "http" )
|
||||||
header("Refresh: ".ZM_WEB_REFRESH_IMAGE."; URL=$PHP_SELF?view=watchfeed&mid=$mid&mode=still" );
|
header("Refresh: ".ZM_WEB_REFRESH_IMAGE."; URL=$PHP_SELF?view=watchfeed&mid=$mid&mode=still" );
|
||||||
}
|
}
|
||||||
|
@ -127,8 +125,9 @@ if ( $mode == "stream" )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$image_src = ZM_PATH_ZMS."?mode=single&monitor=".$monitor['Id']."&scale=".$scale;
|
||||||
?>
|
?>
|
||||||
<tr><td colspan="3" align="center"><a href="javascript: newWindow( '<?= $PHP_SELF ?>?view=watch&mid=<?= $monitor['Id'] ?>', 'zmWatch<?= $monitor['Id'] ?>', <?= $monitor['Width']+$jws['watch']['w'] ?>, <?= $monitor['Height']+$jws['watch']['h'] ?> );"><img src="<?= ZM_DIR_IMAGES.'/'.$monitor['Name'] ?>.jpg" border="0" width="<?= reScale( $monitor['Width'], $scale ) ?>" height="<?= reScale( $monitor['Height'], $scale ) ?>"></a></td></tr>
|
<tr><td colspan="3" align="center"><a href="javascript: newWindow( '<?= $PHP_SELF ?>?view=watch&mid=<?= $monitor['Id'] ?>', 'zmWatch<?= $monitor['Id'] ?>', <?= $monitor['Width']+$jws['watch']['w'] ?>, <?= $monitor['Height']+$jws['watch']['h'] ?> );"><img src="<?= $image_src ?>" border="0" width="<?= reScale( $monitor['Width'], $scale ) ?>" height="<?= reScale( $monitor['Height'], $scale ) ?>"></a></td></tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -1,45 +0,0 @@
|
||||||
<?php
|
|
||||||
//
|
|
||||||
// ZoneMinder web watch fetch view file, $Date$, $Revision$
|
|
||||||
// Copyright (C) 2003 Philip Coombes
|
|
||||||
//
|
|
||||||
// This program is free software; you can redistribute it and/or
|
|
||||||
// modify it under the terms of the GNU General Public License
|
|
||||||
// as published by the Free Software Foundation; either version 2
|
|
||||||
// of the License, or (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with this program; if not, write to the Free Software
|
|
||||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
||||||
//
|
|
||||||
|
|
||||||
if ( !canView( 'Stream' ) )
|
|
||||||
{
|
|
||||||
$view = "error";
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
|
|
||||||
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified
|
|
||||||
header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
|
|
||||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
|
||||||
header("Pragma: no-cache"); // HTTP/1.0
|
|
||||||
|
|
||||||
if ( !isset( $scale ) )
|
|
||||||
$scale = SCALE_SCALE;
|
|
||||||
|
|
||||||
// Prompt an image to be generated
|
|
||||||
createImage( $mid, $scale );
|
|
||||||
|
|
||||||
?>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<script language="JavaScript">
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
</html>
|
|
|
@ -46,7 +46,6 @@ $scale = (int)(($width_scale<$height_scale)?$width_scale:$height_scale);
|
||||||
if ( $mode != "stream" )
|
if ( $mode != "stream" )
|
||||||
{
|
{
|
||||||
// Prompt an image to be generated
|
// Prompt an image to be generated
|
||||||
createImage( $monitor, $scale );
|
|
||||||
if ( ZM_WEB_REFRESH_METHOD == "http" )
|
if ( ZM_WEB_REFRESH_METHOD == "http" )
|
||||||
header("Refresh: ".ZM_WEB_REFRESH_IMAGE."; URL=$PHP_SELF?view=montagefeed&mid=$mid&mode=still&scale=$scale" );
|
header("Refresh: ".ZM_WEB_REFRESH_IMAGE."; URL=$PHP_SELF?view=montagefeed&mid=$mid&mode=still&scale=$scale" );
|
||||||
}
|
}
|
||||||
|
@ -56,6 +55,8 @@ header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
|
||||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||||
header("Pragma: no-cache"); // HTTP/1.0
|
header("Pragma: no-cache"); // HTTP/1.0
|
||||||
|
|
||||||
|
$image_src = ZM_PATH_ZMS."?mode=single&monitor=".$monitor['Id']."&scale=".$scale;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
@ -70,16 +71,13 @@ if ( $mode != "stream" && ZM_WEB_REFRESH_METHOD == "javascript" )
|
||||||
?>
|
?>
|
||||||
function fetchImage()
|
function fetchImage()
|
||||||
{
|
{
|
||||||
window.parent.MontageFetch<?= $monitor['Id'] ?>.location.reload( true );
|
|
||||||
|
|
||||||
var now = new Date();
|
var now = new Date();
|
||||||
var zm_image = new Image();
|
var zm_image = new Image();
|
||||||
zm_image.src = '<?= ZM_DIR_IMAGES.'/'.$monitor['Name'] ?>.jpg?'+now.getTime();
|
zm_image.src = '<?= $image_src ?>'+'&'+now.getTime();
|
||||||
|
|
||||||
document['zmImage'].src = zm_image.src;
|
document['zmImage'].src = zm_image.src;
|
||||||
}
|
}
|
||||||
|
|
||||||
window.parent.MontageFetch<?= $monitor['Id'] ?>.location = '<?= $PHP_SELF ?>?view=imagefetch&mid=<?= $monitor['Id'] ?>&scale=<?= $scale ?>';
|
|
||||||
window.setInterval( "fetchImage()", <?= ZM_WEB_REFRESH_IMAGE*1000 ?> );
|
window.setInterval( "fetchImage()", <?= ZM_WEB_REFRESH_IMAGE*1000 ?> );
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
@ -166,7 +164,7 @@ AutoStart=true>
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<img name="zmImage" src="<?= ZM_DIR_IMAGES.'/'.$monitor['Name'] ?>.jpg" border="0" width="<?= reScale( $monitor['Width'], $scale ) ?>" height="<?= reScale( $monitor['Height'], $scale ) ?>">
|
<img name="zmImage" src="<?= $image_src ?>" border="0" width="<?= reScale( $monitor['Width'], $scale ) ?>" height="<?= reScale( $monitor['Height'], $scale ) ?>">
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -30,15 +30,7 @@ if ( !canView( 'Stream' ) )
|
||||||
if ( ZM_WEB_COMPACT_MONTAGE )
|
if ( ZM_WEB_COMPACT_MONTAGE )
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<frameset rows="<?= (ZM_WEB_REFRESH_METHOD=='javascript'&&ZM_WEB_DOUBLE_BUFFER)?'0,':'' ?>*" cols="100%" border="1" frameborder="no" framespacing="0">
|
<frameset rows="*" cols="100%" border="1" frameborder="no" framespacing="0">
|
||||||
<?php
|
|
||||||
if ( ZM_WEB_REFRESH_METHOD == 'javascript' && ZM_WEB_DOUBLE_BUFFER )
|
|
||||||
{
|
|
||||||
?>
|
|
||||||
<frame src="about:blank" name="MontageFetch<?= $mid ?>" scrolling="no">
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<frame src="<?= $PHP_SELF ?>?view=montagefeed&mid=<?= $mid ?>&mode=<?= $mode ?>" marginwidth="0" marginheight="0" name="MontageStream<?= $mid ?>" scrolling="no">
|
<frame src="<?= $PHP_SELF ?>?view=montagefeed&mid=<?= $mid ?>&mode=<?= $mode ?>" marginwidth="0" marginheight="0" name="MontageStream<?= $mid ?>" scrolling="no">
|
||||||
</frameset>
|
</frameset>
|
||||||
<?php
|
<?php
|
||||||
|
@ -46,16 +38,8 @@ if ( ZM_WEB_COMPACT_MONTAGE )
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<frameset rows="24,<?= (ZM_WEB_REFRESH_METHOD=='javascript'&&ZM_WEB_DOUBLE_BUFFER)?'0,':'' ?>*,16" cols="100%" border="1" frameborder="no" framespacing="0">
|
<frameset rows="24,*,16" cols="100%" border="1" frameborder="no" framespacing="0">
|
||||||
<frame src="<?= $PHP_SELF ?>?view=montagemenu&mid=<?= $mid ?>&mode=<?= $mode ?>" marginwidth="0" marginheight="0" name="MontageMenu<?= $mid ?>" scrolling="no">
|
<frame src="<?= $PHP_SELF ?>?view=montagemenu&mid=<?= $mid ?>&mode=<?= $mode ?>" marginwidth="0" marginheight="0" name="MontageMenu<?= $mid ?>" scrolling="no">
|
||||||
<?php
|
|
||||||
if ( ZM_WEB_REFRESH_METHOD == 'javascript' && ZM_WEB_DOUBLE_BUFFER )
|
|
||||||
{
|
|
||||||
?>
|
|
||||||
<frame src="about:blank" name="MontageFetch<?= $mid ?>" scrolling="no">
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<frame src="<?= $PHP_SELF ?>?view=montagefeed&mid=<?= $mid ?>&mode=<?= $mode ?>" marginwidth="0" marginheight="0" name="MontageStream<?= $mid ?>" scrolling="no">
|
<frame src="<?= $PHP_SELF ?>?view=montagefeed&mid=<?= $mid ?>&mode=<?= $mode ?>" marginwidth="0" marginheight="0" name="MontageStream<?= $mid ?>" scrolling="no">
|
||||||
<frame src="<?= $PHP_SELF ?>?view=montagestatus&mid=<?= $mid ?>" marginwidth="0" marginheight="0" name="MontageStatus<?= $mid ?>" scrolling="no">
|
<frame src="<?= $PHP_SELF ?>?view=montagestatus&mid=<?= $mid ?>" marginwidth="0" marginheight="0" name="MontageStatus<?= $mid ?>" scrolling="no">
|
||||||
</frameset>
|
</frameset>
|
||||||
|
|
|
@ -44,16 +44,8 @@ window.resizeTo( <?= reScale($monitor['Width'],$width_scale)+$jws['watch']['w']
|
||||||
window.focus();
|
window.focus();
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<frameset rows="24,<?= (ZM_WEB_REFRESH_METHOD=='javascript'&&ZM_WEB_DOUBLE_BUFFER)?'0,':'' ?><?= reScale($monitor['Height'],$height_scale)+8 ?>,16,*" border="1" frameborder="no" framespacing="0">
|
<frameset rows="24,<?= reScale($monitor['Height'],$height_scale)+8 ?>,16,*" border="1" frameborder="no" framespacing="0">
|
||||||
<frame src="<?= $PHP_SELF ?>?view=watchmenu&mode=<?= $mode ?>&mid=<?= $monitor['Id'] ?>&scale=<?= $scale ?>" marginwidth="0" marginheight="0" name="MonitorMenu<?= $monitor['Id' ] ?>" scrolling="no">
|
<frame src="<?= $PHP_SELF ?>?view=watchmenu&mode=<?= $mode ?>&mid=<?= $monitor['Id'] ?>&scale=<?= $scale ?>" marginwidth="0" marginheight="0" name="MonitorMenu<?= $monitor['Id' ] ?>" scrolling="no">
|
||||||
<?php
|
|
||||||
if ( ZM_WEB_REFRESH_METHOD == 'javascript' && ZM_WEB_DOUBLE_BUFFER )
|
|
||||||
{
|
|
||||||
?>
|
|
||||||
<frame src="about:blank" name="MonitorFetch<?= $monitor['Id'] ?>" scrolling="no">
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<frame src="<?= $PHP_SELF ?>?view=watchfeed&mode=<?= $mode ?>&mid=<?= $monitor['Id'] ?>&scale=<?= $scale ?>" marginwidth="0" marginheight="0" name="MonitorStream<?= $monitor['Id' ] ?>" scrolling="no">
|
<frame src="<?= $PHP_SELF ?>?view=watchfeed&mode=<?= $mode ?>&mid=<?= $monitor['Id'] ?>&scale=<?= $scale ?>" marginwidth="0" marginheight="0" name="MonitorStream<?= $monitor['Id' ] ?>" scrolling="no">
|
||||||
<frame src="<?= $PHP_SELF ?>?view=watchstatus&mid=<?= $monitor['Id'] ?>" marginwidth="0" marginheight="0" name="MonitorStatus<?= $monitor['Id' ] ?>" scrolling="no">
|
<frame src="<?= $PHP_SELF ?>?view=watchstatus&mid=<?= $monitor['Id'] ?>" marginwidth="0" marginheight="0" name="MonitorStatus<?= $monitor['Id' ] ?>" scrolling="no">
|
||||||
<frame src="<?= $PHP_SELF ?>?view=watchevents&max_events=<?= MAX_EVENTS ?>&mid=<?= $monitor['Id'] ?>" marginwidth="0" marginheight="0" name="MonitorEvents<?= $monitor['Id' ] ?>" scrolling="auto">
|
<frame src="<?= $PHP_SELF ?>?view=watchevents&max_events=<?= MAX_EVENTS ?>&mid=<?= $monitor['Id'] ?>" marginwidth="0" marginheight="0" name="MonitorEvents<?= $monitor['Id' ] ?>" scrolling="auto">
|
||||||
|
|
|
@ -43,7 +43,6 @@ $monitor = mysql_fetch_assoc( $result );
|
||||||
if ( $mode != "stream" )
|
if ( $mode != "stream" )
|
||||||
{
|
{
|
||||||
// Prompt an image to be generated
|
// Prompt an image to be generated
|
||||||
createImage( $monitor, $scale );
|
|
||||||
if ( ZM_WEB_REFRESH_METHOD == "http" )
|
if ( ZM_WEB_REFRESH_METHOD == "http" )
|
||||||
header("Refresh: ".ZM_WEB_REFRESH_IMAGE."; URL=$PHP_SELF?view=watchfeed&mid=$mid&mode=still&scale=$scale" );
|
header("Refresh: ".ZM_WEB_REFRESH_IMAGE."; URL=$PHP_SELF?view=watchfeed&mid=$mid&mode=still&scale=$scale" );
|
||||||
}
|
}
|
||||||
|
@ -53,6 +52,8 @@ header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
|
||||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||||
header("Pragma: no-cache"); // HTTP/1.0
|
header("Pragma: no-cache"); // HTTP/1.0
|
||||||
|
|
||||||
|
$image_src = ZM_PATH_ZMS."?mode=single&monitor=".$monitor['Id']."&scale=".$scale;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
@ -67,16 +68,13 @@ if ( $mode != "stream" && ZM_WEB_REFRESH_METHOD == "javascript" )
|
||||||
?>
|
?>
|
||||||
function fetchImage()
|
function fetchImage()
|
||||||
{
|
{
|
||||||
window.parent.MonitorFetch<?= $monitor['Id'] ?>.location.reload( true );
|
|
||||||
|
|
||||||
var now = new Date();
|
var now = new Date();
|
||||||
var zm_image = new Image();
|
var zm_image = new Image();
|
||||||
zm_image.src = '<?= ZM_DIR_IMAGES.'/'.$monitor['Name'] ?>.jpg?'+now.getTime();
|
zm_image.src = '<?= $image_src ?>'+'&'+now.getTime();
|
||||||
|
|
||||||
document['zmImage'].src = zm_image.src;
|
document['zmImage'].src = zm_image.src;
|
||||||
}
|
}
|
||||||
|
|
||||||
window.parent.MonitorFetch<?= $monitor['Id'] ?>.location = '<?= $PHP_SELF ?>?view=imagefetch&mid=<?= $monitor['Id'] ?>&scale=<?= $scale ?>';
|
|
||||||
window.setInterval( "fetchImage()", <?= ZM_WEB_REFRESH_IMAGE*1000 ?> );
|
window.setInterval( "fetchImage()", <?= ZM_WEB_REFRESH_IMAGE*1000 ?> );
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
@ -163,7 +161,7 @@ AutoStart=true>
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<img name="zmImage" src="<?= ZM_DIR_IMAGES.'/'.$monitor['Name'] ?>.jpg" border="0" width="<?= reScale( $monitor['Width'], $scale ) ?>" height="<?= reScale( $monitor['Height'], $scale ) ?>">
|
<img name="zmImage" src="<?= $image_src ?>" border="0" width="<?= reScale( $monitor['Width'], $scale ) ?>" height="<?= reScale( $monitor['Height'], $scale ) ?>">
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue