diff --git a/web/lang/en_gb.php b/web/lang/en_gb.php
index 327045dcc..4f0196bd4 100644
--- a/web/lang/en_gb.php
+++ b/web/lang/en_gb.php
@@ -120,13 +120,14 @@ $SLANG = array(
'Auto' => 'Auto',
'AutoStopTimeout' => 'Auto Stop Timeout',
'AvgBrScore' => 'Avg.
Score',
+ 'Available' => 'Available',
'Background' => 'Background',
'BackgroundFilter' => 'Run filter in background',
'BadAlarmFrameCount' => 'Alarm frame count must be an integer of one or more',
'BadAlarmMaxFPS' => 'Alarm Maximum FPS must be a positive integer or floating point value',
'BadChannel' => 'Channel must be set to an integer of zero or more',
'BadDevice' => 'Device must be set to a valid value',
- 'BadFormat' => 'Format must be set to an integer of zero or more',
+ 'BadFormat' => 'Format must be set to a valid value',
'BadFPSReportInterval' => 'FPS report interval buffer count must be an integer of 100 or more',
'BadFrameSkip' => 'Frame skip count must be an integer of zero or more',
'BadHeight' => 'Height must be set to a valid value',
@@ -136,6 +137,7 @@ $SLANG = array(
'BadLabelY' => 'Label Y co-ordinate must be set to an integer of zero or more',
'BadMaxFPS' => 'Maximum FPS must be a positive integer or floating point value',
'BadNameChars' => 'Names may only contain alphanumeric characters plus hyphen and underscore',
+ 'BadPalette' => 'Palette must be set to a valid value',
'BadPath' => 'Path must be set to a valid value',
'BadPort' => 'Port must be set to a valid number',
'BadPostEventCount' => 'Post event image count must be an integer of zero or more',
@@ -200,6 +202,7 @@ $SLANG = array(
'Cause' => 'Cause',
'Layout' => 'Layout',
'CheckMethod' => 'Alarm Check Method',
+ 'ChooseDetectedCamera' => 'Choose Detected Camera',
'ChooseFilter' => 'Choose Filter',
'ChoosePreset' => 'Choose Preset',
'Close' => 'Close',
@@ -234,6 +237,7 @@ $SLANG = array(
'Delete' => 'Delete',
'DeleteSavedFilter' => 'Delete saved filter',
'Description' => 'Description',
+ 'DetectedCameras' => 'Detected Cameras',
'DeviceChannel' => 'Device Channel',
'DeviceFormat' => 'Device Format',
'DeviceNumber' => 'Device Number',
@@ -253,6 +257,7 @@ $SLANG = array(
'DonateRemindWeek' => 'Not yet, remind again in 1 week',
'DonateYes' => 'Yes, I\'d like to donate now',
'Download' => 'Download',
+ 'DuplicateMonitorName' => 'Duplicate Monitor Name',
'Duration' => 'Duration',
'Edit' => 'Edit',
'Email' => 'Email',
@@ -432,8 +437,10 @@ $SLANG = array(
'Misc' => 'Misc',
'MonitorIds' => 'Monitor Ids',
'Monitor' => 'Monitor',
- 'MonitorPresetIntro' => 'Select an appropriate preset from the list below.
Please note that this may overwrite any values you already have configured for this monitor.
',
+ 'MonitorPresetIntro' => 'Select an appropriate preset from the list below.
Please note that this may overwrite any values you already have configured for the current monitor.
',
'MonitorPreset' => 'Monitor Preset',
+ 'MonitorProbeIntro' => 'The list below shows detected analog and network cameras and whether they are already being used or available for selection.
Select the desired entry from the list below.
Please note that not all cameras may be detected and that choosing a camera here may overwrite any values you already have configured for the current monitor.
',
+ 'MonitorProbe' => 'Monitor Probe',
'Monitors' => 'Monitors',
'Montage' => 'Montage',
'Month' => 'Month',
@@ -453,6 +460,7 @@ $SLANG = array(
'NewState' => 'New State',
'NewUser' => 'New User',
'Next' => 'Next',
+ 'NoDetectedCameras' => 'No Detected Cameras',
'NoFramesRecorded' => 'There are no frames recorded for this event',
'NoGroup' => 'No Group',
'NoneAvailable' => 'None available',
@@ -508,6 +516,7 @@ $SLANG = array(
'Preset' => 'Preset',
'Presets' => 'Presets',
'Prev' => 'Prev',
+ 'Probe' => 'Probe',
'Protocol' => 'Protocol',
'Rate' => 'Rate',
'Real' => 'Real',
diff --git a/web/skins/classic/js/skin.js b/web/skins/classic/js/skin.js
index 60adb3318..4c45a7632 100644
--- a/web/skins/classic/js/skin.js
+++ b/web/skins/classic/js/skin.js
@@ -62,6 +62,7 @@ var popupSizes = {
'logout': { 'width': 240, 'height': 100 },
'monitor': { 'width': 380, 'height': 364 },
'monitorpreset':{ 'width': 400, 'height': 200 },
+ 'monitorprobe': { 'width': 500, 'height': 240 },
'monitorselect':{ 'width': 160, 'height': 200 },
'montage': { 'width': -1, 'height': -1 },
'optionhelp': { 'width': 320, 'height': 330 },
diff --git a/web/skins/classic/views/Makefile.am b/web/skins/classic/views/Makefile.am
index 3e28a3868..c2697941b 100644
--- a/web/skins/classic/views/Makefile.am
+++ b/web/skins/classic/views/Makefile.am
@@ -35,6 +35,7 @@ dist_web_DATA = \
Makefile.am \
monitor.php \
monitorpreset.php \
+ monitorprobe.php \
montage.php \
none.php \
optionhelp.php \
diff --git a/web/skins/classic/views/js/Makefile.am b/web/skins/classic/views/js/Makefile.am
index a5632fa28..97dcc3f09 100644
--- a/web/skins/classic/views/js/Makefile.am
+++ b/web/skins/classic/views/js/Makefile.am
@@ -27,6 +27,7 @@ dist_web_DATA = \
monitor.js \
monitor.js.php \
monitorpreset.js \
+ monitorprobe.js \
montage.js \
montage.js.php \
options.js.php \
diff --git a/web/skins/classic/views/js/monitorprobe.js b/web/skins/classic/views/js/monitorprobe.js
new file mode 100644
index 000000000..264143f5f
--- /dev/null
+++ b/web/skins/classic/views/js/monitorprobe.js
@@ -0,0 +1,14 @@
+function submitCamera( element )
+{
+ var form = element.form;
+ form.target = opener.name;
+ form.view.value = 'monitor';
+ form.submit();
+ closeWindow.delay( 250 );
+}
+
+function configureButtons( element )
+{
+ var form = element.form;
+ form.saveBtn.disabled = (form.probe.selectedIndex==0);
+}
diff --git a/web/skins/classic/views/monitor.php b/web/skins/classic/views/monitor.php
index 02c1d3502..86f99a7f9 100644
--- a/web/skins/classic/views/monitor.php
+++ b/web/skins/classic/views/monitor.php
@@ -113,6 +113,11 @@ if ( ZM_OPT_X10 && empty($x10Monitor) )
);
}
+function fourcc( $a, $b, $c, $d )
+{
+ return( ord($a) | (ord($b) << 8) | (ord($c) << 16) | (ord($d) << 24) );
+}
+
if ( isset( $_REQUEST['newMonitor'] ) )
{
$newMonitor = $_REQUEST['newMonitor'];
@@ -143,6 +148,27 @@ if ( !empty($_REQUEST['preset']) )
}
}
}
+if ( !empty($_REQUEST['probe']) )
+{
+ $probe = unserialize( $_REQUEST['probe'] );
+ foreach ( $probe as $name=>$value )
+ {
+ if ( isset($value) )
+ {
+ $newMonitor[$name] = $value;
+ }
+ }
+ if ( $newMonitor['Type'] == 'Local' )
+ {
+ $newMonitor['Palette'] = fourCC( substr($newMonitor['Palette'],0,1), substr($newMonitor['Palette'],1,1), substr($newMonitor['Palette'],2,1), substr($newMonitor['Palette'],3,1) );
+ if ( $newMonitor['Format'] == 'PAL' )
+ $newMonitor['Format'] = 0x000000ff;
+ elseif ( $newMonitor['Format'] == 'NTSC' )
+ $newMonitor['Format'] = 0x0000b000;
+ else
+ $newMonitor['Format'] = '';
+ }
+}
$sourceTypes = array(
'Local' => $SLANG['Local'],
@@ -248,11 +274,6 @@ if ( ZM_V4L2 )
for ( $i = 0; $i <= $v4l2MaxChannels; $i++ )
$v4l2DeviceChannels["$i"] = $i;
- function fourcc( $a, $b, $c, $d )
- {
- return( ord($a) | (ord($b) << 8) | (ord($c) << 16) | (ord($d) << 24) );
- }
-
$v4l2LocalPalettes = array(
$SLANG['Undefined'] => '',
@@ -344,6 +365,7 @@ if ( canEdit( 'Monitors' ) )
{
?>