Converted to use zmconfig tool.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@266 e3e1d417-86f3-4887-817a-d78f3d33393f
pull/27/merge
stan 2003-01-10 16:43:47 +00:00
parent bff035e97b
commit 1e0ba22367
2 changed files with 96 additions and 69 deletions

View File

@ -19,16 +19,16 @@
#include "config.h" #include "config.h"
#define ZM_DATABASE "zm" // Database name #define ZM_DB_NAME "<from zmconfig>" // Database name
#define ZM_DB_USERA "zmadmin" // Privileged DB user name, needs at least select, insert, delete privileges #define ZM_DB_USERA "<from zmconfig>" // Privileged DB user name, needs at least select, insert, delete privileges
#define ZM_DB_PASSA "zmadminzm" // Privileged DB user password #define ZM_DB_PASSA "<from zmconfig>" // Privileged DB user password
#define ZM_DB_USERB "zmuser" // Unprivileged DB user name, need just select privilege. #define ZM_DB_USERB "<from zmconfig>" // Unprivileged DB user name, need just select privilege.
#define ZM_DB_PASSB "zmuserzm" // Unprivileged DB user password #define ZM_DB_PASSB "<from zmconfig>" // Unprivileged DB user password
#define ZM_SHM_KEY 0x7a6d2000 // Base shared memory key #define ZM_SHM_KEY <from zmconfig> // Base shared memory key
#define ZM_EVENT_DIR "events" // Event directory relative to web directory #define ZM_EVENT_DIR <from zmconfig> // Event directory relative to web directory
#define ZM_FORCED_ALARM_SCORE 255 // Score to give X10 forced alarms #define ZM_FORCED_ALARM_SCORE <from zmconfig> // Score to give X10 forced alarms
#define ZM_RECORD_EVENT_STATS true // Whether to record event statistical information, change to false if too slow #define ZM_RECORD_EVENT_STATS <from zmconfig> // Whether to record event statistical information, change to false if too slow

View File

