From e6d57da0d4f6ddd1e369431ffbc505408b1b4188 Mon Sep 17 00:00:00 2001 From: SteveGilvarry Date: Tue, 29 Dec 2015 01:37:16 +1100 Subject: [PATCH 1/6] Remove the mobile skin folder --- web/skins/mobile/css/skin.css | 311 ------------------ web/skins/mobile/includes/config.php | 63 ---- .../mobile/includes/control_functions.php | 184 ----------- web/skins/mobile/includes/functions.php | 66 ---- web/skins/mobile/includes/init.php | 29 -- web/skins/mobile/skin.php | 97 ------ web/skins/mobile/views/console.php | 178 ---------- web/skins/mobile/views/css/console.css | 16 - web/skins/mobile/views/devices.php | 73 ---- web/skins/mobile/views/error.php | 34 -- web/skins/mobile/views/event.php | 147 --------- web/skins/mobile/views/eventdetails.php | 86 ----- web/skins/mobile/views/events.php | 157 --------- web/skins/mobile/views/filter.php | 71 ---- web/skins/mobile/views/frame.php | 73 ---- web/skins/mobile/views/function.php | 66 ---- web/skins/mobile/views/login.php | 54 --- web/skins/mobile/views/montage.php | 75 ----- web/skins/mobile/views/state.php | 77 ----- web/skins/mobile/views/video.php | 226 ------------- web/skins/mobile/views/watch.php | 154 --------- 21 files changed, 2237 deletions(-) delete mode 100644 web/skins/mobile/css/skin.css delete mode 100644 web/skins/mobile/includes/config.php delete mode 100644 web/skins/mobile/includes/control_functions.php delete mode 100644 web/skins/mobile/includes/functions.php delete mode 100644 web/skins/mobile/includes/init.php delete mode 100644 web/skins/mobile/skin.php delete mode 100644 web/skins/mobile/views/console.php delete mode 100644 web/skins/mobile/views/css/console.css delete mode 100644 web/skins/mobile/views/devices.php delete mode 100644 web/skins/mobile/views/error.php delete mode 100644 web/skins/mobile/views/event.php delete mode 100644 web/skins/mobile/views/eventdetails.php delete mode 100644 web/skins/mobile/views/events.php delete mode 100644 web/skins/mobile/views/filter.php delete mode 100644 web/skins/mobile/views/frame.php delete mode 100644 web/skins/mobile/views/function.php delete mode 100644 web/skins/mobile/views/login.php delete mode 100644 web/skins/mobile/views/montage.php delete mode 100644 web/skins/mobile/views/state.php delete mode 100644 web/skins/mobile/views/video.php delete mode 100644 web/skins/mobile/views/watch.php diff --git a/web/skins/mobile/css/skin.css b/web/skins/mobile/css/skin.css deleted file mode 100644 index b996392a3..000000000 --- a/web/skins/mobile/css/skin.css +++ /dev/null @@ -1,311 +0,0 @@ -/* - * Primary look and feel styles - */ - -body { - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 100%; - color: #333333; - font-weight: normal; - text-align: center; -} - -h1 { - font-family: inherit; - font-size: 120%; - color: #000066; - font-weight: bold; -} - -h2 { - font-family: inherit; - font-size: 110%; - color: #000066; - font-weight: bold; -} - -h3 { - font-family: inherit; - font-size: 100%; - color: #016A9D; - font-weight: bold; -} - -p { - font-family: inherit; - font-size: 100%; - color: #333333; - font-weight: normal; -} - -th { - font-weight: bold; - color: #016A9D; -} - -a:link { - color: #7F7FB2; - text-decoration: none; -} - -a:visited { - color: #7F7FB2; - text-decoration: none; -} - -a:hover { - color: #666699; - text-decoration: underline; -} - -label { - margin-right: 4px; -} - -input,textarea,select { - border: 1px #7F7FB2 solid; - font-family: inherit; - font-size: 100%; - color: #333333; -} - -input[type=text], input[type=password], textarea { - padding: 1px; -} - -input.noborder { - border: 0; -} - -input[disabled] { - color: #888888; -} - -img.normal { - border: white solid 1px; -} - -img.alarm { - border: red solid 1px; -} - -hr { - height: 1px; - width: 100%; - border: 0; - color: #7f7fb2; - background-color: #7f7fb2; -} - -/* - * Major league table for multiple inputs or presentation - */ - -#content table.major { - margin: 4px auto; - width: 100%; - border-collapse: collapse; -} - -#content table.major tr.highlight { - background-color: #eeeeee; -} - -#content table.major thead tr th { - padding-top: 6px; - padding-bottom: 6px; - vertical-align: middle; -} - -#content table.major tfoot td { - padding-top: 6px; - padding-bottom: 6px; - vertical-align: middle; -} - -#content table.major th, #content table.major td { - border: 1px solid #7f7fb2; - padding: 3px; - text-align: left; -} - -#content table.major th { - vertical-align: bottom; -} - -#content table.major td { - vertical-align: middle; -} - -#content table.major th[scope=row] { - padding: 4px 3px 3px; - vertical-align: top; - text-align: right; -} - -#content table.major .colMark, #content table.major .colSelect { - text-align: center; -} -/* - * Lesser table for very simple forms - */ - -#content table.minor { - width: 200px; - margin: 0 auto; -} - -#content table.minor td { - padding: 4px; -} - -#content table.minor .colLeft { - width: 50%; - text-align: right; -} - -#content table.minor .colRight { - width: 50%; - text-align: left; -} - -#content table.minor input[type=submit] -{ - margin-top: 4px; - padding: 0 2px; - font-size: 120%; -} - -/* - * Behavior classes - */ -.error { - /*font-family: Verdana, Arial, Helvetica, sans-serif;*/ - font-size: 100%; - color: #DC143C; - font-weight: bold; -} - -.warn { - /*font-family: Verdana, Arial, Helvetica, sans-serif;*/ - font-size: 100%; - color: #FF8C00; - font-weight: bold; -} - -.info { - /*font-family: Verdana, Arial, Helvetica, sans-serif;*/ - font-size: 100%; - color: #688E23; - font-weight: bold; -} - -.errorText { - color: #DC143C; -} - -.warnText { - color: #FF8C00; -} - -.infoText { - color: #688E23; -} - -.disabledText { - font-style: italic; -} - -/* - * Generic useful classes, especially with mootools - */ - -.hidden { - display: none; -} - -.invisible { - visibility: hidden; -} - -.nowrap { - white-space: nowrap; -} - -div.clear { - clear: both; -} - -/* - * Primary layout styles - */ - -#page { - width: 100%; -} - -#header { - width: 98%; - line-height: 24px; - margin: 4px auto 0; - clear: both; -} - -#header h2 { - left: 0; -} - -#headerControl { -} - -#headerButtons { - float: right; -} - -#headerButtons a { - margin-left: 8px; -} - -#content { - width: 98%; - margin: 4px auto; - line-height: 130%; - text-align: center; - clear: both; -} - -#contentTable { - width: 100%; -} - -#content p { - margin-top: 4px; -} - -#content p.textblock { - text-align: justify; - padding: 4px; -} - -#content > input[type=submit], #content > input[type=button] { - margin-top: 4px; -} - -#content table input[type=submit], #content table input[type=button] { - margin-top: 0; -} - -#contentButtons { - margin: 4px auto 0; -} - -#contentButtons input, #contentButtons a { - margin: 0 4px; -} - -#footer { - width: 98%; - margin: 4px auto 0; - clear: both; -} - diff --git a/web/skins/mobile/includes/config.php b/web/skins/mobile/includes/config.php deleted file mode 100644 index fc1eba9bb..000000000 --- a/web/skins/mobile/includes/config.php +++ /dev/null @@ -1,63 +0,0 @@ - "50x", - "2000" => "20x", - "500" => "5x", - "200" => "2x", - "100" => translate('Real'), - "50" => "1/2x", -); - -$scales = array( - "400" => "4x", - "300" => "3x", - "200" => "2x", - "150" => "1.5x", - "100" => translate('Actual'), - "75" => "3/4x", - "50" => "1/2x", - "33" => "1/3x", - "25" => "1/4x", -); - -switch ( $_COOKIE['zmBandwidth'] ) -{ - case "phone" : // Very incomplete at present - { - define( "ZM_WEB_CAN_STREAM", ZM_WEB_P_CAN_STREAM ); // Override the automatic detection of browser streaming capability - define( "ZM_WEB_STREAM_METHOD", ZM_WEB_P_STREAM_METHOD ); // Which method should be used to send video streams to your brow - define( "ZM_WEB_DEFAULT_SCALE", ZM_WEB_P_DEFAULT_SCALE ); // What the default scaling factor applied to 'live' or 'event' views is (%) - define( "ZM_WEB_DEFAULT_RATE", ZM_WEB_P_DEFAULT_RATE ); // What the default replay rate factor applied to 'event' views is (%) - define( "ZM_WEB_VIDEO_BITRATE", ZM_WEB_P_VIDEO_BITRATE ); // What the bitrate of any streamed video should be - define( "ZM_WEB_VIDEO_MAXFPS", ZM_WEB_P_VIDEO_MAXFPS ); // What the maximum frame rate of any streamed video should be - define( "ZM_WEB_SCALE_THUMBS", ZM_WEB_P_SCALE_THUMBS ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling - define( "ZM_WEB_AJAX_TIMEOUT", ZM_WEB_P_AJAX_TIMEOUT ); // Timeout to use for Ajax requests, no timeout used if unset - - break; - } -} - -?> diff --git a/web/skins/mobile/includes/control_functions.php b/web/skins/mobile/includes/control_functions.php deleted file mode 100644 index 3a12cf467..000000000 --- a/web/skins/mobile/includes/control_functions.php +++ /dev/null @@ -1,184 +0,0 @@ - -
-
-
- -
- - " name="preset" value=""/> - -
-
-
-
- diff --git a/web/skins/mobile/includes/functions.php b/web/skins/mobile/includes/functions.php deleted file mode 100644 index aadbe435f..000000000 --- a/web/skins/mobile/includes/functions.php +++ /dev/null @@ -1,66 +0,0 @@ -'."\n" ); -?> - - - - <?php echo ZM_WEB_TITLE_PREFIX ?> - <?php echo $title ?> - - - - - - - - - - - diff --git a/web/skins/mobile/includes/init.php b/web/skins/mobile/includes/init.php deleted file mode 100644 index ae92bcdee..000000000 --- a/web/skins/mobile/includes/init.php +++ /dev/null @@ -1,29 +0,0 @@ - diff --git a/web/skins/mobile/skin.php b/web/skins/mobile/skin.php deleted file mode 100644 index 51ea63e01..000000000 --- a/web/skins/mobile/skin.php +++ /dev/null @@ -1,97 +0,0 @@ -GetDeviceCapabilitiesFromAgent($_SERVER['HTTP_USER_AGENT']); - - //print_r( $wurfl->wurfl_agent ); - if ( $wurfl->wurfl_agent ) - { - if ( $wurfl->getDeviceCapability( 'html_wi_oma_xhtmlmp_1_0' ) ) - { - $device['width'] = $wurfl->getDeviceCapability( 'resolution_width' ); - $device['height'] = $wurfl->getDeviceCapability( 'resolution_height' ); - } - } -} -else -{ - // This is an example of using fixed device strings to just match your phone etc - $devices = array( - array( 'name'=>"Motorola V600", 'ua_match'=>"MOT-V600", 'skin'=>"mobile", 'cookies'=>false, 'width'=>176, 'height'=>220 ), - ); - - foreach ( $devices as $tempDevice ) - { - if ( preg_match( '/'.$tempDevice['ua_match'].'/', $_SERVER['HTTP_USER_AGENT'] ) ) - { - $skin = $tempDevice['skin']; - $cookies = $tempDevice['cookies']; - break; - } - } -} - -foreach ( getSkinIncludes( 'includes/config.php' ) as $includeFile ) - require_once $includeFile; - -foreach ( getSkinIncludes( 'includes/functions.php' ) as $includeFile ) - require_once $includeFile; - -if ( empty($view) ) - $view = isset($user)?'console':'login'; - -if ( !isset($user) && ZM_OPT_USE_AUTH && ZM_AUTH_TYPE == "remote" && !empty( $_SERVER['REMOTE_USER']) ) -{ - $view = "postlogin"; - $action = "login"; - $_REQUEST['username'] = $_SERVER['REMOTE_USER']; -} - -// If there are additional actions -foreach ( getSkinIncludes( 'includes/actions.php' ) as $includeFile ) - require_once $includeFile; - -?> diff --git a/web/skins/mobile/views/console.php b/web/skins/mobile/views/console.php deleted file mode 100644 index 50b5f4775..000000000 --- a/web/skins/mobile/views/console.php +++ /dev/null @@ -1,178 +0,0 @@ - array( - "terms" => array( - array( "attr" => "Archived", "op" => "=", "val" => "0" ), - array( "cnj" => "and", "attr" => "DateTime", "op" => ">=", "val" => "-1 hour" ), - ) - ), - ), - // Today - array( - "filter" => array( - "terms" => array( - array( "attr" => "Archived", "op" => "=", "val" => "0" ), - array( "cnj" => "and", "attr" => "DateTime", "op" => ">=", "val" => "today" ), - ) - ), - ), -); - -$running = daemonCheck(); -$status = $running?translate('Running'):translate('Stopped'); - -if ( $group = dbFetchOne( "select * from Groups where Name = 'Mobile'" ) ) - $groupIds = array_flip(explode( ',', $group['MonitorIds'] )); - -$maxWidth = 0; -$maxHeight = 0; -$cycleCount = 0; -$monitors = dbFetchAll( "select * from Monitors order by Sequence asc" ); -for ( $i = 0; $i < count($monitors); $i++ ) -{ - if ( !visibleMonitor( $monitors[$i]['Id'] ) ) - { - continue; - } - if ( $group && !empty($groupIds) && !array_key_exists( $monitors[$i]['Id'], $groupIds ) ) - { - continue; - } - $monitors[$i]['Show'] = true; - $monitors[$i]['zmc'] = zmcStatus( $monitors[$i] ); - $monitors[$i]['zma'] = zmaStatus( $monitors[$i] ); - $counts = array(); - for ( $j = 0; $j < count($eventCounts); $j++ ) - { - $filter = addFilterTerm( $eventCounts[$j]['filter'], count($eventCounts[$j]['filter']['terms']), array( "cnj" => "and", "attr" => "MonitorId", "op" => "=", "val" => $monitors[$i]['Id'] ) ); - parseFilter( $filter, false, '&' ); - $counts[] = "count(if(1".$filter['sql'].",1,NULL)) as EventCount$j"; - $monitors[$i]['eventCounts'][$j]['filter'] = $filter; - } - $sql = "select ".join($counts,", ")." from Events as E where MonitorId = '".$monitors[$i]['Id']."'"; - $counts = dbFetchOne( $sql ); - if ( $monitors[$i]['Function'] != 'None' ) - { - $cycleCount++; - if ( $maxWidth < $monitors[$i]['Width'] ) $maxWidth = $monitors[$i]['Width']; - if ( $maxHeight < $monitors[$i]['Height'] ) $maxHeight = $monitors[$i]['Height']; - } - $monitors[$i] = array_merge( $monitors[$i], $counts ); -} - -xhtmlHeaders( __FILE__, translate('Console') ); -?> - -
- -
- - - - - - - - - - - - - - - - - 1 ) { -?> - - - - - - - -
".substr( $monitor['Function'], 0, 4 )."", canEdit( 'Monitors' ) ) ?>
  
-
-
- - diff --git a/web/skins/mobile/views/css/console.css b/web/skins/mobile/views/css/console.css deleted file mode 100644 index 49c711039..000000000 --- a/web/skins/mobile/views/css/console.css +++ /dev/null @@ -1,16 +0,0 @@ -#systemTime { - float: left; -} - -#systemState { - margin: 0 auto; - text-align: center; -} - -#systemStats { - float: right; -} - -td.colEvents { - text-align: right; -} diff --git a/web/skins/mobile/views/devices.php b/web/skins/mobile/views/devices.php deleted file mode 100644 index add0a6bc5..000000000 --- a/web/skins/mobile/views/devices.php +++ /dev/null @@ -1,73 +0,0 @@ - - -
- -
- - - - - - - - -
-

-
-
- - diff --git a/web/skins/mobile/views/error.php b/web/skins/mobile/views/error.php deleted file mode 100644 index 33e99f09a..000000000 --- a/web/skins/mobile/views/error.php +++ /dev/null @@ -1,34 +0,0 @@ - - -
- -
-

-

-
-
- - diff --git a/web/skins/mobile/views/event.php b/web/skins/mobile/views/event.php deleted file mode 100644 index ead6b6eae..000000000 --- a/web/skins/mobile/views/event.php +++ /dev/null @@ -1,147 +0,0 @@ -= ?".$_REQUEST['filter']['sql'].$midSql." order by $sortColumn asc"; -} -$result = dbQuery( $sql, array( $event[$_REQUEST['sort_field']] ) ); -while ( $row = dbFetchNext( $result ) ) -{ - if ( $row['Id'] == $_REQUEST['eid'] ) - { - $prevEvent = dbFetchNext( $result ); - break; - } -} - -$sql = "select E.* from Events as E inner join Monitors as M on E.MonitorId = M.Id where $sortColumn ".($sortOrder=='asc'?'>=':'<=').' ?'.$_REQUEST['filter']['sql'].$midSql." order by $sortColumn $sortOrder"; -$result = dbQuery( $sql, array($event[$_REQUEST['sort_field']]) ); -while ( $row = dbFetchNext( $result ) ) -{ - if ( $row['Id'] == $_REQUEST['eid'] ) - { - $nextEvent = dbFetchNext( $result ); - break; - } -} - -$framesPerPage = 15; -$framesPerLine = 3; -$maxShortcuts = 3; - -$paged = $event['Frames'] > $framesPerPage; - -if ( $paged && !empty($_REQUEST['page']) ) -{ - $loFrameId = (($_REQUEST['page']-1)*$framesPerPage)+1; - $hiFrameId = min( $_REQUEST['page']*$framesPerPage, $event['Frames'] ); -} -else -{ - $loFrameId = 1; - $hiFrameId = $event['Frames']; -} - -$sql = 'SELECT * FROM Frames WHERE EventID = ?'; -if ( $paged && !empty($_REQUEST['page']) ) - $sql .= " and FrameId between $loFrameId and $hiFrameId"; -$sql .= " order by FrameId"; -$frames = dbFetchAll( $sql, NULL, array( $_REQUEST['eid'] ) ); - -$scale = getDeviceScale( $event['Width'], $event['Height'], $framesPerLine+0.3 ); - -$pages = (int)ceil($event['Frames']/$framesPerPage); -if ( !empty($_REQUEST['fid']) ) - $_REQUEST['page'] = ($_REQUEST['fid']/$framesPerPage)+1; - -$pagination = getPagination( $pages, $_REQUEST['page'], $maxShortcuts, '&eid='.$_REQUEST['eid'].$filterQuery.$sortQuery, '&' ); - -xhtmlHeaders( __FILE__, translate('Event').' - '.$event['Name'] ); -?> - -
- -
- -

- -
- - <?php echo $frame['Type'] ?>/<?php echo $frame['Type']=='Alarm'?$frame['Score']:0 ?> - -
-
-
- - diff --git a/web/skins/mobile/views/eventdetails.php b/web/skins/mobile/views/eventdetails.php deleted file mode 100644 index deee5eef2..000000000 --- a/web/skins/mobile/views/eventdetails.php +++ /dev/null @@ -1,86 +0,0 @@ - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
s
()
//
-
- 1 - <?php echo $frame['FrameId'] ?> -
-
- - -
-
-
- - diff --git a/web/skins/mobile/views/events.php b/web/skins/mobile/views/events.php deleted file mode 100644 index 40dd6eff8..000000000 --- a/web/skins/mobile/views/events.php +++ /dev/null @@ -1,157 +0,0 @@ -$deviceLines)?$deviceLines:$limitLeft; - } - $eventsSql .= " limit $limitStart, $limitAmount"; -} -elseif ( !empty( $_REQUEST['limit'] ) ) -{ - $eventsSql .= " limit 0, ".$_REQUEST['limit']; -} - -$nEvents = dbFetchOne( $countSql, 'EventCount' ); -if ( !empty($limit) && $nEvents > $_REQUEST['limit'] ) -{ - $nEvents = $_REQUEST['limit']; -} -$pages = (int)ceil($nEvents/$deviceLines); - -$maxShortcuts = 3; -$pagination = getPagination( $pages, $_REQUEST['page'], $maxShortcuts, $filterQuery.$sortQuery.'&limit='.$_REQUEST['limit'], '&' ); - -xhtmlHeaders( __FILE__, translate('Events') ); -?> - -
- -
- -

