2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
|
|
|
//
|
|
|
|
// ZoneMinder HTML configuration file, $Date$, $Revision$
|
2008-07-25 17:48:16 +08:00
|
|
|
// Copyright (C) 2001-2008 Philip Coombes
|
2008-07-14 21:54:50 +08:00
|
|
|
//
|
|
|
|
// 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
|
2016-12-26 23:23:16 +08:00
|
|
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2008-07-14 21:54:50 +08:00
|
|
|
//
|
|
|
|
|
|
|
|
$rates = array(
|
2017-03-07 06:30:00 +08:00
|
|
|
'10000' => '100x',
|
|
|
|
'5000' => '50x',
|
|
|
|
'2500' => '25x',
|
|
|
|
'1000' => '10x',
|
|
|
|
'400' => '4x',
|
|
|
|
'200' => '2x',
|
|
|
|
'100' => translate('Real'),
|
2017-06-29 02:27:09 +08:00
|
|
|
'50' => '1/2x',
|
|
|
|
'25' => '1/4x',
|
2008-07-14 21:54:50 +08:00
|
|
|
);
|
|
|
|
|
|
|
|
$scales = array(
|
2017-10-22 10:11:29 +08:00
|
|
|
'auto' => translate('Scale to Fit'),
|
2017-03-07 06:30:00 +08:00
|
|
|
'' => translate('Fixed Width/Height'),
|
|
|
|
'400' => '4x',
|
|
|
|
'300' => '3x',
|
|
|
|
'200' => '2x',
|
2017-06-29 02:27:09 +08:00
|
|
|
'150' => '1.5x',
|
2017-03-07 06:30:00 +08:00
|
|
|
'100' => translate('Actual'),
|
2017-06-29 02:27:09 +08:00
|
|
|
'75' => '3/4x',
|
|
|
|
'50' => '1/2x',
|
|
|
|
'33' => '1/3x',
|
|
|
|
'25' => '1/4x',
|
|
|
|
'12.5' => '1/8x',
|
2008-07-14 21:54:50 +08:00
|
|
|
);
|
|
|
|
|
2017-10-22 10:11:29 +08:00
|
|
|
if (isset($_REQUEST['view'])) unset($scales[$_REQUEST['view'] == 'event' ? '' : 'auto']); //Remove the option we aren't using on montage or event
|
|
|
|
|
2017-10-13 00:09:05 +08:00
|
|
|
$bandwidth_options = array(
|
2017-03-07 06:30:00 +08:00
|
|
|
'high' => translate('High'),
|
|
|
|
'medium' => translate('Medium'),
|
|
|
|
'low' => translate('Low')
|
2008-07-14 21:54:50 +08:00
|
|
|
);
|
|
|
|
|
2017-10-13 02:43:15 +08:00
|
|
|
switch ( $_COOKIE['zmBandwidth'] ) {
|
|
|
|
case 'high' : {
|
2017-03-07 06:30:00 +08:00
|
|
|
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
|
2008-07-14 21:54:50 +08:00
|
|
|
break;
|
2017-10-13 02:43:15 +08:00
|
|
|
} case 'medium' : {
|
2017-03-07 06:30:00 +08:00
|
|
|
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
|
2008-07-14 21:54:50 +08:00
|
|
|
break;
|
2017-10-13 02:43:15 +08:00
|
|
|
} case 'low' : {
|
2017-03-07 06:30:00 +08:00
|
|
|
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
|
2008-07-14 21:54:50 +08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|