@ -19,85 +19,112 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// //
define( "DB_SERVER", "localhost" ); // Database Server machine // This section contains options substituted by the zmconfig.pl utility, do not edit these directly
define( "DB_NAME", "zm" ); // Database containing the tables //
define( "DB_USER", "zmadmin" ); // Database login define( "ZM_DB_SERVER", "<from zmconfig>" ); // Database Server machine
define( "DB_PASS", "zmadminzm" ); // Database password define( "ZM_DB_NAME", "<from zmconfig>" ); // Database containing the tables
define( "ZM_DB_USERA", "<from zmconfig>" ); // Database login
define( "ZM_DB_PASSA", "<from zmconfig>" ); // Database password
define( "ZM_PATH_EVENTS", "<from zmconfig>" ); // Local relative path to where events directory lives
define( "ZM_PATH_CAMBOZOLA", "<from zmconfig>" ); // Path to (optional) cambozola java streaming client (recommended)
define( "ZM_PATH_MPEG_ENCODE", "<from zmconfig>" ); // Path to (optional) mpeg video encoder
define( "ZM_PATH_NETPBM", "<from zmconfig>" ); // Path to (optional) Netpbm utilities
define( "ZM_WEB_POPUP_ON_ALARM", <from zmconfig> ); // Whether the watch window jumps to front if an alarm occurs
define( "ZM_WEB_SOUND_ON_ALARM", <from zmconfig> ); // Whether the watch window jumps to front if an alarm occurs
define( "ZM_WEB_ALARM_SOUND", <from zmconfig> ); // A sound to play on alarm, put this in the sounds directory
define( "ZM_OPT_FAST_DELETE", <from zmconfig> ); // Whether we only delete event DB records and leave zmaudit to do the rest
define( "ZM_OPT_X10", <from zmconfig> ); // Whether we want to interface with X10 devices
define( "ZM_PATH", "@prefix@/bin" ); // Path to the general ZoneMonitor executables // Bandwidth specific ones from zmconfig.pl, again do not edit these directly as changes may be lost
define( "ZMU_PATH", ZM_PATH."/zmu" ); // Path to the ZoneMinder Utility //
define( "ZMS_PATH", "/cgi-bin/zms" ); // Path to the ZoneMinder Stream server define( "ZM_WEB_H_REFRESH_MAIN", <from zmconfig> ); // How often (in seconds) the main console window refreshes
define( "EVENT_PATH", "events" ); // Local path to where events directory lives define( "ZM_WEB_H_REFRESH_CYCLE", <from zmconfig> ); // How often the cycle watch windows swaps to the next monitor
define( "ZMS_EVENT_PATH", "@WEB_PREFIX@" ); // Full path (not web) to where events directory lives define( "ZM_WEB_H_REFRESH_IMAGE", <from zmconfig> ); // How often the watched image is refreshed (if not streaming)
define( "CAMBOZOLA_PATH", "cambozola.jar" ); // Path to (optional) cambozola java streaming client (recommended) define( "ZM_WEB_H_REFRESH_STATUS", <from zmconfig> ); // How often the little status frame refreshes itself in the watch window
define( "MPEG_ENCODE_PATH", "./mpeg_encode" ); // Path to (optional) mpeg video encoder define( "ZM_WEB_H_REFRESH_EVENTS", <from zmconfig> ); // How often the event listing is refreshed in the watch window, only for recent events
define( "NETPBM_DIR", "/usr/bin" ); // Path to (optional) Netpbm utilities define( "ZM_WEB_H_STREAM_IDLE_DELAY", <from zmconfig> );// How long (in milliseconds) between streamed frames in the watch window
define( "ZM_WEB_H_STREAM_FRAME_DELAY", <from zmconfig> );// How long (in milliseconds) to wait before looking for the next streamed frame
define( "ZM_WEB_H_STREAM_EVENT_DELAY", <from zmconfig> );// How long (in milliseconds) to wait between each frame when streaming events
define( "ZM_WEB_H_IMAGE_SCALING", <from zmconfig> ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling
define( "ZM_WEB_M_REFRESH_MAIN", <from zmconfig> ); // How often (in seconds) the main console window refreshes
define( "ZM_WEB_M_REFRESH_CYCLE", <from zmconfig> ); // How often the cycle watch windows swaps to the next monitor
define( "ZM_WEB_M_REFRESH_IMAGE", <from zmconfig> ); // How often the watched image is refreshed (if not streaming)
define( "ZM_WEB_M_REFRESH_STATUS", <from zmconfig> ); // How often the little status frame refreshes itself in the watch window
define( "ZM_WEB_M_REFRESH_EVENTS", <from zmconfig> ); // How often the event listing is refreshed in the watch window, only for recent events
define( "ZM_WEB_M_STREAM_IDLE_DELAY", <from zmconfig> );// How long (in milliseconds) between streamed frames in the watch window
define( "ZM_WEB_M_STREAM_FRAME_DELAY", <from zmconfig> );// How long (in milliseconds) to wait before looking for the next streamed frame
define( "ZM_WEB_M_STREAM_EVENT_DELAY", <from zmconfig> );// How long (in milliseconds) to wait between each frame when streaming events
define( "ZM_WEB_M_IMAGE_SCALING", <from zmconfig> ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling
define( "ZM_WEB_L_REFRESH_MAIN", <from zmconfig> ); // How often (in seconds) the main console window refreshes
define( "ZM_WEB_L_REFRESH_CYCLE", <from zmconfig> ); // How often the cycle watch windows swaps to the next monitor
define( "ZM_WEB_L_REFRESH_IMAGE", <from zmconfig> ); // How often the watched image is refreshed (if not streaming)
define( "ZM_WEB_L_REFRESH_STATUS", <from zmconfig> ); // How often the little status frame refreshes itself in the watch window
define( "ZM_WEB_L_REFRESH_EVENTS", <from zmconfig> ); // How often the event listing is refreshed in the watch window, only for recent events
define( "ZM_WEB_L_STREAM_IDLE_DELAY", <from zmconfig> );// How long (in milliseconds) between streamed frames in the watch window
define( "ZM_WEB_L_STREAM_FRAME_DELAY", <from zmconfig> );// How long (in milliseconds) to wait before looking for the next streamed frame
define( "ZM_WEB_L_STREAM_EVENT_DELAY", <from zmconfig> );// How long (in milliseconds) to wait between each frame when streaming events
define( "ZM_WEB_L_IMAGE_SCALING", <from zmconfig> ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling
define( "ZM_WEB_P_REFRESH_MAIN", <from zmconfig> ); // How often (in seconds) the main console window refreshes
define( "ZM_WEB_P_REFRESH_IMAGE", <from zmconfig> ); // How often the watched image is refreshed (if not streaming)
define( "MAX_EVENTS", 12 ); // The maximum number of events to show in the monitor event listing // This section is options normally derived from other options or configuration
define( "EVENT_HEADER_LINES", 25 ); // How many events are listed in the event window before a new header is inserted //
define( "ALARM_POPUP", true ); // Whether the watch window jumps to front if an alarm occurs define( "ZM_PATH", "@prefix@/bin" ); // Local path to the general ZoneMonitor executables
define( "ALARM_SOUND", "Yeow.wav" ); // A sound to play on alarm, put this in the sounds directory define( "ZMU_PATH", ZM_PATH."/zmu" ); // Local path to the ZoneMinder Utility
define( "FAST_DELETE", true ); // Whether we only delete event DB records and leave zmaudit to do the rest define( "ZMS_PATH", "/cgi-bin/zms" ); // Web path to the ZoneMinder Stream server
define( "HAS_X10", true ); // Whether we want to interface with X10 devices define( "ZMS_EVENT_PATH", "@WEB_PREFIX@/".EVENT_PATH ); // Full path (not web) to where events directory lives
define( "LEARN_MODE", false ); // Currently unimplemented, do not change // These are miscelleaneous options you won't normally need to change
//
define( "MAX_EVENTS", 12 ); // The maximum number of events to show in the monitor event listing
define( "EVENT_HEADER_LINES", 25 ); // How many events are listed in the event window before a new header is inserted
define( "LEARN_MODE", false ); // Currently unimplemented, do not change
switch ( $bandwidth ) switch ( $bandwidth )
{ {
case "high" : case "high" :
{ {
define( "REFRESH_MAIN", 300 ); // How often (in seconds) the main console window refreshes define( "REFRESH_MAIN", ZM_WEB_H_REFRESH_MAIN ); // How often (in seconds) the main console window refreshes
define( "REFRESH_CYCLE", 5 ); // How often the cycle watch windows swaps to the next monitor define( "REFRESH_CYCLE", ZM_WEB_H_REFRESH_CYCLE ); // How often the cycle watch windows swaps to the next monitor
define( "REFRESH_IMAGE", 5 ); // How often the watched image is refreshed (if not streaming) define( "REFRESH_IMAGE", ZM_WEB_H_REFRESH_IMAGE ); // How often the watched image is refreshed (if not streaming)
define( "REFRESH_STATUS", 3 ); // How often the little status frame refreshes itself in the watch window define( "REFRESH_STATUS", ZM_WEB_H_REFRESH_STATUS ); // How often the little status frame refreshes itself in the watch window
define( "REFRESH_EVENTS", 30 ); // How often the event listing is refreshed in the watch window, only for recent events define( "REFRESH_EVENTS", ZM_WEB_H_REFRESH_EVENTS ); // How often the event listing is refreshed in the watch window, only for recent events
define( "REFRESH_EVENTS_ALL", 120 ); // How often the event listing is refreshed when looking at longer listings define( "STREAM_IDLE_DELAY", ZM_WEB_H_STREAM_IDLE_DELAY ); // How long (in milliseconds) between streamed frames in the watch window
define( "STREAM_IDLE_DELAY", 1000 ); // How long (in milliseconds) between streamed frames in the watch window define( "STREAM_FRAME_DELAY", ZM_WEB_H_STREAM_FRAME_DELAY ); // How long (in milliseconds) to wait before looking for the next streamed frame
define( "STREAM_FRAME_DELAY", 50 ); // How long (in milliseconds) to wait before looking for the next streamed frame define( "STREAM_EVENT_DELAY", ZM_WEB_H_STREAM_EVENT_DELAY ); // How long (in milliseconds) to wait between each frame when streaming events
define( "STREAM_EVENT_DELAY", 200 ); // How long (in milliseconds) to wait between each frame when streaming events define( "IMAGE_SCALING", ZM_WEB_H_IMAGE_SCALING ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling
define( "IMAGE_SCALING", 1 ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling
break; break;
} }
case "medium" : case "medium" :
{ {
define( "REFRESH_MAIN", 300 ); // How often (in seconds) the main console window refreshes define( "REFRESH_MAIN", ZM_WEB_M_REFRESH_MAIN ); // How often (in seconds) the main console window refreshes
define( "REFRESH_CYCLE", 10 ); // How often the cycle watch windows swaps to the next monitor define( "REFRESH_CYCLE", ZM_WEB_M_REFRESH_CYCLE ); // How often the cycle watch windows swaps to the next monitor
define( "REFRESH_IMAGE", 15 ); // How often the watched image is refreshed (if not streaming) define( "REFRESH_IMAGE", ZM_WEB_M_REFRESH_IMAGE ); // How often the watched image is refreshed (if not streaming)
define( "REFRESH_STATUS", 5 ); // How often the little status frame refreshes itself in the watch window define( "REFRESH_STATUS", ZM_WEB_M_REFRESH_STATUS ); // How often the little status frame refreshes itself in the watch window
define( "REFRESH_EVENTS", 60 ); // How often the event listing is refreshed in the watch window, only for recent events define( "REFRESH_EVENTS", ZM_WEB_M_REFRESH_EVENTS ); // How often the event listing is refreshed in the watch window, only for recent events
define( "REFRESH_EVENTS_ALL", 300 ); // How often the event listing is refreshed when looking at longer listings define( "STREAM_IDLE_DELAY", ZM_WEB_M_STREAM_IDLE_DELAY ); // How long (in milliseconds) between streamed frames in the watch window
define( "STREAM_IDLE_DELAY", 5000 ); // How long (in milliseconds) between streamed frames in the watch window define( "STREAM_FRAME_DELAY", ZM_WEB_M_STREAM_FRAME_DELAY ); // How long (in milliseconds) to wait before looking for the next streamed frame
define( "STREAM_FRAME_DELAY", 100 ); // How long (in milliseconds) to wait before looking for the next streamed frame define( "STREAM_EVENT_DELAY", ZM_WEB_M_STREAM_EVENT_DELAY ); // How long (in milliseconds) to wait between each frame when streaming events
define( "STREAM_EVENT_DELAY", 50 ); // How long (in milliseconds) to wait between each frame when streaming events define( "IMAGE_SCALING", ZM_WEB_M_IMAGE_SCALING ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling
define( "IMAGE_SCALING", 4 ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling
break; break;
} }
case "low" : case "low" :
{ {
define( "REFRESH_MAIN", 300 ); // How often (in seconds) the main console window refreshes define( "REFRESH_MAIN", ZM_WEB_L_REFRESH_MAIN ); // How often (in seconds) the main console window refreshes
define( "REFRESH_CYCLE", 30 ); // How often the cycle watch windows swaps to the next monitor define( "REFRESH_CYCLE", ZM_WEB_L_REFRESH_CYCLE ); // How often the cycle watch windows swaps to the next monitor
define( "REFRESH_IMAGE", 30 ); // How often the watched image is refreshed (if not streaming) define( "REFRESH_IMAGE", ZM_WEB_L_REFRESH_IMAGE ); // How often the watched image is refreshed (if not streaming)
define( "REFRESH_STATUS", 10 ); // How often the little status frame refreshes itself in the watch window define( "REFRESH_STATUS", ZM_WEB_L_REFRESH_STATUS ); // How often the little status frame refreshes itself in the watch window
define( "REFRESH_EVENTS", 180 ); // How often the event listing is refreshed in the watch window, only for recent events define( "REFRESH_EVENTS", ZM_WEB_L_REFRESH_EVENTS ); // How often the event listing is refreshed in the watch window, only for recent events
define( "REFRESH_EVENTS_ALL", 600 ); // How often the event listing is refreshed when looking at longer listings define( "STREAM_IDLE_DELAY", ZM_WEB_L_STREAM_IDLE_DELAY ); // How long (in milliseconds) between streamed frames in the watch window
define( "STREAM_IDLE_DELAY", 10000 ); // How long (in milliseconds) between streamed frames in the watch window define( "STREAM_FRAME_DELAY", ZM_WEB_L_STREAM_FRAME_DELAY ); // How long (in milliseconds) to wait before looking for the next streamed frame
define( "STREAM_FRAME_DELAY", 250 ); // How long (in milliseconds) to wait before looking for the next streamed frame define( "STREAM_EVENT_DELAY", ZM_WEB_L_STREAM_EVENT_DELAY ); // How long (in milliseconds) to wait between each frame when streaming events
define( "STREAM_EVENT_DELAY", 10 ); // How long (in milliseconds) to wait between each frame when streaming events define( "IMAGE_SCALING", ZM_WEB_L_IMAGE_SCALING ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling
define( "IMAGE_SCALING", 4 ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling
break; break;
} }
case "mobile" : // Very incomplete, most of these options don't do anything case "mobile" : // Very incomplete at present
{ {
define( "REFRESH_MAIN", 300 ); // How often (in seconds) the main console window refreshes define( "REFRESH_MAIN", ZM_WEB_P_REFRESH_MAIN ); // How often (in seconds) the main console window refreshes
define( "REFRESH_CYCLE", 30 ); // How often the cycle watch windows swaps to the next monitor define( "REFRESH_IMAGE", ZM_WEB_P_REFRESH_IMAGE ); // How often the watched image is refreshed (if not streaming)
define( "REFRESH_IMAGE", 30 ); // How often the watched image is refreshed (if not streaming)
define( "REFRESH_STATUS", 10 ); // How often the little status frame refreshes itself in the watch window
define( "REFRESH_EVENTS", 180 ); // How often the event listing is refreshed in the watch window, only for recent events
define( "REFRESH_EVENTS_ALL", 600 ); // How often the event listing is refreshed when looking at longer listings
define( "STREAM_IDLE_DELAY", 10000 ); // How long (in milliseconds) between streamed frames in the watch window
define( "STREAM_FRAME_DELAY", 250 ); // How long (in milliseconds) to wait before looking for the next streamed frame
define( "STREAM_EVENT_DELAY", 10 ); // How long (in milliseconds) to wait between each frame when streaming events
define( "IMAGE_SCALING", 4 ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling
break; break;
} }
} }