Merge branch 'storageareas' of github.com:ConnorTechnology/ZoneMinder into storageareas
commit
42d383da6b
|
@ -320,7 +320,7 @@ DROP TABLE IF EXISTS `MonitorPresets`;
|
||||||
CREATE TABLE `MonitorPresets` (
|
CREATE TABLE `MonitorPresets` (
|
||||||
`Id` int(10) unsigned NOT NULL auto_increment,
|
`Id` int(10) unsigned NOT NULL auto_increment,
|
||||||
`Name` varchar(64) NOT NULL default '',
|
`Name` varchar(64) NOT NULL default '',
|
||||||
`Type` enum('Local','Remote','File','Ffmpeg','Libvlc','cURL') NOT NULL default 'Local',
|
`Type` enum('Local','Remote','File','Ffmpeg','Libvlc','cURL','NVSocket') NOT NULL default 'Local',
|
||||||
`Device` tinytext,
|
`Device` tinytext,
|
||||||
`Channel` tinytext,
|
`Channel` tinytext,
|
||||||
`Format` int(10) unsigned default NULL,
|
`Format` int(10) unsigned default NULL,
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
ALTER TABLE Monitors MODIFY `Type` enum('Local','Remote','File','Ffmpeg','Libvlc','cURL','NVSocket') NOT NULL default 'Local';
|
|
@ -0,0 +1,7 @@
|
||||||
|
zoneminder (1.31.4-vivid1) vivid; urgency=medium
|
||||||
|
|
||||||
|
* Release 1.31.4
|
||||||
|
|
||||||
|
-- Isaac Connor <iconnor@tesla.com> Thu, 21 Sep 2017 09:55:31 -0700
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
configure_file(zm_config.h.in "${CMAKE_CURRENT_BINARY_DIR}/zm_config.h" @ONLY)
|
configure_file(zm_config.h.in "${CMAKE_CURRENT_BINARY_DIR}/zm_config.h" @ONLY)
|
||||||
|
|
||||||
# Group together all the source files that are used by all the binaries (zmc, zma, zmu, zms etc)
|
# Group together all the source files that are used by all the binaries (zmc, zma, zmu, zms etc)
|
||||||
set(ZM_BIN_SRC_FILES zm_box.cpp zm_buffer.cpp zm_camera.cpp zm_comms.cpp zm_config.cpp zm_coord.cpp zm_curl_camera.cpp zm.cpp zm_db.cpp zm_logger.cpp zm_event.cpp zm_eventstream.cpp zm_exception.cpp zm_file_camera.cpp zm_ffmpeg_input.cpp zm_ffmpeg_camera.cpp zm_image.cpp zm_jpeg.cpp zm_libvlc_camera.cpp zm_local_camera.cpp zm_monitor.cpp zm_monitorstream.cpp zm_ffmpeg.cpp zm_mpeg.cpp zm_packet.cpp zm_packetqueue.cpp zm_poly.cpp zm_regexp.cpp zm_remote_camera.cpp zm_remote_camera_http.cpp zm_remote_camera_rtsp.cpp zm_remote_camera_nvsocket.cpp zm_rtp.cpp zm_rtp_ctrl.cpp zm_rtp_data.cpp zm_rtp_source.cpp zm_rtsp.cpp zm_rtsp_auth.cpp zm_sdp.cpp zm_signal.cpp zm_stream.cpp zm_swscale.cpp zm_thread.cpp zm_time.cpp zm_timer.cpp zm_user.cpp zm_utils.cpp zm_video.cpp zm_videostore.cpp zm_zone.cpp zm_storage.cpp)
|
set(ZM_BIN_SRC_FILES zm_box.cpp zm_buffer.cpp zm_camera.cpp zm_comms.cpp zm_config.cpp zm_coord.cpp zm_curl_camera.cpp zm.cpp zm_db.cpp zm_logger.cpp zm_event.cpp zm_eventstream.cpp zm_exception.cpp zm_file_camera.cpp zm_ffmpeg_input.cpp zm_ffmpeg_camera.cpp zm_image.cpp zm_jpeg.cpp zm_libvlc_camera.cpp zm_local_camera.cpp zm_monitor.cpp zm_monitorstream.cpp zm_ffmpeg.cpp zm_mpeg.cpp zm_packet.cpp zm_packetqueue.cpp zm_poly.cpp zm_regexp.cpp zm_remote_camera.cpp zm_remote_camera_http.cpp zm_remote_camera_nvsocket.cpp zm_remote_camera_rtsp.cpp zm_rtp.cpp zm_rtp_ctrl.cpp zm_rtp_data.cpp zm_rtp_source.cpp zm_rtsp.cpp zm_rtsp_auth.cpp zm_sdp.cpp zm_signal.cpp zm_stream.cpp zm_swscale.cpp zm_thread.cpp zm_time.cpp zm_timer.cpp zm_user.cpp zm_utils.cpp zm_video.cpp zm_videostore.cpp zm_zone.cpp zm_storage.cpp)
|
||||||
|
|
||||||
# A fix for cmake recompiling the source files for every target.
|
# A fix for cmake recompiling the source files for every target.
|
||||||
add_library(zm STATIC ${ZM_BIN_SRC_FILES})
|
add_library(zm STATIC ${ZM_BIN_SRC_FILES})
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
#endif // ZM_HAS_V4L
|
#endif // ZM_HAS_V4L
|
||||||
#include "zm_remote_camera.h"
|
#include "zm_remote_camera.h"
|
||||||
#include "zm_remote_camera_http.h"
|
#include "zm_remote_camera_http.h"
|
||||||
|
#include "zm_remote_camera_nvsocket.h"
|
||||||
#if HAVE_LIBAVFORMAT
|
#if HAVE_LIBAVFORMAT
|
||||||
#include "zm_remote_camera_rtsp.h"
|
#include "zm_remote_camera_rtsp.h"
|
||||||
#endif // HAVE_LIBAVFORMAT
|
#endif // HAVE_LIBAVFORMAT
|
||||||
|
@ -2653,6 +2654,22 @@ Monitor *Monitor::Load( unsigned int p_id, bool load_zones, Purpose purpose ) {
|
||||||
#else // ZM_HAS_V4L
|
#else // ZM_HAS_V4L
|
||||||
Fatal( "You must have video4linux libraries and headers installed to use local analog or USB cameras for monitor %d", id );
|
Fatal( "You must have video4linux libraries and headers installed to use local analog or USB cameras for monitor %d", id );
|
||||||
#endif // ZM_HAS_V4L
|
#endif // ZM_HAS_V4L
|
||||||
|
} else if ( type == "NVSocket" ) {
|
||||||
|
camera = new RemoteCameraNVSocket(
|
||||||
|
id,
|
||||||
|
host.c_str(),
|
||||||
|
port.c_str(),
|
||||||
|
path.c_str(),
|
||||||
|
width,
|
||||||
|
height,
|
||||||
|
colours,
|
||||||
|
brightness,
|
||||||
|
contrast,
|
||||||
|
hue,
|
||||||
|
colour,
|
||||||
|
purpose==CAPTURE,
|
||||||
|
record_audio
|
||||||
|
);
|
||||||
} else if ( type == "Remote" ) {
|
} else if ( type == "Remote" ) {
|
||||||
if ( protocol == "http" ) {
|
if ( protocol == "http" ) {
|
||||||
camera = new RemoteCameraHttp(
|
camera = new RemoteCameraHttp(
|
||||||
|
|
|
@ -97,35 +97,40 @@ void RemoteCameraNVSocket::Initialise() {
|
||||||
}
|
}
|
||||||
|
|
||||||
int RemoteCameraNVSocket::Connect() {
|
int RemoteCameraNVSocket::Connect() {
|
||||||
struct addrinfo *p;
|
//struct addrinfo *p;
|
||||||
|
struct sockaddr_in servaddr;
|
||||||
|
bzero( &servaddr, sizeof(servaddr));
|
||||||
|
servaddr.sin_family = AF_INET;
|
||||||
|
servaddr.sin_addr.s_addr = htons(INADDR_ANY);
|
||||||
|
servaddr.sin_port = htons(atoi(port.c_str()));
|
||||||
|
|
||||||
for(p = hp; p != NULL; p = p->ai_next) {
|
|
||||||
sd = socket( p->ai_family, p->ai_socktype, p->ai_protocol );
|
sd = socket(AF_INET, SOCK_STREAM, 0);
|
||||||
|
//for(p = hp; p != NULL; p = p->ai_next) {
|
||||||
|
//sd = socket( p->ai_family, p->ai_socktype, p->ai_protocol );
|
||||||
if ( sd < 0 ) {
|
if ( sd < 0 ) {
|
||||||
Warning("Can't create socket: %s", strerror(errno) );
|
Warning("Can't create socket: %s", strerror(errno) );
|
||||||
continue;
|
//continue;
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( connect( sd, p->ai_addr, p->ai_addrlen ) < 0 ) {
|
//if ( connect( sd, p->ai_addr, p->ai_addrlen ) < 0 ) {
|
||||||
|
if ( connect( sd, (struct sockaddr *)&servaddr , sizeof(servaddr) ) < 0 ) {
|
||||||
close(sd);
|
close(sd);
|
||||||
sd = -1;
|
sd = -1;
|
||||||
char buf[sizeof(struct in6_addr)];
|
|
||||||
struct sockaddr_in *addr;
|
|
||||||
addr = (struct sockaddr_in *)p->ai_addr;
|
|
||||||
inet_ntop( AF_INET, &(addr->sin_addr), buf, INET6_ADDRSTRLEN );
|
|
||||||
|
|
||||||
Warning("Can't connect to remote camera mid: %d at %s: %s", monitor_id, buf, strerror(errno) );
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
Warning("Can't connect to socket mid: %d : %s", monitor_id, strerror(errno) );
|
||||||
|
return -1;
|
||||||
|
//continue;
|
||||||
|
//}
|
||||||
/* If we got here, we must have connected successfully */
|
/* If we got here, we must have connected successfully */
|
||||||
break;
|
//break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( p == NULL ) {
|
//if ( p == NULL ) {
|
||||||
Error("Unable to connect to the remote camera, aborting");
|
//Error("Unable to connect to the remote camera, aborting");
|
||||||
return( -1 );
|
//return( -1 );
|
||||||
}
|
//}
|
||||||
|
|
||||||
Debug( 3, "Connected to host, socket = %d", sd );
|
Debug( 3, "Connected to host, socket = %d", sd );
|
||||||
return( sd );
|
return( sd );
|
||||||
|
@ -284,56 +289,16 @@ struct image_def image_def;
|
||||||
}
|
}
|
||||||
|
|
||||||
int RemoteCameraNVSocket::Capture( Image &image ) {
|
int RemoteCameraNVSocket::Capture( Image &image ) {
|
||||||
int content_length = GetResponse();
|
if ( SendRequest("GetNextImage") < 0 ) {
|
||||||
if ( content_length == 0 ) {
|
|
||||||
Warning( "Unable to capture image, retrying" );
|
Warning( "Unable to capture image, retrying" );
|
||||||
return( 1 );
|
return( 1 );
|
||||||
}
|
}
|
||||||
if ( content_length < 0 ) {
|
if ( Read( sd, buffer, imagesize ) < imagesize ) {
|
||||||
Error( "Unable to get response, disconnecting" );
|
Warning( "Unable to capture image, retrying" );
|
||||||
Disconnect();
|
return( 1 );
|
||||||
return( -1 );
|
|
||||||
}
|
|
||||||
switch( format ) {
|
|
||||||
case JPEG :
|
|
||||||
{
|
|
||||||
if ( !image.DecodeJpeg( buffer.extract( content_length ), content_length, colours, subpixelorder ) )
|
|
||||||
{
|
|
||||||
Error( "Unable to decode jpeg" );
|
|
||||||
Disconnect();
|
|
||||||
return( -1 );
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case X_RGB :
|
|
||||||
{
|
|
||||||
if ( content_length != (long)image.Size() )
|
|
||||||
{
|
|
||||||
Error( "Image length mismatch, expected %d bytes, content length was %d", image.Size(), content_length );
|
|
||||||
Disconnect();
|
|
||||||
return( -1 );
|
|
||||||
}
|
|
||||||
image.Assign( width, height, colours, subpixelorder, buffer, imagesize );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case X_RGBZ :
|
|
||||||
{
|
|
||||||
if ( !image.Unzip( buffer.extract( content_length ), content_length ) )
|
|
||||||
{
|
|
||||||
Error( "Unable to unzip RGB image" );
|
|
||||||
Disconnect();
|
|
||||||
return( -1 );
|
|
||||||
}
|
|
||||||
image.Assign( width, height, colours, subpixelorder, buffer, imagesize );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default :
|
|
||||||
{
|
|
||||||
Error( "Unexpected image format encountered" );
|
|
||||||
Disconnect();
|
|
||||||
return( -1 );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
image.Assign( width, height, colours, subpixelorder, buffer, imagesize );
|
||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,20 @@ protected:
|
||||||
enum { SIMPLE, REGEXP } method;
|
enum { SIMPLE, REGEXP } method;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RemoteCameraNVSocket( unsigned int p_monitor_id, const std::string &host, const std::string &port, const std::string &path, int p_width, int p_height, int p_colours, int p_brightness, int p_contrast, int p_hue, int p_colour, bool p_capture, bool p_record_audio );
|
RemoteCameraNVSocket(
|
||||||
|
unsigned int p_monitor_id,
|
||||||
|
const std::string &host,
|
||||||
|
const std::string &port,
|
||||||
|
const std::string &path,
|
||||||
|
int p_width,
|
||||||
|
int p_height,
|
||||||
|
int p_colours,
|
||||||
|
int p_brightness,
|
||||||
|
int p_contrast,
|
||||||
|
int p_hue,
|
||||||
|
int p_colour,
|
||||||
|
bool p_capture,
|
||||||
|
bool p_record_audio );
|
||||||
~RemoteCameraNVSocket();
|
~RemoteCameraNVSocket();
|
||||||
|
|
||||||
void Initialise();
|
void Initialise();
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
# Define the line ending behavior of the different file extensions
|
|
||||||
# Set default behaviour, in case users don't have core.autocrlf set.
|
|
||||||
* text=auto
|
|
||||||
|
|
||||||
# Explicitly declare text files we want to always be normalized and converted
|
|
||||||
# to native line endings on checkout.
|
|
||||||
*.php text
|
|
||||||
*.default text
|
|
||||||
*.ctp text
|
|
||||||
*.sql text
|
|
||||||
*.md text
|
|
||||||
*.po text
|
|
||||||
*.js text
|
|
||||||
*.css text
|
|
||||||
*.ini text
|
|
||||||
*.properties text
|
|
||||||
*.txt text
|
|
||||||
*.xml text
|
|
||||||
*.yml text
|
|
||||||
.htaccess text
|
|
||||||
|
|
||||||
# Declare files that will always have CRLF line endings on checkout.
|
|
||||||
*.bat eol=crlf
|
|
||||||
|
|
||||||
# Declare files that will always have LF line endings on checkout.
|
|
||||||
*.pem eol=lf
|
|
||||||
|
|
||||||
# Denote all files that are truly binary and should not be modified.
|
|
||||||
*.png binary
|
|
||||||
*.jpg binary
|
|
||||||
*.gif binary
|
|
||||||
*.ico binary
|
|
||||||
*.mo binary
|
|
|
@ -1,21 +0,0 @@
|
||||||
# User specific & automatically generated files #
|
|
||||||
#################################################
|
|
||||||
/app/Config/database.php
|
|
||||||
/app/tmp
|
|
||||||
/lib/Cake/Console/Templates/skel/tmp/
|
|
||||||
/plugins
|
|
||||||
/vendors
|
|
||||||
/build
|
|
||||||
/dist
|
|
||||||
/tags
|
|
||||||
|
|
||||||
# OS generated files #
|
|
||||||
######################
|
|
||||||
.DS_Store
|
|
||||||
.DS_Store?
|
|
||||||
._*
|
|
||||||
.Spotlight-V100
|
|
||||||
.Trashes
|
|
||||||
Icon?
|
|
||||||
ehthumbs.db
|
|
||||||
Thumbs.db
|
|
|
@ -595,13 +595,13 @@ $SLANG = array(
|
||||||
'Record' => 'Record',
|
'Record' => 'Record',
|
||||||
'RefImageBlendPct' => 'Reference Image Blend %ge',
|
'RefImageBlendPct' => 'Reference Image Blend %ge',
|
||||||
'Refresh' => 'Refresh',
|
'Refresh' => 'Refresh',
|
||||||
'RemoteHostName' => 'Remote Host Name',
|
'RemoteHostName' => 'Host Name',
|
||||||
'RemoteHostPath' => 'Remote Host Path',
|
'RemoteHostPath' => 'Path',
|
||||||
'RemoteHostSubPath' => 'Remote Host SubPath',
|
'RemoteHostSubPath' => 'SubPath',
|
||||||
'RemoteHostPort' => 'Remote Host Port',
|
'RemoteHostPort' => 'Port',
|
||||||
'RemoteImageColours' => 'Remote Image Colours',
|
'RemoteImageColours' => 'Image Colours',
|
||||||
'RemoteMethod' => 'Remote Method',
|
'RemoteMethod' => 'Method',
|
||||||
'RemoteProtocol' => 'Remote Protocol',
|
'RemoteProtocol' => 'Protocol',
|
||||||
'Remote' => 'Remote',
|
'Remote' => 'Remote',
|
||||||
'Rename' => 'Rename',
|
'Rename' => 'Rename',
|
||||||
'ReplayAll' => 'All Events',
|
'ReplayAll' => 'All Events',
|
||||||
|
|
|
@ -51,11 +51,13 @@ if ( ! $Server ) {
|
||||||
$Server = array( 'Id' => '' );
|
$Server = array( 'Id' => '' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$monitor = null;
|
||||||
if ( ! empty($_REQUEST['mid']) ) {
|
if ( ! empty($_REQUEST['mid']) ) {
|
||||||
$monitor = new Monitor( $_REQUEST['mid'] );
|
$monitor = new Monitor( $_REQUEST['mid'] );
|
||||||
if ( ZM_OPT_X10 )
|
if ( $monitor and ZM_OPT_X10 )
|
||||||
$x10Monitor = dbFetchOne( 'SELECT * FROM TriggersX10 WHERE MonitorId = ?', NULL, array($_REQUEST['mid']) );
|
$x10Monitor = dbFetchOne( 'SELECT * FROM TriggersX10 WHERE MonitorId = ?', NULL, array($_REQUEST['mid']) );
|
||||||
} else {
|
}
|
||||||
|
if ( ! $monitor ) {
|
||||||
|
|
||||||
$nextId = getTableAutoInc( 'Monitors' );
|
$nextId = getTableAutoInc( 'Monitors' );
|
||||||
if ( isset( $_REQUEST['dupId'] ) ) {
|
if ( isset( $_REQUEST['dupId'] ) ) {
|
||||||
|
@ -207,7 +209,8 @@ $sourceTypes = array(
|
||||||
'File' => translate('File'),
|
'File' => translate('File'),
|
||||||
'Ffmpeg' => translate('Ffmpeg'),
|
'Ffmpeg' => translate('Ffmpeg'),
|
||||||
'Libvlc' => translate('Libvlc'),
|
'Libvlc' => translate('Libvlc'),
|
||||||
'cURL' => 'cURL (HTTP(S) only)'
|
'cURL' => 'cURL (HTTP(S) only)',
|
||||||
|
'NVSocket' => translate('NVSocket')
|
||||||
);
|
);
|
||||||
if ( !ZM_HAS_V4L )
|
if ( !ZM_HAS_V4L )
|
||||||
unset($sourceTypes['Local']);
|
unset($sourceTypes['Local']);
|
||||||
|
@ -395,12 +398,12 @@ $Colours = array(
|
||||||
);
|
);
|
||||||
|
|
||||||
$orientations = array(
|
$orientations = array(
|
||||||
translate('Normal') => '0',
|
'0' => translate('Normal'),
|
||||||
translate('RotateRight') => '90',
|
'90' => translate('RotateRight'),
|
||||||
translate('Inverted') => '180',
|
'180' => translate('Inverted'),
|
||||||
translate('RotateLeft') => '270',
|
'270' => translate('RotateLeft'),
|
||||||
translate('FlippedHori') => 'hori',
|
'horz' => translate('FlippedHori'),
|
||||||
translate('FlippedVert') => 'vert'
|
'vert' => translate('FlippedVert')
|
||||||
);
|
);
|
||||||
|
|
||||||
$deinterlaceopts = array(
|
$deinterlaceopts = array(
|
||||||
|
@ -598,7 +601,7 @@ if ( $tab != 'storage' ) {
|
||||||
<input type="hidden" name="newMonitor[RecordAudio]" value="<?php echo validHtmlStr($monitor->RecordAudio()) ?>"/>
|
<input type="hidden" name="newMonitor[RecordAudio]" value="<?php echo validHtmlStr($monitor->RecordAudio()) ?>"/>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
if ( $tab != 'source' || ($monitor->Type()!= 'Remote' && $monitor->Protocol()!= 'rtsp') ) {
|
if ( $tab != 'source' || ($monitor->Type() != 'Remote' && $monitor->Protocol()!= 'rtsp') ) {
|
||||||
?>
|
?>
|
||||||
<input type="hidden" name="newMonitor[RTSPDescribe]" value="<?php echo validHtmlStr($monitor->RTSPDescribe()) ?>"/>
|
<input type="hidden" name="newMonitor[RTSPDescribe]" value="<?php echo validHtmlStr($monitor->RTSPDescribe()) ?>"/>
|
||||||
<?php
|
<?php
|
||||||
|
@ -726,7 +729,7 @@ switch ( $tab ) {
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td><?php echo translate('AnalysisFPS') ?></td><td><input type="text" name="newMonitor[AnalysisFPS]" value="<?php echo validHtmlStr($monitor->AnalysisFPS()) ?>" size="6"/></td></tr>
|
<tr><td><?php echo translate('AnalysisFPS') ?></td><td><input type="text" name="newMonitor[AnalysisFPS]" value="<?php echo validHtmlStr($monitor->AnalysisFPS()) ?>" size="6"/></td></tr>
|
||||||
<?php
|
<?php
|
||||||
if ( $monitor->Type() != 'Local' && $monitor->Type() != 'File' ) {
|
if ( $monitor->Type() != 'Local' && $monitor->Type() != 'File' && $monitor->Type() != 'NVSocket' ) {
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo translate('MaximumFPS') ?> (<?php echo makePopupLink('?view=optionhelp&option=OPTIONS_MAXFPS', 'zmOptionHelp', 'optionhelp', '?' ) ?>)</td>
|
<td><?php echo translate('MaximumFPS') ?> (<?php echo makePopupLink('?view=optionhelp&option=OPTIONS_MAXFPS', 'zmOptionHelp', 'optionhelp', '?' ) ?>)</td>
|
||||||
|
@ -822,7 +825,10 @@ switch ( $tab ) {
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<tr><td><?php echo translate('V4LCapturesPerFrame') ?></td><td><input type="number" name="newMonitor[V4LCapturesPerFrame]" value="<?php echo $monitor->V4LCapturesPerFrame()?>"/></td></tr>
|
<tr><td><?php echo translate('V4LCapturesPerFrame') ?></td><td><input type="number" name="newMonitor[V4LCapturesPerFrame]" value="<?php echo $monitor->V4LCapturesPerFrame()?>"/></td></tr>
|
||||||
<?php
|
<?php
|
||||||
} elseif ( $monitor->Type() == 'Remote' ) {
|
|
||||||
|
} else if ( $monitor->Type() == 'NVSocket' ) {
|
||||||
|
include('monitor_source_nvsocket.php');
|
||||||
|
} else if ( $monitor->Type() == 'Remote' ) {
|
||||||
?>
|
?>
|
||||||
<tr><td><?php echo translate('RemoteProtocol') ?></td><td><?php echo htmlSelect( "newMonitor[Protocol]", $remoteProtocols, $monitor->Protocol(), "updateMethods( this );if(this.value=='rtsp'){\$('RTSPDescribe').setStyle('display','table-row');}else{\$('RTSPDescribe').hide();}" ); ?></td></tr>
|
<tr><td><?php echo translate('RemoteProtocol') ?></td><td><?php echo htmlSelect( "newMonitor[Protocol]", $remoteProtocols, $monitor->Protocol(), "updateMethods( this );if(this.value=='rtsp'){\$('RTSPDescribe').setStyle('display','table-row');}else{\$('RTSPDescribe').hide();}" ); ?></td></tr>
|
||||||
<?php
|
<?php
|
||||||
|
@ -837,7 +843,7 @@ switch ( $tab ) {
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<tr><td><?php echo translate('RemoteHostName') ?></td><td><input type="text" name="newMonitor[Host]" value="<?php echo validHtmlStr($monitor->Host()) ?>" size="36"/></td></tr>
|
<tr><td><?php echo translate('RemoteHostName') ?></td><td><input type="text" name="newMonitor[Host]" value="<?php echo validHtmlStr($monitor->Host()) ?>" size="36"/></td></tr>
|
||||||
<tr><td><?php echo translate('RemoteHostPort') ?></td><td><input type="text" name="newMonitor[Port]" value="<?php echo validHtmlStr($monitor->Port()) ?>" size="6"/></td></tr>
|
<tr><td><?php echo translate('RemoteHostPort') ?></td><td><input type="number" name="newMonitor[Port]" value="<?php echo validHtmlStr($monitor->Port()) ?>" size="6"/></td></tr>
|
||||||
<tr><td><?php echo translate('RemoteHostPath') ?></td><td><input type="text" name="newMonitor[Path]" value="<?php echo validHtmlStr($monitor->Path()) ?>" size="36"/></td></tr>
|
<tr><td><?php echo translate('RemoteHostPath') ?></td><td><input type="text" name="newMonitor[Path]" value="<?php echo validHtmlStr($monitor->Path()) ?>" size="36"/></td></tr>
|
||||||
<?php
|
<?php
|
||||||
} else if ( $monitor->Type() == 'File' ) {
|
} else if ( $monitor->Type() == 'File' ) {
|
||||||
|
@ -857,14 +863,16 @@ switch ( $tab ) {
|
||||||
<tr><td><?php echo translate('Options') ?> (<?php echo makePopupLink( '?view=optionhelp&option=OPTIONS_'.strtoupper($monitor->Type()), 'zmOptionHelp', 'optionhelp', '?' ) ?>)</td><td><input type="text" name="newMonitor[Options]" value="<?php echo validHtmlStr($monitor->Options()) ?>" size="36"/></td></tr>
|
<tr><td><?php echo translate('Options') ?> (<?php echo makePopupLink( '?view=optionhelp&option=OPTIONS_'.strtoupper($monitor->Type()), 'zmOptionHelp', 'optionhelp', '?' ) ?>)</td><td><input type="text" name="newMonitor[Options]" value="<?php echo validHtmlStr($monitor->Options()) ?>" size="36"/></td></tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
if ( $monitor->Type() != 'NVSocket' ) {
|
||||||
?>
|
?>
|
||||||
<tr><td><?php echo translate('TargetColorspace') ?></td><td><select name="newMonitor[Colours]"><?php foreach ( $Colours as $name => $value ) { ?><option value="<?php echo $value ?>"<?php if ( $value == $monitor->Colours()) { ?> selected="selected"<?php } ?>><?php echo $name ?></option><?php } ?></select></td></tr>
|
<tr><td><?php echo translate('TargetColorspace') ?></td><td><select name="newMonitor[Colours]"><?php foreach ( $Colours as $name => $value ) { ?><option value="<?php echo $value ?>"<?php if ( $value == $monitor->Colours()) { ?> selected="selected"<?php } ?>><?php echo $name ?></option><?php } ?></select></td></tr>
|
||||||
<tr><td><?php echo translate('CaptureWidth') ?> (<?php echo translate('Pixels') ?>)</td><td><input type="text" name="newMonitor[Width]" value="<?php echo validHtmlStr($monitor->Width()) ?>" size="4" onkeyup="updateMonitorDimensions(this);"/></td></tr>
|
<tr><td><?php echo translate('CaptureWidth') ?> (<?php echo translate('Pixels') ?>)</td><td><input type="text" name="newMonitor[Width]" value="<?php echo validHtmlStr($monitor->Width()) ?>" size="4" onkeyup="updateMonitorDimensions(this);"/></td></tr>
|
||||||
<tr><td><?php echo translate('CaptureHeight') ?> (<?php echo translate('Pixels') ?>)</td><td><input type="text" name="newMonitor[Height]" value="<?php echo validHtmlStr($monitor->Height()) ?>" size="4" onkeyup="updateMonitorDimensions(this);"/></td></tr>
|
<tr><td><?php echo translate('CaptureHeight') ?> (<?php echo translate('Pixels') ?>)</td><td><input type="text" name="newMonitor[Height]" value="<?php echo validHtmlStr($monitor->Height()) ?>" size="4" onkeyup="updateMonitorDimensions(this);"/></td></tr>
|
||||||
<tr><td><?php echo translate('PreserveAspect') ?></td><td><input type="checkbox" name="preserveAspectRatio" value="1"/></td></tr>
|
<tr><td><?php echo translate('PreserveAspect') ?></td><td><input type="checkbox" name="preserveAspectRatio" value="1"/></td></tr>
|
||||||
<tr><td><?php echo translate('Orientation') ?></td><td><select name="newMonitor[Orientation]"><?php foreach ( $orientations as $name => $value ) { ?><option value="<?php echo $value ?>"<?php if ( $value == $monitor->Orientation()) { ?> selected="selected"<?php } ?>><?php echo $name ?></option><?php } ?></select></td></tr>
|
<tr><td><?php echo translate('Orientation') ?></td><td><?php echo htmlselect( 'newMonitor[Orientation]', $orientations, $monitor->Orientation() );?></td></tr>
|
||||||
<?php
|
<?php
|
||||||
if ( $monitor->Type() == 'Local' ) {
|
}
|
||||||
|
if ( $monitor->Type() == 'Local' ) {
|
||||||
?>
|
?>
|
||||||
<tr><td><?php echo translate('Deinterlacing') ?></td><td><select name="newMonitor[Deinterlacing]"><?php foreach ( $deinterlaceopts_v4l2 as $name => $value ) { ?><option value="<?php echo $value ?>"<?php if ( $value == $monitor->Deinterlacing()) { ?> selected="selected"<?php } ?>><?php echo $name ?></option><?php } ?></select></td></tr>
|
<tr><td><?php echo translate('Deinterlacing') ?></td><td><select name="newMonitor[Deinterlacing]"><?php foreach ( $deinterlaceopts_v4l2 as $name => $value ) { ?><option value="<?php echo $value ?>"<?php if ( $value == $monitor->Deinterlacing()) { ?> selected="selected"<?php } ?>><?php echo $name ?></option><?php } ?></select></td></tr>
|
||||||
<?php
|
<?php
|
||||||
|
|
Loading…
Reference in New Issue