- - - - - - - - - - - - - - - - - - - -
-

-
-
- - diff --git a/web/skins/mobile/views/filter.php b/web/skins/mobile/views/filter.php deleted file mode 100644 index 4613f3c3c..000000000 --- a/web/skins/mobile/views/filter.php +++ /dev/null @@ -1,71 +0,0 @@ - - -
- -
-
- - 0 ) -{ -?> -
- -
-
- -
- -

- -
-
-
- - diff --git a/web/skins/mobile/views/frame.php b/web/skins/mobile/views/frame.php deleted file mode 100644 index f9bb41633..000000000 --- a/web/skins/mobile/views/frame.php +++ /dev/null @@ -1,73 +0,0 @@ - - -
- -
- "> -
- 1 ) { ?> - << - 1 ) { ?> - < - - > - - >> - -
-
-
- - diff --git a/web/skins/mobile/views/function.php b/web/skins/mobile/views/function.php deleted file mode 100644 index 421d91063..000000000 --- a/web/skins/mobile/views/function.php +++ /dev/null @@ -1,66 +0,0 @@ - - -
- -
-
- -
- -
-
- checked="checked"/> -
-
- -
-
-
-
- - diff --git a/web/skins/mobile/views/login.php b/web/skins/mobile/views/login.php deleted file mode 100644 index 6eb0b7db9..000000000 --- a/web/skins/mobile/views/login.php +++ /dev/null @@ -1,54 +0,0 @@ - - -
- -
-
- - - - - - - - - - -
" size="12"/>
-
- -
-
-
-
- - diff --git a/web/skins/mobile/views/montage.php b/web/skins/mobile/views/montage.php deleted file mode 100644 index 8311fe6f4..000000000 --- a/web/skins/mobile/views/montage.php +++ /dev/null @@ -1,75 +0,0 @@ - - -
- -
-
- - <?php echo $monitor['Name'] ?> - -
-
-
-
- - diff --git a/web/skins/mobile/views/state.php b/web/skins/mobile/views/state.php deleted file mode 100644 index 51cf71624..000000000 --- a/web/skins/mobile/views/state.php +++ /dev/null @@ -1,77 +0,0 @@ - - -
- -
-
- - -
- -
-
-
-
- - diff --git a/web/skins/mobile/views/video.php b/web/skins/mobile/views/video.php deleted file mode 100644 index 8f7ac8654..000000000 --- a/web/skins/mobile/views/video.php +++ /dev/null @@ -1,226 +0,0 @@ -= 352 && $deviceHeight >= 288 ) - $videoSize = "352x288"; -elseif ( $deviceWidth >= 176 && $deviceHeight >= 144 ) - $videoSize = "176x144"; -else - $videoSize = "128x96"; - -$eventWidth = $event['Width']; -$eventHeight = $event['Height']; - -if ( !isset( $rate ) ) - $_REQUEST['rate'] = reScale( RATE_BASE, $event['DefaultRate'], ZM_WEB_DEFAULT_RATE ); - -$eventPath = ZM_DIR_EVENTS.'/'.getEventPath( $event ); - -$videoFormats = array(); -$ffmpegFormats = preg_split( '/\s+/', ZM_FFMPEG_FORMATS ); -foreach ( $ffmpegFormats as $ffmpegFormat ) -{ - preg_match( '/^([^*]+)(\**)$/', $ffmpegFormat, $matches ); - $videoFormats[$matches[1]] = $matches[1]; - if ( $matches[2] == '*' ) - $defaultVideoFormat = $matches[1]; - elseif ( $matches[2] == '**' ) - $defaultPhoneFormat = $matches[1]; -} -if ( !isset($_REQUEST['videoFormat']) ) -{ - if ( isset($defaultPhoneFormat) ) - $_REQUEST['videoFormat'] = $defaultPhoneFormat; - elseif ( isset($defaultVideoFormat) ) - $_REQUEST['videoFormat'] = $defaultVideoFormat; - else - $videoFormat = $ffmpegFormats[0]; -} - -if ( !empty($_REQUEST['generate']) ) -{ - $videoFile = createVideo( $event, $_REQUEST['videoFormat'], $_REQUEST['rate'], $videoSize, !empty($_REQUEST['overwrite']) ); -} - -$videoFiles = array(); -if ( $dir = opendir( $eventPath ) ) -{ - while ( ($file = readdir( $dir )) !== false ) - { - $file = $eventPath.'/'.$file; - if ( is_file( $file ) ) - { - if ( preg_match( '/-S([\da-z]+)\.(?:'.join( '|', $videoFormats ).')$/', $file, $matches ) ) - { - if ( $matches[1] == $videoSize ) - { - $videoFiles[] = $file; - } - } - } - } - closedir( $dir ); -} - -if ( isset($_REQUEST['download']) ) -{ - header( "Content-type: ".getMimeType($videoFiles[$_REQUEST['download']])); - header( "Content-length: ".filesize($videoFiles[$_REQUEST['download']])); - header( "Content-disposition: attachment; filename=".preg_replace( "/^.*\//", "", $videoFiles[$_REQUEST['download']] )."; size=".filesize($videoFiles[$_REQUEST['download']]) ); - readfile( $videoFiles[$_REQUEST['download']] ); - exit; -} - -xhtmlHeaders( __FILE__, translate('Video').' - '.$event['Name'] ); -?> - -
-
-
- - - - - - - - - - - - - - -
checked="checked"/>
-
-
- -

- -

- - -

