From 2271d05d02b60ebc6406e5446640097cc6b61c2d Mon Sep 17 00:00:00 2001 From: stan Date: Wed, 5 May 2004 11:22:50 +0000 Subject: [PATCH] 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 --- web/Makefile.am | 2 -- web/Makefile.in | 2 -- web/zm_funcs.php | 1 + web/zm_html.php | 1 - web/zm_html_view_cycle.php | 5 ++-- web/zm_html_view_imagefetch.php | 45 ------------------------------- web/zm_html_view_montagefeed.php | 10 +++---- web/zm_html_view_montageframe.php | 20 ++------------ web/zm_html_view_watch.php | 10 +------ web/zm_html_view_watchfeed.php | 10 +++---- 10 files changed, 14 insertions(+), 92 deletions(-) delete mode 100644 web/zm_html_view_imagefetch.php diff --git a/web/Makefile.am b/web/Makefile.am index fe445410d..6506a3b7c 100644 --- a/web/Makefile.am +++ b/web/Makefile.am @@ -24,7 +24,6 @@ web_DATA = \ zm_html_view_frame.php \ zm_html_view_frames.php \ zm_html_view_function.php \ - zm_html_view_imagefetch.php \ zm_html_view_login.php \ zm_html_view_logout.php \ zm_html_view_monitor.php \ @@ -88,7 +87,6 @@ EXTRA_DIST = \ zm_html_view_frame.php \ zm_html_view_frames.php \ zm_html_view_function.php \ - zm_html_view_imagefetch.php \ zm_html_view_login.php \ zm_html_view_logout.php \ zm_html_view_monitor.php \ diff --git a/web/Makefile.in b/web/Makefile.in index bb38f61d2..72f9919e5 100644 --- a/web/Makefile.in +++ b/web/Makefile.in @@ -148,7 +148,6 @@ web_DATA = \ zm_html_view_frame.php \ zm_html_view_frames.php \ zm_html_view_function.php \ - zm_html_view_imagefetch.php \ zm_html_view_login.php \ zm_html_view_logout.php \ zm_html_view_monitor.php \ @@ -213,7 +212,6 @@ EXTRA_DIST = \ zm_html_view_frame.php \ zm_html_view_frames.php \ zm_html_view_function.php \ - zm_html_view_imagefetch.php \ zm_html_view_login.php \ zm_html_view_logout.php \ zm_html_view_monitor.php \ diff --git a/web/zm_funcs.php b/web/zm_funcs.php index 842c0e03d..bcbe5cf5d 100644 --- a/web/zm_funcs.php +++ b/web/zm_funcs.php @@ -399,6 +399,7 @@ function createVideo( $event, $rate, $scale, $overwrite=0 ) return( $status?"":rtrim($result) ); } +// Now deprecated function createImage( $monitor, $scale ) { if ( is_array( $monitor ) ) diff --git a/web/zm_html.php b/web/zm_html.php index 7aa57acae..9b173929c 100644 --- a/web/zm_html.php +++ b/web/zm_html.php @@ -124,7 +124,6 @@ switch( $view ) case "watchfeed" : case "watchstatus" : case "watchevents" : - case "imagefetch" : case "settings" : case "events" : case "filter" : diff --git a/web/zm_html_view_cycle.php b/web/zm_html_view_cycle.php index 6b124a8d7..66d25dfcf 100644 --- a/web/zm_html_view_cycle.php +++ b/web/zm_html_view_cycle.php @@ -59,8 +59,6 @@ $scale = (int)(($width_scale<$height_scale)?$width_scale:$height_scale); if ( $mode != "stream" ) { - // Prompt an image to be generated - createImage( $monitor, $scale ); if ( ZM_WEB_REFRESH_METHOD == "http" ) header("Refresh: ".ZM_WEB_REFRESH_IMAGE."; URL=$PHP_SELF?view=watchfeed&mid=$mid&mode=still" ); } @@ -127,8 +125,9 @@ if ( $mode == "stream" ) } else { + $image_src = ZM_PATH_ZMS."?mode=single&monitor=".$monitor['Id']."&scale=".$scale; ?> - + diff --git a/web/zm_html_view_imagefetch.php b/web/zm_html_view_imagefetch.php deleted file mode 100644 index 4e0c63ab4..000000000 --- a/web/zm_html_view_imagefetch.php +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - diff --git a/web/zm_html_view_montagefeed.php b/web/zm_html_view_montagefeed.php index 5c31a254f..1e472f892 100644 --- a/web/zm_html_view_montagefeed.php +++ b/web/zm_html_view_montagefeed.php @@ -46,7 +46,6 @@ $scale = (int)(($width_scale<$height_scale)?$width_scale:$height_scale); if ( $mode != "stream" ) { // Prompt an image to be generated - createImage( $monitor, $scale ); if ( ZM_WEB_REFRESH_METHOD == "http" ) 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("Pragma: no-cache"); // HTTP/1.0 +$image_src = ZM_PATH_ZMS."?mode=single&monitor=".$monitor['Id']."&scale=".$scale; + ?> @@ -70,16 +71,13 @@ if ( $mode != "stream" && ZM_WEB_REFRESH_METHOD == "javascript" ) ?> function fetchImage() { - window.parent.MontageFetch.location.reload( true ); - var now = new Date(); var zm_image = new Image(); - zm_image.src = '.jpg?'+now.getTime(); + zm_image.src = ''+'&'+now.getTime(); document['zmImage'].src = zm_image.src; } -window.parent.MontageFetch.location = '?view=imagefetch&mid=&scale='; window.setInterval( "fetchImage()", ); else { ?> - + diff --git a/web/zm_html_view_montageframe.php b/web/zm_html_view_montageframe.php index 664de0284..346fb86e4 100644 --- a/web/zm_html_view_montageframe.php +++ b/web/zm_html_view_montageframe.php @@ -30,15 +30,7 @@ if ( !canView( 'Stream' ) ) if ( ZM_WEB_COMPACT_MONTAGE ) { ?> - - - - + - + - - - diff --git a/web/zm_html_view_watch.php b/web/zm_html_view_watch.php index db9d4b5d6..fd3dd82c3 100644 --- a/web/zm_html_view_watch.php +++ b/web/zm_html_view_watch.php @@ -44,16 +44,8 @@ window.resizeTo( - + - - - diff --git a/web/zm_html_view_watchfeed.php b/web/zm_html_view_watchfeed.php index f49ab8508..359f2200b 100644 --- a/web/zm_html_view_watchfeed.php +++ b/web/zm_html_view_watchfeed.php @@ -43,7 +43,6 @@ $monitor = mysql_fetch_assoc( $result ); if ( $mode != "stream" ) { // Prompt an image to be generated - createImage( $monitor, $scale ); if ( ZM_WEB_REFRESH_METHOD == "http" ) 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("Pragma: no-cache"); // HTTP/1.0 +$image_src = ZM_PATH_ZMS."?mode=single&monitor=".$monitor['Id']."&scale=".$scale; + ?> @@ -67,16 +68,13 @@ if ( $mode != "stream" && ZM_WEB_REFRESH_METHOD == "javascript" ) ?> function fetchImage() { - window.parent.MonitorFetch.location.reload( true ); - var now = new Date(); var zm_image = new Image(); - zm_image.src = '.jpg?'+now.getTime(); + zm_image.src = ''+'&'+now.getTime(); document['zmImage'].src = zm_image.src; } -window.parent.MonitorFetch.location = '?view=imagefetch&mid=&scale='; window.setInterval( "fetchImage()", ); else { ?> - +