Merge branch 'release-1.34'
This commit is contained in:
commit
3c2e26ac32
|
@ -46,8 +46,10 @@ function probeV4L() {
|
||||||
$preferredStandards = array('PAL', 'NTSC');
|
$preferredStandards = array('PAL', 'NTSC');
|
||||||
$preferredFormats = array('BGR3', 'RGB3', 'YUYV', 'UYVY', 'JPEG', 'MJPG', '422P', 'YU12', 'GREY');
|
$preferredFormats = array('BGR3', 'RGB3', 'YUYV', 'UYVY', 'JPEG', 'MJPG', '422P', 'YU12', 'GREY');
|
||||||
foreach ( $output as $line ) {
|
foreach ( $output as $line ) {
|
||||||
if ( !preg_match('/^d:([^|]+).*S:([^|]*).*F:([^|]+).*I:(\d+)\|(.+)$/', $line, $deviceMatches) )
|
if ( !preg_match('/^d:([^|]+).*S:([^|]*).*F:([^|]+).*I:(\d+)\|(.+)$/', $line, $deviceMatches) ) {
|
||||||
ZM\Fatal("Can't parse command output '$line'");
|
ZM\Error("Can't parse command output '$line'");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$standards = explode('/', $deviceMatches[2]);
|
$standards = explode('/', $deviceMatches[2]);
|
||||||
$preferredStandard = false;
|
$preferredStandard = false;
|
||||||
foreach ( $preferredStandards as $standard ) {
|
foreach ( $preferredStandards as $standard ) {
|
||||||
|
@ -73,8 +75,10 @@ function probeV4L() {
|
||||||
);
|
);
|
||||||
$inputs = array();
|
$inputs = array();
|
||||||
for ( $i = 0; $i < $deviceMatches[4]; $i++ ) {
|
for ( $i = 0; $i < $deviceMatches[4]; $i++ ) {
|
||||||
if ( !preg_match('/i'.$i.':([^|]+)\|i'.$i.'T:([^|]+)\|/', $deviceMatches[5], $inputMatches) )
|
if ( !preg_match('/i'.$i.':([^|]+)\|i'.$i.'T:([^|]+)\|/', $deviceMatches[5], $inputMatches) ) {
|
||||||
ZM\Fatal("Can't parse input '".$deviceMatches[5]."'");
|
ZM\Error("Can't parse input '".$deviceMatches[5]."'");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if ( $inputMatches[2] == 'Camera' ) {
|
if ( $inputMatches[2] == 'Camera' ) {
|
||||||
$input = array(
|
$input = array(
|
||||||
'index' => $i,
|
'index' => $i,
|
||||||
|
@ -101,7 +105,7 @@ function probeV4L() {
|
||||||
$inputMonitor['Colours'] = 1;
|
$inputMonitor['Colours'] = 1;
|
||||||
$inputMonitor['SignalCheckColour'] = '#000023';
|
$inputMonitor['SignalCheckColour'] = '#000023';
|
||||||
}
|
}
|
||||||
$inputDesc = base64_encode(serialize($inputMonitor));
|
$inputDesc = base64_encode(json_encode($inputMonitor));
|
||||||
$inputString = $deviceMatches[1].', chan '.$i.($input['free']?(' - '.translate('Available')):(' ('.$monitors[$input['id']]['Name'].')'));
|
$inputString = $deviceMatches[1].', chan '.$i.($input['free']?(' - '.translate('Available')):(' ('.$monitors[$input['id']]['Name'].')'));
|
||||||
$inputs[] = $input;
|
$inputs[] = $input;
|
||||||
$cameras[$inputDesc] = $inputString;
|
$cameras[$inputDesc] = $inputString;
|
||||||
|
@ -288,7 +292,7 @@ function probeNetwork() {
|
||||||
if ( isset($macBases[$macRoot]) ) {
|
if ( isset($macBases[$macRoot]) ) {
|
||||||
$macBase = $macBases[$macRoot];
|
$macBase = $macBases[$macRoot];
|
||||||
$camera = call_user_func($macBase['probeFunc'], $ip);
|
$camera = call_user_func($macBase['probeFunc'], $ip);
|
||||||
$sourceDesc = base64_encode(serialize($camera['monitor']));
|
$sourceDesc = base64_encode(json_encode($camera['monitor']));
|
||||||
$sourceString = $camera['model'].' @ '.$host;
|
$sourceString = $camera['model'].' @ '.$host;
|
||||||
if ( isset($monitors[$ip]) ) {
|
if ( isset($monitors[$ip]) ) {
|
||||||
$monitor = $monitors[$ip];
|
$monitor = $monitors[$ip];
|
||||||
|
@ -330,7 +334,7 @@ xhtmlHeaders(__FILE__, translate('MonitorProbe') );
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<label for="probe"><?php echo translate('DetectedCameras') ?></label>
|
<label for="probe"><?php echo translate('DetectedCameras') ?></label>
|
||||||
<?php echo buildSelect('probe', $cameras, 'configureButtons(this)'); ?>
|
<?php echo htmlSelect('probe', $cameras, null, array('data-on-change-this'=>'configureButtons(this)')); ?>
|
||||||
</p>
|
</p>
|
||||||
<div id="contentButtons">
|
<div id="contentButtons">
|
||||||
<button type="button" name="saveBtn" value="Save" data-on-click-this="submitCamera" disabled="disabled">
|
<button type="button" name="saveBtn" value="Save" data-on-click-this="submitCamera" disabled="disabled">
|
||||||
|
|
Loading…
Reference in New Issue