- - - - - - - - - 0 ) - { - $index = 0; - foreach ( $videoFiles as $file ) - { - preg_match( '/^(.+)-((?:r[_\d]+)|(?:F[_\d]+))-((?:s[_\d]+)|(?:S[0-9a-z]+))\.([^.]+)$/', $file, $matches ); - if ( preg_match( '/^r(.+)$/', $matches[2], $temp_matches ) ) - { - $rate = (int)(100 * preg_replace( '/_/', '.', $temp_matches[1] ) ); - $rateText = isset($rates[$rate])?$rates[$rate]:($rate."x"); - } - elseif ( preg_match( '/^F(.+)$/', $matches[2], $temp_matches ) ) - { - $rateText = $temp_matches[1]."fps"; - } - if ( preg_match( '/^s(.+)$/', $matches[3], $temp_matches ) ) - { - $scale = (int)(100 * preg_replace( '/_/', '.', $temp_matches[1] ) ); - $scaleText = isset($scales[$scale])?$scales[$scale]:($scale."x"); - } - elseif ( preg_match( '/^S(.+)$/', $matches[3], $temp_matches ) ) - { - $scaleText = $temp_matches[1]; - } -?> - - - - - - - - -
 / 
- -

- -
-
- - diff --git a/web/skins/mobile/views/watch.php b/web/skins/mobile/views/watch.php deleted file mode 100644 index b61001db9..000000000 --- a/web/skins/mobile/views/watch.php +++ /dev/null @@ -1,154 +0,0 @@ - - -
-
-

 -  fps

-

- - - -

- -
- -
- -
- - - -
- -
-
- - From 7c7d7b245c09e31c5bd362b10422d672259ddd93 Mon Sep 17 00:00:00 2001 From: SteveGilvarry Date: Tue, 29 Dec 2015 01:38:16 +1100 Subject: [PATCH 2/6] Remove the XML skin folder --- web/skins/xml/includes/config.php | 155 ---------- web/skins/xml/includes/functions.php | 447 --------------------------- web/skins/xml/includes/init.php | 2 - web/skins/xml/skin.php | 47 --- web/skins/xml/views/actions.php | 392 ----------------------- web/skins/xml/views/console.php | 259 ---------------- web/skins/xml/views/none.php | 0 web/skins/xml/views/notfound.png | Bin 7332 -> 0 bytes 8 files changed, 1302 deletions(-) delete mode 100644 web/skins/xml/includes/config.php delete mode 100644 web/skins/xml/includes/functions.php delete mode 100644 web/skins/xml/includes/init.php delete mode 100644 web/skins/xml/skin.php delete mode 100644 web/skins/xml/views/actions.php delete mode 100644 web/skins/xml/views/console.php delete mode 100644 web/skins/xml/views/none.php delete mode 100644 web/skins/xml/views/notfound.png diff --git a/web/skins/xml/includes/config.php b/web/skins/xml/includes/config.php deleted file mode 100644 index 66d3af5ee..000000000 --- a/web/skins/xml/includes/config.php +++ /dev/null @@ -1,155 +0,0 @@ - "100x", - "5000" => "50x", - "2500" => "25x", - "1000" => "10x", - "400" => "4x", - "200" => "2x", - "100" => translate('Real'), - "50" => "1/2x", - "25" => "1/4x", -); - -$scales = array( - "400" => "4x", - "300" => "3x", - "200" => "2x", - "150" => "1.5x", - "100" => translate('Actual'), - "75" => "3/4x", - "50" => "1/2x", - "33" => "1/3x", - "25" => "1/4x", -); - -$bwArray = array( - "high" => translate('High'), - "medium" => translate('Medium'), - "low" => translate('Low') -); - -/* Check if ZM_WEB_L_CAN_STREAM and ZM_WEB_L_STREAM_METHOD are defined */ -if (!defined("ZM_WEB_L_CAN_STREAM")) { - define ("ZM_WEB_L_CAN_STREAM", 1); - define ("ZM_WEB_M_CAN_STREAM", 1); - define ("ZM_WEB_H_CAN_STREAM", 1); -} -if (!defined("ZM_WEB_L_STREAM_METHOD")) { - define ("ZM_WEB_L_STREAM_METHOD", "jpeg"); - define ("ZM_WEB_M_STREAM_METHOD", "jpeg"); - define ("ZM_WEB_H_STREAM_METHOD", "jpeg"); -} - -switch ( $_COOKIE['zmBandwidth'] ) -{ - case "high" : - { - define( "ZM_WEB_REFRESH_MAIN", ZM_WEB_H_REFRESH_MAIN ); // How often (in seconds) the main console window refreshes - define( "ZM_WEB_REFRESH_CYCLE", ZM_WEB_H_REFRESH_CYCLE ); // How often the cycle watch windows swaps to the next monitor - define( "ZM_WEB_REFRESH_IMAGE", ZM_WEB_H_REFRESH_IMAGE ); // How often the watched image is refreshed (if not streaming) - define( "ZM_WEB_REFRESH_STATUS", ZM_WEB_H_REFRESH_STATUS ); // How often the little status frame refreshes itself in the watch window - define( "ZM_WEB_REFRESH_EVENTS", ZM_WEB_H_REFRESH_EVENTS ); // How often the event listing is refreshed in the watch window, only for recent events - define( "ZM_WEB_CAN_STREAM", ZM_WEB_H_CAN_STREAM ); // Override the automatic detection of browser streaming capability - define( "ZM_WEB_STREAM_METHOD", ZM_WEB_H_STREAM_METHOD ); // Which method should be used to send video streams to your browser - define( "ZM_WEB_DEFAULT_SCALE", ZM_WEB_H_DEFAULT_SCALE ); // What the default scaling factor applied to 'live' or 'event' views is (%) - define( "ZM_WEB_DEFAULT_RATE", ZM_WEB_H_DEFAULT_RATE ); // What the default replay rate factor applied to 'event' views is (%) - define( "ZM_WEB_VIDEO_BITRATE", ZM_WEB_H_VIDEO_BITRATE ); // What the bitrate of any streamed video should be - define( "ZM_WEB_VIDEO_MAXFPS", ZM_WEB_H_VIDEO_MAXFPS ); // What the maximum frame rate of any streamed video should be - define( "ZM_WEB_SCALE_THUMBS", ZM_WEB_H_SCALE_THUMBS ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling - define( "ZM_WEB_EVENTS_VIEW", ZM_WEB_H_EVENTS_VIEW ); // What the default view of multiple events should be. - define( "ZM_WEB_SHOW_PROGRESS", ZM_WEB_H_SHOW_PROGRESS ); // Whether to show the progress of replay in event view. - define( "ZM_WEB_AJAX_TIMEOUT", ZM_WEB_H_AJAX_TIMEOUT ); // Timeout to use for Ajax requests, no timeout used if unset - break; - } - case "medium" : - { - define( "ZM_WEB_REFRESH_MAIN", ZM_WEB_M_REFRESH_MAIN ); // How often (in seconds) the main console window refreshes - define( "ZM_WEB_REFRESH_CYCLE", ZM_WEB_M_REFRESH_CYCLE ); // How often the cycle watch windows swaps to the next monitor - define( "ZM_WEB_REFRESH_IMAGE", ZM_WEB_M_REFRESH_IMAGE ); // How often the watched image is refreshed (if not streaming) - define( "ZM_WEB_REFRESH_STATUS", ZM_WEB_M_REFRESH_STATUS ); // How often the little status frame refreshes itself in the watch window - define( "ZM_WEB_REFRESH_EVENTS", ZM_WEB_M_REFRESH_EVENTS ); // How often the event listing is refreshed in the watch window, only for recent events - define( "ZM_WEB_CAN_STREAM", ZM_WEB_M_CAN_STREAM ); // Override the automatic detection of browser streaming capability - define( "ZM_WEB_STREAM_METHOD", ZM_WEB_M_STREAM_METHOD ); // Which method should be used to send video streams to your browser - define( "ZM_WEB_DEFAULT_SCALE", ZM_WEB_M_DEFAULT_SCALE ); // What the default scaling factor applied to 'live' or 'event' views is (%) - define( "ZM_WEB_DEFAULT_RATE", ZM_WEB_M_DEFAULT_RATE ); // What the default replay rate factor applied to 'event' views is (%) - define( "ZM_WEB_VIDEO_BITRATE", ZM_WEB_M_VIDEO_BITRATE ); // What the bitrate of any streamed video should be - define( "ZM_WEB_VIDEO_MAXFPS", ZM_WEB_M_VIDEO_MAXFPS ); // What the maximum frame rate of any streamed video should be - define( "ZM_WEB_SCALE_THUMBS", ZM_WEB_M_SCALE_THUMBS ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling - define( "ZM_WEB_EVENTS_VIEW", ZM_WEB_M_EVENTS_VIEW ); // What the default view of multiple events should be. - define( "ZM_WEB_SHOW_PROGRESS", ZM_WEB_M_SHOW_PROGRESS ); // Whether to show the progress of replay in event view. - define( "ZM_WEB_AJAX_TIMEOUT", ZM_WEB_M_AJAX_TIMEOUT ); // Timeout to use for Ajax requests, no timeout used if unset - break; - } - case "low" : - { - define( "ZM_WEB_REFRESH_MAIN", ZM_WEB_L_REFRESH_MAIN ); // How often (in seconds) the main console window refreshes - define( "ZM_WEB_REFRESH_CYCLE", ZM_WEB_L_REFRESH_CYCLE ); // How often the cycle watch windows swaps to the next monitor - define( "ZM_WEB_REFRESH_IMAGE", ZM_WEB_L_REFRESH_IMAGE ); // How often the watched image is refreshed (if not streaming) - define( "ZM_WEB_REFRESH_STATUS", ZM_WEB_L_REFRESH_STATUS ); // How often the little status frame refreshes itself in the watch window - define( "ZM_WEB_REFRESH_EVENTS", ZM_WEB_L_REFRESH_EVENTS ); // How often the event listing is refreshed in the watch window, only for recent events - define( "ZM_WEB_CAN_STREAM", ZM_WEB_L_CAN_STREAM ); // Override the automatic detection of browser streaming capability - define( "ZM_WEB_STREAM_METHOD", ZM_WEB_L_STREAM_METHOD ); // Which method should be used to send video streams to your browser - define( "ZM_WEB_DEFAULT_SCALE", ZM_WEB_L_DEFAULT_SCALE ); // What the default scaling factor applied to 'live' or 'event' views is (%) - define( "ZM_WEB_DEFAULT_RATE", ZM_WEB_L_DEFAULT_RATE ); // What the default replay rate factor applied to 'event' views is (%) - define( "ZM_WEB_VIDEO_BITRATE", ZM_WEB_L_VIDEO_BITRATE ); // What the bitrate of any streamed video should be - define( "ZM_WEB_VIDEO_MAXFPS", ZM_WEB_L_VIDEO_MAXFPS ); // What the maximum frame rate of any streamed video should be - define( "ZM_WEB_SCALE_THUMBS", ZM_WEB_L_SCALE_THUMBS ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling - define( "ZM_WEB_EVENTS_VIEW", ZM_WEB_L_EVENTS_VIEW ); // What the default view of multiple events should be. - define( "ZM_WEB_SHOW_PROGRESS", ZM_WEB_L_SHOW_PROGRESS ); // Whether to show the progress of replay in event view. - define( "ZM_WEB_AJAX_TIMEOUT", ZM_WEB_L_AJAX_TIMEOUT ); // Timeout to use for Ajax requests, no timeout used if unset - break; - } -} - -?> diff --git a/web/skins/xml/includes/functions.php b/web/skins/xml/includes/functions.php deleted file mode 100644 index b84e65464..000000000 --- a/web/skins/xml/includes/functions.php +++ /dev/null @@ -1,447 +0,0 @@ - $maj) return 1; - if ((getClientVerMaj() == $maj) && (getClientVerMin() >= $min)) return 1; - return 0; -} -function logXmlErr($str) -{ - logXml($str, 1); -} -function logXml($str, $err = 0) -{ - if (!defined("ZM_EYEZM_DEBUG")) { - /* Check session variable */ - if (isset($_SESSION['xml_debug'])) define("ZM_EYEZM_DEBUG", $_SESSION['xml_debug']); - else define ("ZM_EYEZM_DEBUG", "0"); - } - if (!defined("ZM_EYEZM_LOG_TO_FILE")) { - /* Check session variable */ - if (isset($_SESSION['xml_log_to_file'])) define("ZM_EYEZM_LOG_TO_FILE", $_SESSION['xml_log_to_file']); - else define ("ZM_EYEZM_LOG_TO_FILE", "1"); - } - if (!defined("ZM_EYEZM_LOG_FILE")) { - /* Check session variable */ - if (isset($_SESSION['xml_log_file'])) define("ZM_EYEZM_LOG_FILE", $_SESSION['xml_log_file']); - else define ("ZM_EYEZM_LOG_FILE", "/tmp/zm_xml.log"); - } - /* Only log if debug is enabled */ - if (ZM_EYEZM_DEBUG == 0) return; - /* Logging is enabled, set log string */ - $logstr = "XML_LOG (".($err?"ERROR":"NOTICE")."): ".$str.(ZM_EYEZM_LOG_TO_FILE?"\n":""); - if (ZM_EYEZM_LOG_TO_FILE) { - error_log("[".date("r")."] ".$logstr, 3, ZM_EYEZM_LOG_FILE); - } else { - error_log($logstr); - } -} -/* Returns defval if varname is not set, otherwise return varname */ -function getset($varname, $defval) -{ - if (isset($_GET[$varname])) return $_GET[$varname]; - return $defval; -} -function xml_header() -{ - header ("content-type: text/xml"); - echo ""; -} -function xml_tag_val($tag, $val) -{ - echo "<".$tag.">".$val.""; -} -function xml_tag_sec($tag, $open) -{ - if ($open) $tok = "<"; - else $tok = ""; -} -function xhtmlHeaders( $file, $title ) -{ -?> - - - - - - - /dev/null")) > 0) { - /* More than one match */ - return TRUE; - } else { - /* Check -formats tag also if we fail -codecs */ - if (preg_match("/\b".$codec."\b/", shell_exec(getFfmpegPath()." -formats 2> /dev/null")) > 0) return TRUE; - return FALSE; - } -} -function exeExists($exepath) -{ - $path = trim($exepath); - return (file_exists($path) && is_readable($path) && ($path != "")); -} -/* Returns whether ffmpeg exists or not */ -function ffmpegExists() -{ - return exeExists(getFfmpegPath()); -} -/* Returns with PHP-GD exists */ -function gdExists() -{ - if (extension_loaded('gd') && function_exists('gd_info')) { - return TRUE; - } - return FALSE; -} - -function getFfmpeg264FoutParms($br, $fout) -{ - $ffparms = "-analyzeduration 0 -acodec copy"; - $ffparms .= " -vcodec libx264 -b ".$br; - $ffparms .= " -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8"; - $ffparms .= " -subq 5 -trellis 1 -refs 1 -coder 0 -me_range 16 -keyint_min 25"; - $ffparms .= " -sc_threshold 40 -i_qfactor 0.71 -bt 16k"; - $ffparms .= " -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6"; - $ffparms .= " -qmin 10 -qmax 51 -qdiff 4 -level 30"; - $ffparms .= " -g 30 -analyzeduration 0 -async 2 ".$fout." 2> /dev/null"; - return $ffparms; -} -/** Return FFMPEG parameters for H264 streaming */ -function getFfmpeg264Str($width, $height, $br, $fin, $fout) -{ - $ffparms = getFfmpeg264FoutParms($br, $fout); - $ffstr = getFfmpegPath()." -t ".ZM_EYEZM_H264_MAX_DURATION." -analyzeduration 0 -i "; - $ffstr .= $fin." -f mpegts ".$ffparms; - return $ffstr; -} -/** Returns true when monitor exists */ -function isMonitor($monitor) -{ - $query = "select Id from Monitors where Id = ?"; - $res = dbFetchOne($query, NULL, array($monitor)); - if ($res) return TRUE; - logXml("Monitor ID ".$monitor." does not exist"); - return FALSE; -} -/** Returns the width and height of a monitor */ -function getMonitorDims($monitor) -{ - $query = "select Width,Height from Monitors where Id = ?"; - $res = dbFetchOne($query, NULL, array( $monitor ) ); - return $res; -} -/** Returns the temp directory for H264 encoding */ -function getTempDir() -{ - /* Assume that the directory structure is /skins/xml/views */ - return dirname(__FILE__)."/../../../temp"; -} -/** Returns the name of the m3u8 playlist based on monitor */ -function m3u8fname($monitor) { - return "stream_".$monitor.".m3u8"; -} - -/** Erases the M3u8 and TS file names for a given monitor */ -function eraseH264Files($monitor) { - /** NOTE: This command executes an 'rm' command, so $monitor parameter - * should be properly validated before executing */ - /* Remove wdir/.m3u8 and wdir/sample_*.ts */ - shell_exec("rm -f ".getTempDir()."/".m3u8fname($monitor)." ".getTempDir()."/sample_".$monitor."*.ts"); -} -function kill264proc($monitor) { - /** NOTE: This command executes an 'kill' command, so $monitor parameter - * should be properly validated before executing */ - $pid = trim(shell_exec("pgrep -f -x \"zmstreamer -m ".$monitor."\"")); - if ($pid == "") { - logXml("No PID found for ZMStreamer to kill"); - } else { - shell_exec("kill -9 ".$pid); - logXml("Killed process ".$pid." for Monitor ".$monitor); - } -} -/** Return the command-line shell function to setup H264 stream */ -function stream264fn ($mid, $width, $height, $br) { - $cdir = "./temp"; - $zmstrm = "zmstreamer -m ".$mid." 2> /dev/null"; - $ffstr = getFfmpeg264Str($width, $height, $br, "-", "-"); - $seg = "segmenter - ".ZM_EYEZM_SEG_DURATION." ".$cdir."/sample_".$mid." ".$cdir."/".m3u8fname($mid)." ../ 2> /dev/null"; - $url = $zmstrm . " | ".$ffstr." | " . $seg; - return "nohup ".$url." & echo $!"; -} - -/** Generate the web-page presented to the viewer when using H264 */ -function h264vidHtml($width, $height, $monitor, $br, $thumbsrc) { - function printTermLink() { - $str = "H264 Streaming Launching...
Tap to re-load if stream fails"; - $str2 = "document.getElementById(\"loaddiv\").innerHTML = \"".$str."\";"; - echo $str2; - - } - $ajaxUrl = "?view=actions&action=spawn264&&monitor=".$monitor."&br=".$br; - /* Call these two directly to bypass server blocking issues */ - $ajax2Url = "./skins/xml/views/actions.php?action=chk264&monitor=".$monitor; - $ajax2Url .= "&timeout=".ZM_EYEZM_H264_TIMEOUT; - $ajax3Url = "./skins/xml/views/actions.php?action=kill264&monitor=".$monitor; -?> - - - - - - - -
-
-Initializing H264 Stream ()...
-This may take a few seconds -
-
- -
- -
- - - diff --git a/web/skins/xml/includes/init.php b/web/skins/xml/includes/init.php deleted file mode 100644 index acb6c3546..000000000 --- a/web/skins/xml/includes/init.php +++ /dev/null @@ -1,2 +0,0 @@ - diff --git a/web/skins/xml/skin.php b/web/skins/xml/skin.php deleted file mode 100644 index c88718c4e..000000000 --- a/web/skins/xml/skin.php +++ /dev/null @@ -1,47 +0,0 @@ - diff --git a/web/skins/xml/views/actions.php b/web/skins/xml/views/actions.php deleted file mode 100644 index 73e206af6..000000000 --- a/web/skins/xml/views/actions.php +++ /dev/null @@ -1,392 +0,0 @@ - */ - if (!canEdit('Events')) { - logXmlErr("User ".$user['Username']. " doesn't have edit Events perms"); - exit; - } - if (!isset($_REQUEST['eid'])) { - logXmlErr("EID not set for action delete-event"); - exit; - } - $eid = validInteger($_REQUEST['eid']); - $url = "./index.php?view=request&request=event&id=".$eid."&action=delete"; - header("Location: ".$url); - exit; - - } else if (!strcmp($action, "spawn264")) { - /* ACTION: Spawn 264 streaming process. - * Parms: [br|width|height] */ - if (!canView('Stream')) { - logXmlErr("User ".$user['Username']. " doesn't have view Stream perms"); - exit; - } - if (!isset($_GET['monitor'])) { - logXmlErr("Not all parameters specified for spawn264"); - exit; - } - $monitor = validInteger($_REQUEST['monitor']); - if (!isMonitor($monitor)) exit; - $dims = getMonitorDims($monitor); - $width = validInteger(getset('width', $dims['Width'])); - $height = validInteger(getset('height', $dims['Height'])); - $br = validString(getset('br', ZM_EYEZM_H264_DEFAULT_BR)); - /* Check that we can stream first */ - if (!canStream264()) { - /* canStream264 will print out error */ - exit; - } - $streamUrl = stream264fn($monitor, $width, $height, $br); - logXml("Using H264 Pipe Function: ".$streamUrl); - $pid = shell_exec($streamUrl); - logXml("Streaming Process for monitor ".$monitor." ended, cleaning up files"); - eraseH264Files($monitor); - exit; - - } else if (!strcmp($action, "kill264")) { - /* ACTION: Kill existing H264 stream process and cleanup files. - * Parms: . - * NOTE: This will be called directly by path, so include files - * may not be available */ - session_start(); - require_once(dirname(__FILE__)."/../includes/functions.php"); - if (!isset($_GET['monitor'])) { - logXmlErr("Not all parameters specified for kill264"); - exit; - } - $monitor = validInteger($_GET['monitor']); - kill264proc($monitor); - logXml("Killed Segmenter process for monitor ".$monitor); - exit; - - } else if (!strcmp($action, "chk264")) { - /* ACTION: Simply stalls while checking for 264 file. - * Parms: - * NOTE: This will be called directly by path, so include files - * may not be available */ - session_start(); - require_once(dirname(__FILE__)."/../includes/functions.php"); - if (!isset($_GET['monitor']) || !isset($_GET['timeout'])) { - logXmlErr("Monitor not specified for chk264"); - exit; - } - $monitor = validInteger($_GET['monitor']); - $path = getTempDir()."/".m3u8fname($monitor); - /* Wait for the second sample to become available */ - $tsfile = getTempDir()."/sample_".$monitor."-2.ts"; - /* Setup timeout */ - $startTime = time(); - $timeout = validInteger($_GET['timeout']); - while (!file_exists($path) || !file_exists($tsfile)) { - if (time() > $startTime + $timeout) { - logXmlErr("Timed out waiting for stream to start, exiting..."); - kill264proc($monitor); - exit; - } - usleep(10000); - } - logXml("File exists, stream created after ".(time()-$startTime)." sec"); - exit; - - } else if (!strcmp($action, "feed")) { - /* ACTION: View a feed. Parms: [height|width|fps|scale|vcodec|br] */ - if (!canView('Stream')) { - logXmlErr("User ".$user['Username']. " doesn't have view Stream perms"); - exit; - } - /* Check that required variables are set */ - if (!isset($_REQUEST['monitor'])) { - logXmlErr("Not all parameters set for action view-feed"); - exit; - } - $monitor = validInteger($_REQUEST['monitor']); - if (!isMonitor($monitor)) exit; - $dims = getMonitorDims($monitor); - $width = validInteger(getset('width', $dims['Width'])); - $height = validInteger(getset('height', $dims['Height'])); - $fps = validInteger(getset('fps', ZM_WEB_VIDEO_MAXFPS)); - $scale = validInteger(getset('scale', 100)); - $vcodec = validString(getset('vcodec', ZM_EYEZM_FEED_VCODEC)); - /* Select which codec we want */ - if (!strcmp($vcodec, "h264")) { - /* Validate that we can in fact stream H264 */ - if (!canStream264()) { - /* canStream264 will print out error if - * there is one */ - echo "Server cannot stream H264. Check eyeZm log for details"; - exit; - } - if (!requireVer("1", "2")) { - echo "H264 Streaming requires eyeZm v1.2 or above"; - logXmlErr("H264 Streaming requires eyeZm v1.2 or above"); - exit; - } - $br = validString(getset('br', ZM_EYEZM_H264_DEFAULT_BR)); - /* H264 processing */ - noCacheHeaders(); - /* Kill any existing processes and files */ - kill264proc($monitor); - eraseH264Files($monitor); - logXml("Streaming H264 on Monitor ".$monitor.", ".$width."x".$height." @".$br); - /* Get thumbnail source */ - $thumbsrc = - getStreamSrc( array( - "mode=single", - "monitor=".$monitor, - "scale=".$scale, - "maxfps=".$fps, - "buffer=1000" - ) ); - logXml("Using thumbnail image from ".$thumbsrc); - /* Generate H264 Web-page */ - echo "\n"; - h264vidHtml($width, $height, $monitor, $br, $thumbsrc); - } else if (!strcmp($vcodec, "mjpeg")) { - /* MJPEG streaming */ - /* If $fps=0, get a single-shot */ - if (!$fps) { - /* single-shot */ - $streamSrc = - getStreamSrc( array( - "mode=single", - "monitor=".$monitor, - "scale=".$scale, - "maxfps=0", - "buffer=1000" - ) ); - } else { - $streamSrc = - getStreamSrc( array( - "mode=jpeg", - "monitor=".$monitor, - "scale=".$scale, - "maxfps=".$fps, - "buffer=1000" - ) ); - } - noCacheHeaders(); - xhtmlHeaders( __FILE__, "Stream" ); - logXml("Streaming MJPEG on Monitor ".$monitor.", ".$width."x".$height." @".$fps."fps"); - echo "\n"; - echo "\n"; - echo "
\n"; - logXml("Using stream source: ".$streamSrc); - outputImageStream("liveStream", $streamSrc, $width, $height, "stream"); - echo "
"; - } else { - logXmlErr("Unsupported codec ".$vcodec." selected for streaming"); - echo("Unsupported codec ".$vcodec." selected for streaming"); - } - exit; - - } else if (!strcmp($action, "vevent")) { - /* ACTION: View an event. Parms: [fps|vcodec|br] */ - if (!canView('Events')) { - logXmlErr("User ".$user['Username']. " doesn't have view Events perms"); - exit; - } - if (!isset($_GET['eid'])) { - logXmlErr("Not all parameters set for Action View-event"); - exit; - } - /* Grab event from the database */ - $eid = validInteger($_GET['eid']); - $eventsSql = "select E.Id, E.MonitorId, E.Name, E.StartTime, E.Length, E.Frames from Events as E where E.Id = ?"; - $event = dbFetchOne($eventsSql, NULL, array( $eid ) ); - /* Check if exists */ - if (!$event) { - logxmlErr("Requested event ID ".$eid." does not exist"); - exit; - } - /* Calculate FPS */ - $fps = validInteger(getset('fps',ceil($event['Frames'] / $event['Length']))); - $vcodec = validString(getset('vcodec', ZM_EYEZM_EVENT_VCODEC)); - $baseURL = ZM_PATH_WEB."/".getEventPathSafe($event); - /* Here we validate the codec. - * Check that FFMPEG exists and supports codecs */ - if (!strcmp($vcodec, "mpeg4")) { - if (!ffmpegSupportsCodec("mpeg4")) { - logXmlErr("FFMPEG not installed, accessible in path/ZM_PATH_FFMPEG, or doesn't support mpeg4"); - exit; - } - /* Can generate, we are good to go */ - $fname = "capture.mov"; - $ffparms = "-vcodec mpeg4 -r ".ZM_EYEZM_EVENT_FPS." ".$baseURL."/".$fname." 2> /dev/null"; - - } else if (!strcmp($vcodec, "h264")) { - if (!ffmpegSupportsCodec("libx264")) { - logXmlErr("FFMPEG not installed, accessible in path/ZM_PATH_FFMPEG, or doesn't support H264"); - exit; - } - if (!requireVer("1","2")) { - logXmlErr("H264 Event viewing requires eyeZm v1.2 or greater"); - exit; - } - /* Good to go */ - $fname = "capture.mp4"; - $ffparms = getFfmpeg264FoutParms( - validString(getset('br',ZM_EYEZM_H264_DEFAULT_EVBR)), - $baseURL."/".$fname); - - } else { - logXmlErr("Unknown codec ".$vcodec." selected for event viewing"); - exit; - } - logXml("Selected ".$vcodec." for viewing event ".$event['Id']); - $fnameOut = $baseURL."/".$fname; - $shellCmd = getFfmpegPath()." -y -r ".$fps." -i ".$baseURL."/%0".ZM_EVENT_IMAGE_DIGITS."d-capture.jpg"; - $shellCmd .= " ".$ffparms; - logXml("Encoding event with command: ".$shellCmd); - $shellOutput = shell_exec($shellCmd); - /* Check that file exists */ - if (!file_exists(trim($fnameOut))) { - logXmlErr("Generate Event ".$event['Id']." file ".$fnameOut." does not exist"); - exit; - } - $url = "./".getEventPathSafe($event)."/".$fname; - logXml("Loading Event URL ".$url); - header("Location: ".$url); - exit; - - } else if (!strcmp($action, "vframe")) { - /* ACTION: View a frame given by an event and frame-id. Parms: [alarm | analyze | qty | scale] - * If 'alarm' is set, the returned frame will be the -th alarm frame. If 'analyze' is set, - * the returned frame will be the %03d-analyse frame instead of %03d-capture, if ZM_CREATE_ANALYSIS_IMAGES - * is set. Otherwise it just returns the captured frame. - * If qty is set, it will apply a quality factor from 0-100, and if width is set, it will scale the jpeg accordingly - */ - if (!isset($_GET['eid']) || !isset($_GET['frame'])) { - logXmlErr("Not all parameters set for action view-frame"); - exit; - } - $eid = validInteger($_GET['eid']); - $frame = validInteger($_GET['frame']); - $eventsSql = "select E.Id, E.MonitorId, E.Name, E.StartTime, E.Length, E.Frames from Events as E where E.Id = ?"; - $event = dbFetchOne($eventsSql, NULL, array( $eid ) ); - $qty = validInteger(getset('qty', 100)); - if ($qty > 100) $qty = 100; - $scale = validInteger(getset('scale', 100)); - if (!$event) { - logxmlErr("Requested event ID ".$eid." does not exist"); - exit; - } - /* Figure out the frame number. If 'alarm' is not set, this is just equal to the parameter. - * If 'alarm' is set, need to query DB and grab the -th item */ - if (isset($_GET['alarm'])) { - $frameSql = "select * from Frames as F where F.EventId=? and (F.Type = 'Alarm') order by F.FrameId"; - $i=0; - foreach (dbFetchAll($frameSql, NULL, array($eid) ) as $dbframe) { - if ($i == $frame) { - $frame = $dbframe['FrameId']; - break; - } - $i++; - } - } - if (isset($_GET['analyze']) && ZM_CREATE_ANALYSIS_IMAGES) { - $suffix = "analyse"; - } else { - $suffix = "capture"; - } - /* A frame index of 0 is invalid, so if we see this, just use frame 1 */ - if (!$frame) $frame = 1; - /* Suffix based on 'analyze' */ - $fname = sprintf("%0".ZM_EVENT_IMAGE_DIGITS."d-%s.jpg", $frame, $suffix); - $url = "./".getEventPathSafe($event)."/".$fname; - if (!file_exists($url)) { - logXmlErr("Invalid frame image requested: ".$url); - $url = "./skins/xml/views/notfound.png"; - } - /* Check if the image needs any processing - check for GD if requested */ - if (($scale != 100) || ($qty < 100)) { - if (!gdExists()) { - logXmlErr("Lib GD is not loaded, but required for image scaling functions"); - $url = "./skins/xml/views/notfound.png"; - } else if (!$img = imagecreatefromjpeg($url)) { - logXmlErr("Could not load JPEG from ".$url); - $url = "./skins/xml/views/notfound.png"; - } else { - /* GD exists and we read the file ok */ - header('Content-type: image/jpeg'); - /* Check if resizing is needed */ - if ($scale != 100) { - list($width_orig, $height_orig) = getimagesize($url); - $width_new = $width_orig * ($scale/100); - $height_new = $height_orig * ($scale/100); - $img_new = imagecreatetruecolor($width_new, $height_new); - imagecopyresampled($img_new, $img, 0, 0, 0, 0, $width_new, $height_new, $width_orig, $height_orig); - imagejpeg($img_new, NULL, $qty); - } else { - imagejpeg($img, NULL, $qty); - } - exit; - } - } - header("Location: ".$url); - exit; - - } else if (!strcmp($action, "state")) { - /* ACTION: Change the state of the system. Parms: */ - if (!canEdit('System')) { - logXmlErr("User ".$user['Username']. " doesn't have edit System perms"); - exit; - } - if (!isset($_GET['state'])) { - logXmlErr("Server state not specified for action"); - exit; - } - $url = "./index.php?view=none&action=state&runState=".validString($_GET['state']); - header("Location: ".$url); - exit; - - } else if (!strcmp($action, "func")) { - /* ACTION: Change state of the monitor. Parms: */ - if (!canEdit('Monitors')) { - logXmlErr("User ".$user['Username']. " doesn't have monitors Edit perms"); - exit; - } - if (!isset($_GET['mid']) || !isset($_GET['func']) || !isset($_GET['en'])) { - logXmlErr("Not all parameters specified for action Monitor state"); - exit; - } - $mid = validInteger($_GET['mid']); - if (!isMonitor($mid)) exit; - $url = "./index.php?view=none&action=function&mid=".$mid."&newFunction=".validString($_GET['func'])."&newEnabled=".validString($_GET['en']); - header("Location: ".$url); - exit; - - } else if (!strcmp($action, "vlog")) { - /* ACTION: View log file. Must have debug and log to file enabled, and sufficient perms - * Parms: [lines] */ - if (!canEdit('System')) { - logXmlErr("Insufficient permissions to view log file"); - echo "Insufficient permissions to view log file"; - exit; - } - if (!ZM_EYEZM_DEBUG || !ZM_EYEZM_LOG_TO_FILE) { - echo "eyeZm Debug (EYEZM_DEBUG) or log-to-file (EYEZM_LOG_TO_FILE) not enabled. Please enable first"; - exit; - } - if (!file_exists(ZM_EYEZM_LOG_FILE)) { - echo "Log file ".ZM_EYEZM_LOG_FILE." doesn't exist"; - exit; - } - $lines = validInteger(getset('lines',ZM_EYEZM_LOG_LINES)); - logXml("Returning last ".$lines." lines of eyeZm Log from ".ZM_EYEZM_LOG_FILE); - echo shell_exec("tail -n ".$lines." ".ZM_EYEZM_LOG_FILE); - echo "\n\n--- Showing last ".$lines." lines ---\n"; - echo "--- End of Log ---\n\n"; - } -} -?> diff --git a/web/skins/xml/views/console.php b/web/skins/xml/views/console.php deleted file mode 100644 index b512bc13a..000000000 --- a/web/skins/xml/views/console.php +++ /dev/null @@ -1,259 +0,0 @@ - translate('Events'), - "filter" => array( - "terms" => array( - ) - ), - ), - array( - "title" => translate('Hour'), - "filter" => array( - "terms" => array( - array( "attr" => "Archived", "op" => "=", "val" => "0" ), - array( "cnj" => "and", "attr" => "DateTime", "op" => ">=", "val" => "-1 hour" ), - ) - ), - ), - array( - "title" => translate('Day'), - "filter" => array( - "terms" => array( - array( "attr" => "Archived", "op" => "=", "val" => "0" ), - array( "cnj" => "and", "attr" => "DateTime", "op" => ">=", "val" => "-1 day" ), - ) - ), - ), - array( - "title" => translate('Week'), - "filter" => array( - "terms" => array( - array( "attr" => "Archived", "op" => "=", "val" => "0" ), - array( "cnj" => "and", "attr" => "DateTime", "op" => ">=", "val" => "-7 day" ), - ) - ), - ), - array( - "title" => translate('Month'), - "filter" => array( - "terms" => array( - array( "attr" => "Archived", "op" => "=", "val" => "0" ), - array( "cnj" => "and", "attr" => "DateTime", "op" => ">=", "val" => "-1 month" ), - ) - ), - ), - array( - "title" => translate('Archived'), - "filter" => array( - "terms" => array( - array( "attr" => "Archived", "op" => "=", "val" => "1" ), - ) - ), - ), -); - -$running = daemonCheck(); -$status = $running?translate('Running'):translate('Stopped'); - -if ( $group = dbFetchOne( 'SELECT * FROM Groups WHERE Id = ?', NULL, array(empty($_COOKIE['zmGroup'])?0:$_COOKIE['zmGroup']) ) ) - $groupIds = array_flip(split( ',', $group['MonitorIds'] )); - -$maxWidth = 0; -$maxHeight = 0; -$cycleCount = 0; -$minSequence = 0; -$maxSequence = 1; -$seqIdList = array(); -$monitors = dbFetchAll( "select * from Monitors order by Sequence asc" ); -$displayMonitors = array(); -for ( $i = 0; $i < count($monitors); $i++ ) -{ - if ( !visibleMonitor( $monitors[$i]['Id'] ) ) - { - continue; - } - if ( $group && !empty($groupIds) && !array_key_exists( $monitors[$i]['Id'], $groupIds ) ) - { - continue; - } - $monitors[$i]['Show'] = true; - if ( empty($minSequence) || ($monitors[$i]['Sequence'] < $minSequence) ) - { - $minSequence = $monitors[$i]['Sequence']; - } - if ( $monitors[$i]['Sequence'] > $maxSequence ) - { - $maxSequence = $monitors[$i]['Sequence']; - } - if (isset($_GET['nostatus'])) { - $monitors[$i]['zmc'] = 1; - $monitors[$i]['zma'] = 1; - } else { - $monitors[$i]['zmc'] = zmcStatus( $monitors[$i] ); - $monitors[$i]['zma'] = zmaStatus( $monitors[$i] ); - } - $monitors[$i]['ZoneCount'] = dbFetchOne( 'select count(Id) as ZoneCount from Zones where MonitorId = ?', 'ZoneCount', array($monitors[$i]['Id']) ); - $counts = array(); - for ( $j = 0; $j < count($eventCounts); $j++ ) - { - $filter = addFilterTerm( $eventCounts[$j]['filter'], count($eventCounts[$j]['filter']['terms']), array( "cnj" => "and", "attr" => "MonitorId", "op" => "=", "val" => $monitors[$i]['Id'] ) ); - parseFilter( $filter ); - $counts[] = "count(if(1".$filter['sql'].",1,NULL)) as EventCount$j"; - $monitors[$i]['eventCounts'][$j]['filter'] = $filter; - } - $sql = 'SELECT '.join($counts,", ").' from Events as E where MonitorId = ?'; - $counts = dbFetchOne( $sql, NULL, array( $monitors[$i]['Id'] ) ); - if ( $monitors[$i]['Function'] != 'None' ) - { - $cycleCount++; - $scaleWidth = reScale( $monitors[$i]['Width'], $monitors[$i]['DefaultScale'], ZM_WEB_DEFAULT_SCALE ); - $scaleHeight = reScale( $monitors[$i]['Height'], $monitors[$i]['DefaultScale'], ZM_WEB_DEFAULT_SCALE ); - if ( $maxWidth < $scaleWidth ) $maxWidth = $scaleWidth; - if ( $maxHeight < $scaleHeight ) $maxHeight = $scaleHeight; - } - $monitors[$i] = array_merge( $monitors[$i], $counts ); - $seqIdList[] = $monitors[$i]['Id']; - $displayMonitors[] = $monitors[$i]; -} -$states = dbFetchAll("select * from States"); -/* XML Dump Starts here */ -xml_header(); -/* Print out the general section */ -xml_tag_sec("ZM_XML", 1); -xml_tag_sec("GENERAL", 1); -xml_tag_val("RUNNING", $running); -xml_tag_val("PROTOVER", ZM_EYEZM_PROTOCOL_VERSION); -xml_tag_val("FEATURESET", ZM_EYEZM_FEATURE_SET); -xml_tag_val("VERSION", ZM_VERSION); -xml_tag_val("CANSTR264", canStream264(1)); -xml_tag_val("GD", gdExists()); -xml_tag_val("FVCODEC", ZM_EYEZM_FEED_VCODEC); -xml_tag_val("FVTMT", ZM_EYEZM_H264_TIMEOUT); -xml_tag_val("USER", $user['Username']); -xml_tag_val("UID", $user['Id']); -/* Permissions block */ -xml_tag_sec("PERMS", 1); -xml_tag_val("STREAM", $user['Stream']); -xml_tag_val("EVENTS", $user['Events']); -xml_tag_val("CONTROL", $user['Control']); -xml_tag_val("MONITORS", $user['Monitors']); -xml_tag_val("DEVICES", $user['Devices']); -xml_tag_val("SYSTEM", $user['System']); -xml_tag_sec("PERMS", 0); -/* End permissions block */ -if (canEdit('System')) { - if ($running) { - xml_tag_val("STATE", "stop"); - xml_tag_val("STATE", "restart"); - } else { - xml_tag_val("STATE", "start"); - } - foreach ($states as $state) { - xml_tag_val("STATE", $state['Name']); - } -} -/* End general section */ -xml_tag_sec("GENERAL", 0); -/* Print out the monitors section */ -xml_tag_sec("MONITOR_LIST", 1); -foreach( $displayMonitors as $monitor ) -{ - if (!canView('Monitors')) continue; - xml_tag_sec("MONITOR", 1); - xml_tag_val("ID", $monitor['Id']); - xml_tag_val("NAME", $monitor['Name']); - xml_tag_val("FUNCTION", $monitor['Function']); - xml_tag_val("NUMEVENTS", $monitor['EventCount0']); - xml_tag_val("ENABLED", $monitor['Enabled']); - xml_tag_val("ZMC", $monitor['zmc']); - xml_tag_val("ZMA", $monitor['zma']); - xml_tag_val("STATE", ($monitor['zmc']!=1)?"ERROR":( - ($monitor['zma']==1)?"OK":"WARN")); - xml_tag_val("WIDTH", $monitor['Width']); - xml_tag_val("HEIGHT", $monitor['Height']); - - /* Form the data-base query for this monitor */ - $pageOffset = 0; - $offset = 0; - if (isset($_GET['numEvents'])) { - $numEvents = validInteger($_GET['numEvents']); - $eventsSql = "select E.Id,E.MonitorId,M.Name As MonitorName,E.Cause,E.Name,E.StartTime,E.Length,E.Frames,E.AlarmFrames,E.TotScore,E.AvgScore,E.MaxScore,E.Archived from Monitors as M inner join Events as E on (M.Id = E.MonitorId) and ( E.MonitorId = ? ) order by E.StartTime desc"; - $eventsSql .= " limit ".$numEvents; - /* If there is an pageOff tag for this monitor, then retrieve the offset. Otherwise, don't specify offset */ - if (isset($_GET['pageOff'.$monitor['Id']])) { - /* If pageOffset is greater than we actually have, - * we need to adjust it */ - $pageOffset = validInteger($_GET['pageOff'.$monitor['Id']]); - if ($pageOffset >= ceil($monitor['EventCount0']/$numEvents)) { - $pageOffset = 0; - } - $offset = $pageOffset * $numEvents; - } - $eventsSql .= " offset ".$offset; - } else { - unset($eventsSql); - } - xml_tag_val("PAGEOFF", $pageOffset); - xml_tag_sec("EVENTS",1); - if (canView('Events') && isset($eventsSql)) { - foreach ( dbFetchAll( $eventsSql, NULL, array($monitor['Id']) ) as $event ) - { - xml_tag_sec("EVENT",1); - xml_tag_val("ID",$event['Id']); - xml_tag_val("NAME",$event['Name']); - xml_tag_val("TIME", strftime( STRF_FMT_DATETIME_SHORTER, strtotime($event['StartTime']))); - xml_tag_val("DURATION", $event['Length']); - xml_tag_val("FRAMES", $event['Frames']); - xml_tag_val("FPS", ($event['Length'] > 0)?ceil($event['Frames']/$event['Length']):0); - xml_tag_val("TOTSCORE", $event['TotScore']); - xml_tag_val("AVGSCORE", $event['AvgScore']); - xml_tag_val("MAXSCORE", $event['MaxScore']); - /* Grab the max frame-id from Frames table. If AlarmFrames = 0, don't try - * to grab any frames, and just signal the max frame index as index 0 */ - $fridx = 1; - $alarmFrames = 1; - if ($event['AlarmFrames']) { - $framesSql = "SELECT FrameId FROM Frames WHERE (Type = 'Alarm') and (EventId = ?) ORDER BY Score DESC LIMIT 1"; - $fr = dbFetchOne($framesSql, NULL, array( $event['Id'] ) ); - $fridx = $fr['FrameId']; - $alarmFrames = $event['AlarmFrames']; - } - xml_tag_val("ALARMFRAMES", $alarmFrames); - xml_tag_val("MAXFRAMEID", $fridx); - xml_tag_sec("EVENT",0); - } - } - xml_tag_sec("EVENTS",0); - xml_tag_sec("MONITOR", 0); -} -xml_tag_sec("MONITOR_LIST", 0); -xml_tag_sec("ZM_XML", 0); -?> diff --git a/web/skins/xml/views/none.php b/web/skins/xml/views/none.php deleted file mode 100644 index e69de29bb..000000000 diff --git a/web/skins/xml/views/notfound.png b/web/skins/xml/views/notfound.png deleted file mode 100644 index 219706897647c72375b90298de2d8a6622b7093d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7332 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 R>Js3hJyX?HsZ+9j^?#`>R7U^+ From 6b169af655fcdd3a5f93f7723b440e76d2479e66 Mon Sep 17 00:00:00 2001 From: SteveGilvarry Date: Tue, 29 Dec 2015 02:00:33 +1100 Subject: [PATCH 3/6] Remove eyezm configdata Conflicts: scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in --- .../lib/ZoneMinder/ConfigData.pm.in | 135 ------------------ 1 file changed, 135 deletions(-) diff --git a/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in b/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in index 703d47c30..c9d48f52f 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in +++ b/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in @@ -3942,141 +3942,6 @@ body = "ZM alarm detected - %EL% secs, %EF%/%EFA% frames, t%EST%/m%ESM%/a%ESA% s readonly => 1, category => "dynamic", }, - { - name => "ZM_EYEZM_DEBUG", - default => "no", - description => "Switch additional debugging on for eyeZm Plugin", - help => qqq(" - Enable or Disable extra debugging from the eyeZm Plugin. Extra - debugging information will be displayed in it's own file - (EYEZM_LOG_TO_FILE is set), or your Apache error log - "), - type => $types{boolean}, - category => "eyeZm", - }, - { - name => "ZM_EYEZM_LOG_TO_FILE", - default => "yes", - description => "When eyeZm Debugging is enabled, enabling this logs output to it's own file", - help => qqq(" - When EYEZM_DEBUG is on and EYEZM_LOG_TO_FILE is on, output - generated from the eyeZm Plugin will go to it's own file. - Otherwise it will go to the apache error log. - "), - type => $types{boolean}, - category => "eyeZm", - }, - { - name => "ZM_EYEZM_LOG_FILE", - default => "@ZM_LOGDIR@/zm_xml.log", - description => "Default filename to use when logging eyeZm Output and EYEZM_LOG_TO_FILE is enabled", - help => qqq(" - This file will contain it's own output from the eyeZm Plugin - when EYEZM_LOG_TO_FILE and EYEZM_DEBUG are both enabled - "), - type => $types{string}, - category => "eyeZm", - }, - { - name => "ZM_EYEZM_EVENT_VCODEC", - default => "mpeg4", - description => "Default video-codec to use for encoding events", - help => qqq(" - The eyeZm Plugin calls FFMPEG externally to encode the captured - images. If your FFMPEG is not built with support for H264, - change this to MPEG-4. If using H264, please check - http://www.eyezm.com for H264 requirements and that your eyeZm - version supports H264 (v1.2+). - "), - type => { - db_type =>"string", - hint =>"mpeg4|h264", - pattern =>qr|^([mh])|i, - format =>q( $1 =~ /^m/ ? "mpeg4" : "h264" ) - }, - category => "eyeZm", - }, - { - name => "ZM_EYEZM_FEED_VCODEC", - default => "mjpeg", - description => "Default video-codec to use for streaming the live feed", - help => qqq(" - Determines whether the live stream is generated using native - MJPEG streaming with ZoneMinder, or H264 using FFMPEG and - HTML-5 streaming. If using H264, please check - http://www.eyezm.com for H264 requirements and that your eyeZm - version supports H264 (v1.2+). This is just a default - parameter, and can be overridden with eyeZm. - "), - type => { - db_type =>"string", - hint =>"mjpeg|h264", - pattern =>qr|^([mh])|i, - format =>q( $1 =~ /^m/ ? "mjpeg" : "h264" ) - }, - category => "eyeZm", - }, - { - name => "ZM_EYEZM_H264_DEFAULT_BR", - default => "96k", - description => "Default bit-rate to use with FFMPEG for H264 streaming", - help => qqq(" - When using the eyeZm Plugin to stream H264 data, FFMPEG - requires a bitrate to control the quality and bandwidth of the - video. This should be specified in a format acceptable to - FFMPEG. The default value is sufficient for most installations. - This is just a default parameter, and can be overridden with - eyeZm. - "), - type => $types{string}, - category => "eyeZm", - }, - { - name => "ZM_EYEZM_H264_DEFAULT_EVBR", - default => "128k", - description => "Default bit-rate to use with FFMPEG for H264 event viewing", - help => qqq(" - When using the eyeZm Plugin to view events in H264, FFMPEG - requires a bitrate to control the quality and bandwidth of the - video. This should be specified in a format acceptable to - FFMPEG. The default value is sufficient for most installations. - This is just a default parameter, and can be overridden with - eyeZm. - "), - type => $types{string}, - category => "eyeZm", - }, - { - name => "ZM_EYEZM_H264_TIMEOUT", - default => "20", - description => "Timeout (sec) to wait for H264 stream to start before terminating", - help => qqq(" - The eyeZm Plugin will attempt to spawn an H264 stream when - requested, and require that it complete within the timeout - specified. If you have a slow system or find through the logs - that the H264 stream is not starting because the timeout is - expiring, even though FFMPEG is running, try increasing this - value. If you have a fast system, decreasing this value can - improve the responsiveness when there are issues starting H264 - streams - "), - type => $types{string}, - category => "eyeZm", - }, - { - name => "ZM_EYEZM_SEG_DURATION", - default => "3", - description => "Segment duration used for streaming using HTTP-5 Streaming protocol", - help => qqq(" - The HTTP-5 Live Streaming Protocol segments the input video - stream into small chunks of a duration specified by this - parameter. Increasing the segment duration will help with - choppy connections on the other end, but will increase the - latency in starting a stream. - "), - type => $types{string}, - category => "eyeZm", - }, ); our %options_hash = map { ( $_->{name}, $_ ) } @options; From 4837585601abd50da8fc89e6737aedf6836a5dc0 Mon Sep 17 00:00:00 2001 From: SteveGilvarry Date: Tue, 29 Dec 2015 02:35:43 +1100 Subject: [PATCH 4/6] Deleted eyezm options documentation and references to it in other areas of documentation. Removed zmstreamer.cpp. Conflicts: src/zmstreamer.cpp --- docs/userguide/components.rst | 9 +- docs/userguide/options.rst | 1 - docs/userguide/options/options_eyezm.rst | 26 --- src/zmstreamer.cpp | 252 ----------------------- web/skins/classic/views/options.php | 1 - 5 files changed, 3 insertions(+), 286 deletions(-) delete mode 100644 docs/userguide/options/options_eyezm.rst delete mode 100644 src/zmstreamer.cpp diff --git a/docs/userguide/components.rst b/docs/userguide/components.rst index ebedc8c7e..48aff0be4 100644 --- a/docs/userguide/components.rst +++ b/docs/userguide/components.rst @@ -26,16 +26,13 @@ Binaries PHP --- -As well as this there are the web PHP files in the web directory. Currently these consist of 4 possible skins. +As well as this there are the web PHP files in the web directory. Currently these consist of a single skin with Classic and Flat styles. **Classic** Original ZoneMinder skin **Flat** - An updated version of classic skin, retaining the same layout with a more modern style -**XML** - Displays certain views as XML. Used by eyeZM as an interfacing skin (Note that eyeZM no longer seems to work with later versions of Zoneminder). New developers of 3rd party clients should use the API instead (:doc:`../api`) -**Mobile** - A skin that displays views in a more condensed and single page format, likely suitable for smaller mobile devices, should one choose to access the ZoneMinder console using such devices. Note that there are also third party mobile clients one could use (:doc:`mobile`) + An updated version of Classic skin, retaining the same layout with a more modern style. Originally a skin this is now just a CSS style. + Perl ---- diff --git a/docs/userguide/options.rst b/docs/userguide/options.rst index 4a0b357f6..8f7fbad30 100644 --- a/docs/userguide/options.rst +++ b/docs/userguide/options.rst @@ -20,5 +20,4 @@ If you have changed the value of an option you should then ‘save’ it. A numb options/options_x10 options/options_bw options/options_phonebw - options/options_eyezm options/options_users diff --git a/docs/userguide/options/options_eyezm.rst b/docs/userguide/options/options_eyezm.rst deleted file mode 100644 index 21c780bc0..000000000 --- a/docs/userguide/options/options_eyezm.rst +++ /dev/null @@ -1,26 +0,0 @@ -Options - eyeZM ---------------- - -.. NOTE:: - eyeZM does not seem to be actively maintained by the developers and does not work with later versions of ZoneMinder. - - -.. image:: images/Options_eyezm.png - -EYEZM_DEBUG - Enable or Disable extra debugging from the eyeZm Plugin. Extra debugging information will be displayed in it's own file (EYEZM_LOG_TO_FILE is set), or your Apache error log - -EYEZM_LOG_TO_FILE - When EYEZM_DEBUG is on and EYEZM_LOG_TO_FILE is on, output generated from the eyeZm Plugin will go to it's own file. Otherwise it will go to the apache error log. - -EYEZM_LOG_FILE - Default filename to use when logging eyeZm Output and EYEZM_LOG_TO_FILE is enabled. This file will contain it's own output from the eyeZm Plugin when EYEZM_LOG_TO_FILE and EYEZM_DEBUG are both enabled. - -EYEZM_EVENT_VCODEC - The eyeZm Plugin calls FFMPEG externally to encode the captured images. If your FFMPEG is not built with support for H264, change this to MPEG-4. If using H264, please check http://www.eyezm.com for H264 requirements and that your eyeZm version supports H264 (v1.2+). - -EYEZM_FEED_VCODEC - Determines whether the live stream is generated using native MJPEG streaming with ZoneMinder, or H264 using FFMPEG and HTML-5 streaming. If using H264, please check http://www.eyezm.com for H264 requirements and that your eyeZm version supports H264 (v1.2+). This is just a default parameter, and can be overridden with eyeZm. - -EYEZM_H264_DEFAULT_BR - Default bit-rate to use with FFMPEG for H264 streaming. When using the eyeZm Plugin to stream H264 data, FFMPEG requires a bitrate to control the quality and bandwidth of the video. This should be specified in a format acceptable to FFMPEG. The default value is sufficient for most installations. This is just a default parameter, and can be overridden with eyeZm. - -EYEZM_H264_DEFAULT_EVBR - Default bit-rate to use with FFMPEG for H264 event viewing. When using the eyeZm Plugin to view events in H264, FFMPEG requires a bitrate to control the quality and bandwidth of the video. This should be specified in a format acceptable to FFMPEG. The default value is sufficient for most installations. This is just a default parameter, and can be overridden with eyeZm. - -EYEZM_H264_TIMEOUT - Timeout (sec) to wait for H264 stream to start before terminating. The eyeZm Plugin will attempt to spawn an H264 stream when requested, and require that it complete within the timeout specified. If you have a slow system or find through the logs that the H264 stream is not starting because the timeout is expiring, even though FFMPEG is running, try increasing this value. If you have a fast system, decreasing this value can improve the responsiveness when there are issues starting H264 streams. - -EYEZM_SEG_DURATION - Segment duration used for streaming using HTTP-5 Streaming protocol. The HTTP-5 Live Streaming Protocol segments the input video stream into small chunks of a duration specified by this parameter. Increasing the segment duration will help with choppy connections on the other end, but will increase the latency in starting a stream. diff --git a/src/zmstreamer.cpp b/src/zmstreamer.cpp deleted file mode 100644 index a16e50704..000000000 --- a/src/zmstreamer.cpp +++ /dev/null @@ -1,252 +0,0 @@ -// -// ZoneMinder Streamer, $Date: 2010-10-14 23:21:00 +0200 (Thu, 14 Oct 2010) $ -// Copyright (C) 2001-2010 Philip Coombes, Chris Kistner -// -// This program is based on revision 3143 of -// http://svn.zoneminder.com/svn/zm/trunk/src/zms.cpp -// -// 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. - -/* - -=head1 NAME - -zmstreamer - eyeZM video streamer - -=head1 SYNOPSIS - - zmstreamer -e - zmstreamer -o - zmstreamer -u - zmstreamer -f - zmstreamer -s - zmstreamer -b - zmstreamer -m - zmstreamer -d - zmstreamer -i - zmstreamer -? - zmstreamer -h - zmstreamer -v - -=head1 DESCRIPTION - -*DEPRECIATED* The xml skin and all files associated with the xml skin are now -depreciated. Please use the ZoneMinder API instead. - -This binary works in conjunction with the XML skin to stream video to iPhones -running the eyeZm app. - -=head1 OPTIONS - - -e - Specify output mode: mpeg/jpg/zip/single/raw. - -o - Specify output format. - -u - Specify buffer size in ms. - -f - Specify maximum framerate. - -s - Specify scale. - -b - Specify bitrate. - -m - Specify monitor id. - -d - 0 = off, 1 = no streaming, 2 = with streaming. - -i, -?, -h - Display usage information - -v - Print the installed version of ZoneMinder - -=cut - -*/ - -#include -#include - -#include -#include - -#include "zm.h" -#include "zm_db.h" -#include "zm_user.h" -#include "zm_signal.h" -#include "zm_monitor.h" -#include "zm_stream.h" - -// Possible command-line options -#define OPTIONS "e:o:u:f:s:b:m:d:i:?:h:v" - -// Default ZMS values -#define ZMS_DEFAULT_DEBUG 0 -#define ZMS_DEFAULT_ID 1 -#define ZMS_DEFAULT_BITRATE 100000 -#define ZMS_DEFAULT_SCALE 100 -#define ZMS_DEFAULT_MODE "mpeg" -#define ZMS_DEFAULT_FORMAT "asf" -#define ZMS_DEFAULT_FPS 25.0 -#define ZMS_DEFAULT_BUFFER 1000 - -int main(int argc, char** argv) { - self = argv[0]; - // Set initial values to the default values - int debug = ZMS_DEFAULT_DEBUG; - int id = ZMS_DEFAULT_ID; - int bitrate = ZMS_DEFAULT_BITRATE; - int scale = ZMS_DEFAULT_SCALE; - char mode[32]; - sprintf(mode, "%s", ZMS_DEFAULT_MODE); - char format[32]; - sprintf(format, "%s", ZMS_DEFAULT_FORMAT); - double maxfps = ZMS_DEFAULT_FPS; - int buffer = ZMS_DEFAULT_BUFFER; - - // Parse command-line options - int arg; - while ((arg = getopt(argc, argv, OPTIONS)) != -1) { - switch (arg) { - case 'e': - sprintf(mode, "%s", optarg); - break; - case 'o': - sprintf(format, "%s", optarg); - break; - case 'u': - buffer = atoi(optarg); - break; - case 'f': - maxfps = atof(optarg); - break; - case 's': - scale = atoi(optarg); - break; - case 'b': - bitrate = atoi(optarg); - break; - case 'm': - id = atoi(optarg); - break; - case 'd': - debug = atoi(optarg); - break; - case 'h': - case 'i': - case '?': - printf("-e : Specify output mode: mpeg/jpg/zip/single/raw. Default = %s\n", ZMS_DEFAULT_MODE); - printf("-o : Specify output format. Default = %s\n", ZMS_DEFAULT_FORMAT); - printf("-u : Specify buffer size in ms. Default = %d\n", ZMS_DEFAULT_BUFFER); - printf("-f : Specify maximum framerate. Default = %lf\n", ZMS_DEFAULT_FPS); - printf("-s : Specify scale. Default = %d\n", ZMS_DEFAULT_SCALE); - printf("-b : Specify bitrate. Default = %d\n", ZMS_DEFAULT_BITRATE); - printf("-m : Specify monitor id. Default = %d\n", ZMS_DEFAULT_ID); - printf("-d : 0 = off, 1 = no streaming, 2 = with streaming. Default = 0\n"); - printf("-i or -? or -h: This information\n"); - printf("-v : This installed version of ZoneMinder\n"); - return EXIT_SUCCESS; - case 'v': - std::cout << ZM_VERSION << "\n"; - exit(0); - } - } - - // Set stream type - StreamBase::StreamType streamtype; - if (!strcasecmp("raw", mode)) - streamtype = MonitorStream::STREAM_RAW; - else if (!strcasecmp("mpeg", mode)) - streamtype = MonitorStream::STREAM_MPEG; - else if (!strcasecmp("jpg", mode)) - streamtype = MonitorStream::STREAM_JPEG; - else if (!strcasecmp("single", mode)) - streamtype = MonitorStream::STREAM_SINGLE; - else if (!strcasecmp("zip", mode)) - streamtype = MonitorStream::STREAM_ZIP; - else - streamtype = MonitorStream::STREAM_MPEG; - - if (debug) { - // Show stream parameters - printf("Stream parameters:\n"); - switch (streamtype) { - case MonitorStream::STREAM_MPEG: - printf("Output mode (-e) = %s\n", "mpeg"); - printf("Output format (-o) = %s\n", format); - break; - default: - printf("Output mode (-e) = %s\n", mode); - } - printf("Buffer size (-u) = %d ms\n", buffer); - printf("Maximum FPS (-f) = %lf FPS\n", maxfps); - printf("Scale (-s) = %d%%\n", scale); - printf("Bitrate (-b) = %d bps\n", bitrate); - printf("Monitor Id (-m) = %d\n", id); - } - - if (debug) { - // Set ZM debugger to print to stdout - printf("Setting up ZoneMinder debugger to print to stdout..."); - setenv("ZM_DBG_PRINT", "1", 1); - printf("Done.\n"); - } - - // Loading ZM configurations - printf("Loading ZoneMinder configurations..."); - zmLoadConfig(); - printf("Done.\n"); - - logInit("zmstreamer"); - - ssedetect(); - - // Setting stream parameters - MonitorStream stream; - stream.setStreamScale(scale); // default = 100 (scale) - stream.setStreamReplayRate(100); // default = 100 (rate) - stream.setStreamMaxFPS(maxfps); // default = 10 (maxfps) - if (debug) stream.setStreamTTL(1); - else stream.setStreamTTL(0); // default = 0 (ttl) - stream.setStreamQueue(0); // default = 0 (connkey) - stream.setStreamBuffer(buffer); // default = 0 (buffer) - stream.setStreamStart(id); // default = 0 (monitor_id) - stream.setStreamType(streamtype); - if (streamtype == MonitorStream::STREAM_MPEG) { -#if HAVE_LIBAVCODEC - if (debug) printf("HAVE_LIBAVCODEC is set\n"); - stream.setStreamFormat(format); // default = "" (format) - stream.setStreamBitrate(bitrate); // default = 100000 (bitrate) -#else - fprintf(stderr, "MPEG streaming is disabled.\nYou should configure with the --with-ffmpeg option and rebuild to use this functionality.\n"); - logTerm(); - zmDbClose(); - return EXIT_FAILURE; -#endif - } - - if (debug != 1) { - if (debug) printf("Running stream..."); - - // Output headers - fprintf(stdout, "Server: ZoneMinder Video Server/%s\r\n", ZM_VERSION); - time_t now = time(0); - char date_string[64]; - strftime(date_string, sizeof (date_string) - 1, "%a, %d %b %Y %H:%M:%S GMT", gmtime(&now)); - fprintf(stdout, "Expires: Mon, 26 Jul 1997 05:00:00 GMT\r\n"); - fprintf(stdout, "Last-Modified: %s\r\n", date_string); - fprintf(stdout, "Cache-Control: no-store, no-cache, must-revalidate\r\n"); - fprintf(stdout, "Cache-Control: post-check=0, pre-check=0\r\n"); - fprintf(stdout, "Pragma: no-cache\r\n"); - - // Run stream - stream.runStream(); - } - if (debug) printf("Done.\n"); - - logTerm(); - zmDbClose(); - - return (EXIT_SUCCESS); -} diff --git a/web/skins/classic/views/options.php b/web/skins/classic/views/options.php index 9c3b4a418..30ea85f43 100644 --- a/web/skins/classic/views/options.php +++ b/web/skins/classic/views/options.php @@ -43,7 +43,6 @@ $tabs['highband'] = translate('HighBW'); $tabs['medband'] = translate('MediumBW'); $tabs['lowband'] = translate('LowBW'); $tabs['phoneband'] = translate('PhoneBW'); -$tabs['eyeZm'] = "eyeZm"; $tabs['users'] = translate('Users'); if ( isset($_REQUEST['tab']) ) From 0277a66700fdaa047a709f26b64a4bf5d4af2213 Mon Sep 17 00:00:00 2001 From: SteveGilvarry Date: Tue, 29 Dec 2015 03:03:04 +1100 Subject: [PATCH 5/6] Remove eyezm from distros and Cmake. Conflicts: distros/debian8/control --- .gitignore | 1 - distros/debian8/control | 23 +------------------ distros/debian8/zoneminder-ui-mobile.install | 1 - distros/debian8/zoneminder-ui-xml.install | 1 - .../fedora/archive/zoneminder.cmake.f19.spec | 1 - distros/fedora/archive/zoneminder.f19.spec | 1 - distros/fedora/archive/zoneminder.f20.spec | 1 - distros/fedora/archive/zoneminder.f21.spec | 1 - distros/fedora/zoneminder.f22.spec | 1 - distros/fedora/zoneminder.f23.spec | 1 - distros/redhat/archive/zoneminder.el6.spec | 1 - distros/redhat/zoneminder.el6.spec | 1 - distros/redhat/zoneminder.el7.spec | 1 - .../ubuntu1504_cmake_split_packages/control | 23 +------------------ .../zoneminder-ui-mobile.install | 1 - .../zoneminder-ui-xml.install | 1 - src/CMakeLists.txt | 8 +++---- 17 files changed, 5 insertions(+), 63 deletions(-) delete mode 100644 distros/debian8/zoneminder-ui-mobile.install delete mode 100644 distros/debian8/zoneminder-ui-xml.install delete mode 100644 distros/ubuntu1504_cmake_split_packages/zoneminder-ui-mobile.install delete mode 100644 distros/ubuntu1504_cmake_split_packages/zoneminder-ui-xml.install diff --git a/.gitignore b/.gitignore index fa066279c..bd66e684a 100644 --- a/.gitignore +++ b/.gitignore @@ -63,7 +63,6 @@ src/zma src/zmc src/zmf src/zms -src/zmstreamer src/zmu web/includes/config.php zm.conf diff --git a/distros/debian8/control b/distros/debian8/control index af5ba9ad0..4ab0c07e6 100644 --- a/distros/debian8/control +++ b/distros/debian8/control @@ -13,9 +13,7 @@ Depends: ${misc:Depends}, zoneminder-database (>= ${source:Version}), zoneminder-core (>= ${binary:Version}), zoneminder-ui-base (>= ${source:Version}), - zoneminder-ui-classic (>= ${source:Version}), - zoneminder-ui-mobile (>= ${source:Version}), - zoneminder-ui-xml (>= ${source:Version}) + zoneminder-ui-classic (>= ${source:Version}) Description: Video camera security and surveillance solution (metapackage) ZoneMinder is intended for use in single or multi-camera video security applications, including commercial or home CCTV, theft prevention and child @@ -101,22 +99,3 @@ Description: Classic web user interface for ZoneMinder ZoneMinder is a video camera security and surveillance solution. . This package provides the classic web user interface. - -Package: zoneminder-ui-mobile -Section: web -Architecture: all -Depends: zoneminder-ui-base (>= ${source:Version}), ${misc:Depends} -Description: Mobile web user interface for ZoneMinder - ZoneMinder is a video camera security and surveillance solution. - . - This package provides the web user interface for mobile devices. - -Package: zoneminder-ui-xml -Section: web -Architecture: all -Depends: zoneminder-ui-base (>= ${source:Version}), ${misc:Depends} -Description: XML interface for ZoneMinder - ZoneMinder is a video camera security and surveillance solution. - . - This package provides a XML interface mainly intended for use with the eyeZm - iPhone Application, but can be used with any other custom programs as well. diff --git a/distros/debian8/zoneminder-ui-mobile.install b/distros/debian8/zoneminder-ui-mobile.install deleted file mode 100644 index 464bb74eb..000000000 --- a/distros/debian8/zoneminder-ui-mobile.install +++ /dev/null @@ -1 +0,0 @@ -usr/share/zoneminder/skins/mobile diff --git a/distros/debian8/zoneminder-ui-xml.install b/distros/debian8/zoneminder-ui-xml.install deleted file mode 100644 index 6617707f8..000000000 --- a/distros/debian8/zoneminder-ui-xml.install +++ /dev/null @@ -1 +0,0 @@ -usr/share/zoneminder/skins/xml diff --git a/distros/fedora/archive/zoneminder.cmake.f19.spec b/distros/fedora/archive/zoneminder.cmake.f19.spec index 771209247..0af88f41f 100644 --- a/distros/fedora/archive/zoneminder.cmake.f19.spec +++ b/distros/fedora/archive/zoneminder.cmake.f19.spec @@ -140,7 +140,6 @@ fi # zmfix removed from zoneminder 1.26.6 #%attr(4755,root,root) %{_bindir}/zmfix %{_bindir}/zmpkg.pl -%{_bindir}/zmstreamer %{_bindir}/zmtrack.pl %{_bindir}/zmtrigger.pl %{_bindir}/zmu diff --git a/distros/fedora/archive/zoneminder.f19.spec b/distros/fedora/archive/zoneminder.f19.spec index 11a8ba249..d1be12aa2 100644 --- a/distros/fedora/archive/zoneminder.f19.spec +++ b/distros/fedora/archive/zoneminder.f19.spec @@ -232,7 +232,6 @@ fi # zmfix removed from zoneminder 1.26.6 #%attr(4755,root,root) %{_bindir}/zmfix %{_bindir}/zmpkg.pl -%{_bindir}/zmstreamer %{_bindir}/zmtrack.pl %{_bindir}/zmtrigger.pl %{_bindir}/zmu diff --git a/distros/fedora/archive/zoneminder.f20.spec b/distros/fedora/archive/zoneminder.f20.spec index b06db673d..513a9cfee 100644 --- a/distros/fedora/archive/zoneminder.f20.spec +++ b/distros/fedora/archive/zoneminder.f20.spec @@ -142,7 +142,6 @@ fi %{_bindir}/zmf %{_bindir}/zmfilter.pl %{_bindir}/zmpkg.pl -%{_bindir}/zmstreamer %{_bindir}/zmtrack.pl %{_bindir}/zmtrigger.pl %{_bindir}/zmu diff --git a/distros/fedora/archive/zoneminder.f21.spec b/distros/fedora/archive/zoneminder.f21.spec index 6dfabceea..35662bf6c 100644 --- a/distros/fedora/archive/zoneminder.f21.spec +++ b/distros/fedora/archive/zoneminder.f21.spec @@ -142,7 +142,6 @@ fi %{_bindir}/zmf %{_bindir}/zmfilter.pl %{_bindir}/zmpkg.pl -%{_bindir}/zmstreamer %{_bindir}/zmtrack.pl %{_bindir}/zmtrigger.pl %{_bindir}/zmu diff --git a/distros/fedora/zoneminder.f22.spec b/distros/fedora/zoneminder.f22.spec index 9beef6319..40343090f 100644 --- a/distros/fedora/zoneminder.f22.spec +++ b/distros/fedora/zoneminder.f22.spec @@ -154,7 +154,6 @@ fi %{_bindir}/zmf %{_bindir}/zmfilter.pl %{_bindir}/zmpkg.pl -%{_bindir}/zmstreamer %{_bindir}/zmtrack.pl %{_bindir}/zmtrigger.pl %{_bindir}/zmu diff --git a/distros/fedora/zoneminder.f23.spec b/distros/fedora/zoneminder.f23.spec index 14b653117..6fabd143d 100644 --- a/distros/fedora/zoneminder.f23.spec +++ b/distros/fedora/zoneminder.f23.spec @@ -154,7 +154,6 @@ fi %{_bindir}/zmf %{_bindir}/zmfilter.pl %{_bindir}/zmpkg.pl -%{_bindir}/zmstreamer %{_bindir}/zmtrack.pl %{_bindir}/zmtrigger.pl %{_bindir}/zmu diff --git a/distros/redhat/archive/zoneminder.el6.spec b/distros/redhat/archive/zoneminder.el6.spec index d61a153e7..46bce099a 100644 --- a/distros/redhat/archive/zoneminder.el6.spec +++ b/distros/redhat/archive/zoneminder.el6.spec @@ -237,7 +237,6 @@ fi # zmfix removed from zoneminder 1.26.6 #%attr(4755,root,root) %{_bindir}/zmfix %{_bindir}/zmpkg.pl -%{_bindir}/zmstreamer %{_bindir}/zmtrack.pl %{_bindir}/zmtrigger.pl %{_bindir}/zmu diff --git a/distros/redhat/zoneminder.el6.spec b/distros/redhat/zoneminder.el6.spec index 82406d431..1059d5930 100644 --- a/distros/redhat/zoneminder.el6.spec +++ b/distros/redhat/zoneminder.el6.spec @@ -145,7 +145,6 @@ rm -rf %{_docdir}/%{name}-%{version} %{_bindir}/zmf %{_bindir}/zmfilter.pl %{_bindir}/zmpkg.pl -%{_bindir}/zmstreamer %{_bindir}/zmtrack.pl %{_bindir}/zmtrigger.pl %{_bindir}/zmu diff --git a/distros/redhat/zoneminder.el7.spec b/distros/redhat/zoneminder.el7.spec index c350553b3..6dd0f5e1d 100644 --- a/distros/redhat/zoneminder.el7.spec +++ b/distros/redhat/zoneminder.el7.spec @@ -154,7 +154,6 @@ fi %{_bindir}/zmf %{_bindir}/zmfilter.pl %{_bindir}/zmpkg.pl -%{_bindir}/zmstreamer %{_bindir}/zmtrack.pl %{_bindir}/zmtrigger.pl %{_bindir}/zmu diff --git a/distros/ubuntu1504_cmake_split_packages/control b/distros/ubuntu1504_cmake_split_packages/control index 4a152c46b..6b6692414 100644 --- a/distros/ubuntu1504_cmake_split_packages/control +++ b/distros/ubuntu1504_cmake_split_packages/control @@ -28,9 +28,7 @@ Depends: ${misc:Depends}, zoneminder-database (>= ${source:Version}), zoneminder-core (>= ${binary:Version}), zoneminder-ui-base (>= ${source:Version}), - zoneminder-ui-classic (>= ${source:Version}), - zoneminder-ui-mobile (>= ${source:Version}), - zoneminder-ui-xml (>= ${source:Version}) + zoneminder-ui-classic (>= ${source:Version}) Description: Video camera security and surveillance solution (metapackage) ZoneMinder is intended for use in single or multi-camera video security applications, including commercial or home CCTV, theft prevention and child @@ -117,25 +115,6 @@ Description: Classic web user interface for ZoneMinder . This package provides the classic web user interface. -Package: zoneminder-ui-mobile -Section: web -Architecture: all -Depends: zoneminder-ui-base (>= ${source:Version}), ${misc:Depends} -Description: Mobile web user interface for ZoneMinder - ZoneMinder is a video camera security and surveillance solution. - . - This package provides the web user interface for mobile devices. - -Package: zoneminder-ui-xml -Section: web -Architecture: all -Depends: zoneminder-ui-base (>= ${source:Version}), ${misc:Depends} -Description: XML interface for ZoneMinder - ZoneMinder is a video camera security and surveillance solution. - . - This package provides a XML interface mainly intended for use with the eyeZm - iPhone Application, but can be used with any other custom programs as well. - Package: zoneminder-ui-api Section: web Architecture: all diff --git a/distros/ubuntu1504_cmake_split_packages/zoneminder-ui-mobile.install b/distros/ubuntu1504_cmake_split_packages/zoneminder-ui-mobile.install deleted file mode 100644 index 464bb74eb..000000000 --- a/distros/ubuntu1504_cmake_split_packages/zoneminder-ui-mobile.install +++ /dev/null @@ -1 +0,0 @@ -usr/share/zoneminder/skins/mobile diff --git a/distros/ubuntu1504_cmake_split_packages/zoneminder-ui-xml.install b/distros/ubuntu1504_cmake_split_packages/zoneminder-ui-xml.install deleted file mode 100644 index 6617707f8..000000000 --- a/distros/ubuntu1504_cmake_split_packages/zoneminder-ui-xml.install +++ /dev/null @@ -1 +0,0 @@ -usr/share/zoneminder/skins/xml diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ea254ac2f..9876e2a87 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -14,21 +14,19 @@ add_executable(zma zma.cpp) add_executable(zmu zmu.cpp) add_executable(zmf zmf.cpp) add_executable(zms zms.cpp) -add_executable(zmstreamer zmstreamer.cpp) target_link_libraries(zmc zm ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS}) target_link_libraries(zma zm ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS}) target_link_libraries(zmu zm ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS}) target_link_libraries(zmf zm ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS}) target_link_libraries(zms zm ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS}) -target_link_libraries(zmstreamer zm ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS}) # Generate man files for the binaries destined for the bin folder -FOREACH(CBINARY zma zmc zmf zmu zmstreamer) +FOREACH(CBINARY zma zmc zmf zmu) POD2MAN(${CMAKE_CURRENT_SOURCE_DIR}/${CBINARY}.cpp zoneminder-${CBINARY} 8) -ENDFOREACH(CBINARY zma zmc zmf zmu zmstreamer) +ENDFOREACH(CBINARY zma zmc zmf zmu) -install(TARGETS zmc zma zmu zmf zmstreamer RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) +install(TARGETS zmc zma zmu zmf RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) install(TARGETS zms RUNTIME DESTINATION "${ZM_CGIDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) install(CODE "execute_process(COMMAND ln -sf zms nph-zms WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})" ) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/nph-zms DESTINATION "${ZM_CGIDIR}") From d40bf89b17995af756adb76326c4894e41318530 Mon Sep 17 00:00:00 2001 From: SteveGilvarry Date: Tue, 29 Dec 2015 08:04:02 +1100 Subject: [PATCH 6/6] Remove Phone BW settings used with mobile skin --- docs/userguide/options.rst | 1 - docs/userguide/options/options_phonebw.rst | 20 --- .../lib/ZoneMinder/ConfigData.pm.in | 155 ------------------ web/includes/actions.php | 1 - web/skins/classic/views/options.php | 1 - 5 files changed, 178 deletions(-) delete mode 100644 docs/userguide/options/options_phonebw.rst diff --git a/docs/userguide/options.rst b/docs/userguide/options.rst index 8f7fbad30..8186d8b6a 100644 --- a/docs/userguide/options.rst +++ b/docs/userguide/options.rst @@ -19,5 +19,4 @@ If you have changed the value of an option you should then ‘save’ it. A numb options/options_upload options/options_x10 options/options_bw - options/options_phonebw options/options_users diff --git a/docs/userguide/options/options_phonebw.rst b/docs/userguide/options/options_phonebw.rst deleted file mode 100644 index e2389bccf..000000000 --- a/docs/userguide/options/options_phonebw.rst +++ /dev/null @@ -1,20 +0,0 @@ -Options - Phone Bandwidth -------------------------- - -.. image:: images/Options_BW_Phone.png - -WEB_P_CAN_STREAM - Override the automatic detection of browser streaming capability. If you know that your browser can handle image streams of the type 'multipart/x-mixed-replace' but ZoneMinder does not detect this correctly you can set this option to ensure that the stream is delivered with or without the use of the Cambozola plugin. Selecting 'yes' will tell ZoneMinder that your browser can handle the streams natively, 'no' means that it can't and so the plugin will be used while 'auto' lets ZoneMinder decide. - -WEB_P_STREAM_METHOD - ZoneMinder can be configured to use either mpeg encoded video or a series or still jpeg images when sending video streams. This option defines which is used. If you choose mpeg you should ensure that you have the appropriate plugins available on your browser whereas choosing jpeg will work natively on Mozilla and related browsers and with a Java applet on Internet Explorer" - -WEB_P_DEFAULT_SCALE - Normally ZoneMinder will display 'live' or 'event' streams in their native size. However if you have monitors with large dimensions or a slow link you may prefer to reduce this size, alternatively for small monitors you can enlarge it. This options lets you specify what the default scaling factor will be. It is expressed as a percentage so 100 is normal size, 200 is double size etc. - -WEB_P_DEFAULT_RATE - Normally ZoneMinder will display 'event' streams at their native rate, i.e. as close to real-time as possible. However if you have long events it is often convenient to replay them at a faster rate for review. This option lets you specify what the default replay rate will be. It is expressed as a percentage so 100 is normal rate, 200 is double speed etc. - -WEB_P_VIDEO_BITRATE - When encoding real video via the ffmpeg library a bit rate can be specified which roughly corresponds to the available bandwidth used for the stream. This setting effectively corresponds to a 'quality' setting for the video. A low value will result in a blocky image whereas a high value will produce a clearer view. Note that this setting does not control the frame rate of the video however the quality of the video produced is affected both by this setting and the frame rate that the video is produced at. A higher frame rate at a particular bit rate result in individual frames being at a lower quality. - -WEB_P_VIDEO_MAXFPS - When using streamed video the main control is the bitrate which determines how much data can be transmitted. However a lower bitrate at high frame rates results in a lower quality image. This option allows you to limit the maximum frame rate to ensure that video quality is maintained. An additional advantage is that encoding video at high frame rates is a processor intensive task when for the most part a very high frame rate offers little perceptible improvement over one that has a more manageable resource requirement. Note, this option is implemented as a cap beyond which binary reduction takes place. So if you have a device capturing at 15fps and set this option to 10fps then the video is not produced at 10fps, but rather at 7.5fps (15 divided by 2) as the final frame rate must be the original divided by a power of 2. - -WEB_P_SCALE_THUMBS - If unset, this option sends the whole image to the browser which resizes it in the window. If set the image is scaled down on the server before sending a reduced size image to the browser to conserve bandwidth at the cost of cpu on the server. Note that ZM can only perform the resizing if the appropriate PHP graphics functionality is installed. This is usually available in the php-gd package. - -WEB_P_AJAX_TIMEOUT - The newer versions of the live feed and event views use Ajax to request information from the server and populate the views dynamically. This option allows you to specify a timeout if required after which requests are abandoned. A timeout may be necessary if requests would overwise hang such as on a slow connection. This would tend to consume a lot of browser memory and make the interface unresponsive. Ordinarily no requests should timeout so this setting should be set to a value greater than the slowest expected response. This value is in milliseconds but if set to zero then no timeout will be used. \ No newline at end of file diff --git a/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in b/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in index c9d48f52f..0c421fec6 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in +++ b/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in @@ -3721,161 +3721,6 @@ body = "ZM alarm detected - %EL% secs, %EF%/%EFA% frames, t%EST%/m%ESM%/a%ESA% s type => $types{integer}, category => "lowband", }, - { - name => "ZM_WEB_P_CAN_STREAM", - default => "auto", - description => "Override the automatic detection of browser streaming capability", - help => qqq(" - If you know that your browser can handle image streams of the - type 'multipart/x-mixed-replace' but ZoneMinder does not detect - this correctly you can set this option to ensure that the - stream is delivered with or without the use of the Cambozola - plugin. Selecting 'yes' will tell ZoneMinder that your browser - can handle the streams natively, 'no' means that it can't and - so the plugin will be used while 'auto' lets ZoneMinder decide. - "), - type => $types{tristate}, - category => "phoneband", - }, - { - name => "ZM_WEB_P_STREAM_METHOD", - default => "jpeg", - description => "Which method should be used to send video streams to your browser.", - help => qqq(" - ZoneMinder can be configured to use either mpeg encoded video - or a series or still jpeg images when sending video streams. - This option defines which is used. If you choose mpeg you - should ensure that you have the appropriate plugins available - on your browser whereas choosing jpeg will work natively on - Mozilla and related browsers and with a Java applet on Internet - Explorer - "), - type => { - db_type =>"string", - hint =>"mpeg|jpeg", - pattern =>qr|^([mj])|i, - format =>q( $1 =~ /^m/ ? "mpeg" : "jpeg" ) - }, - category => "phoneband", - }, - { - name => "ZM_WEB_P_DEFAULT_SCALE", - default => "100", - description => "What the default scaling factor applied to 'live' or 'event' views is (%)", - help => qqq(" - Normally ZoneMinder will display 'live' or 'event' streams in - their native size. However if you have monitors with large - dimensions or a slow link you may prefer to reduce this size, - alternatively for small monitors you can enlarge it. This - options lets you specify what the default scaling factor will - be. It is expressed as a percentage so 100 is normal size, 200 - is double size etc. - "), - type => { - db_type =>"integer", - hint =>"25|33|50|75|100|150|200|300|400", - pattern =>qr|^(\d+)$|, format=>q( $1 ) - }, - category => "phoneband", - }, - { - name => "ZM_WEB_P_DEFAULT_RATE", - default => "100", - description => "What the default replay rate factor applied to 'event' views is (%)", - help => qqq(" - Normally ZoneMinder will display 'event' streams at their - native rate, i.e. as close to real-time as possible. However if - you have long events it is often convenient to replay them at a - faster rate for review. This option lets you specify what the - default replay rate will be. It is expressed as a percentage so - 100 is normal rate, 200 is double speed etc. - "), - type => { - db_type =>"integer", - hint =>"25|50|100|150|200|400|1000|2500|5000|10000", - pattern =>qr|^(\d+)$|, - format =>q( $1 ) - }, - category => "phoneband", - }, - { - name => "ZM_WEB_P_VIDEO_BITRATE", - default => "8000", - description => "What the bitrate of the video encoded stream should be set to", - help => qqq(" - When encoding real video via the ffmpeg library a bit rate can - be specified which roughly corresponds to the available - bandwidth used for the stream. This setting effectively - corresponds to a 'quality' setting for the video. A low value - will result in a blocky image whereas a high value will produce - a clearer view. Note that this setting does not control the - frame rate of the video however the quality of the video - produced is affected both by this setting and the frame rate - that the video is produced at. A higher frame rate at a - particular bit rate result in individual frames being at a - lower quality. - "), - type => $types{integer}, - category => "phoneband", - }, - { - name => "ZM_WEB_P_VIDEO_MAXFPS", - default => "5", - description => "What the maximum frame rate for streamed video should be", - help => qqq(" - When using streamed video the main control is the bitrate which - determines how much data can be transmitted. However a lower - bitrate at high frame rates results in a lower quality image. - This option allows you to limit the maximum frame rate to - ensure that video quality is maintained. An additional - advantage is that encoding video at high frame rates is a - processor intensive task when for the most part a very high - frame rate offers little perceptible improvement over one that - has a more manageable resource requirement. Note, this option - is implemented as a cap beyond which binary reduction takes - place. So if you have a device capturing at 15fps and set this - option to 10fps then the video is not produced at 10fps, but - rather at 7.5fps (15 divided by 2) as the final frame rate must - be the original divided by a power of 2. - "), - type => $types{integer}, - category => "phoneband", - }, - { - name => "ZM_WEB_P_SCALE_THUMBS", - default => "yes", - description => "Scale thumbnails in events, bandwidth versus cpu in rescaling", - help => qqq(" - If unset, this option sends the whole image to the browser - which resizes it in the window. If set the image is scaled down - on the server before sending a reduced size image to the - browser to conserve bandwidth at the cost of cpu on the server. - Note that ZM can only perform the resizing if the appropriate - PHP graphics functionality is installed. This is usually - available in the php-gd package. - "), - type => $types{boolean}, - category => "phoneband", - }, - { - name => "ZM_WEB_P_AJAX_TIMEOUT", - default => "10000", - description => "How long to wait for Ajax request responses (ms)", - help => qqq(" - The newer versions of the live feed and event views use Ajax to - request information from the server and populate the views - dynamically. This option allows you to specify a timeout if - required after which requests are abandoned. A timeout may be - necessary if requests would overwise hang such as on a slow - connection. This would tend to consume a lot of browser memory - and make the interface unresponsive. Ordinarily no requests - should timeout so this setting should be set to a value greater - than the slowest expected response. This value is in - milliseconds but if set to zero then no timeout will be used. - "), - type => $types{integer}, - category => "phoneband", - }, { name => "ZM_DYN_LAST_VERSION", default => "", diff --git a/web/includes/actions.php b/web/includes/actions.php index 7de7a8238..4cd056116 100644 --- a/web/includes/actions.php +++ b/web/includes/actions.php @@ -921,7 +921,6 @@ if ( !empty($action) ) case "highband" : case "medband" : case "lowband" : - case "phoneband" : break; } } diff --git a/web/skins/classic/views/options.php b/web/skins/classic/views/options.php index 30ea85f43..1140b7bfd 100644 --- a/web/skins/classic/views/options.php +++ b/web/skins/classic/views/options.php @@ -42,7 +42,6 @@ $tabs['x10'] = translate('X10'); $tabs['highband'] = translate('HighBW'); $tabs['medband'] = translate('MediumBW'); $tabs['lowband'] = translate('LowBW'); -$tabs['phoneband'] = translate('PhoneBW'); $tabs['users'] = translate('Users'); if ( isset($_REQUEST['tab']) )