Merge branch 'master' into storageareas
This commit is contained in:
commit
fc7403fe3d
|
@ -127,7 +127,23 @@ CTRL+o then [Enter] to save
|
|||
|
||||
CTRL+x to exit
|
||||
|
||||
**Step 12:** Start ZoneMinder
|
||||
|
||||
**Step 12:** Please check the configuration
|
||||
Zoneminder 1.32.x
|
||||
1. Check path of ZM_PATH in '/etc/zm/conf.d/zmcuston.conf' is ZM_PATH_ZMS=/zm/cgi-bin/nph-zms
|
||||
::
|
||||
cat /etc/zm/conf.d/zmcuston.conf
|
||||
|
||||
2. Check config of /etc/apache2/conf-enabled/zoneminder.conf has the same ScriptAlias /zm/cgi-bin that is configured
|
||||
in ZM_PATH. The part /nph-zms has to be left out of the ScriptAlias
|
||||
|
||||
ScriptAlias /zm/cgi-bin "/usr/lib/zoneminder/cgi-bin"
|
||||
<Directory "/usr/lib/zoneminder/cgi-bin">
|
||||
|
||||
::
|
||||
cat /etc/apache2/conf-enabled/zoneminder.conf
|
||||
|
||||
**Step 13:** Start ZoneMinder
|
||||
|
||||
Reload Apache to enable your changes and then start ZoneMinder.
|
||||
|
||||
|
@ -136,7 +152,7 @@ Reload Apache to enable your changes and then start ZoneMinder.
|
|||
systemctl reload apache2
|
||||
systemctl start zoneminder
|
||||
|
||||
**Step 13:** Making sure ZoneMinder works
|
||||
**Step 14:** Making sure ZoneMinder works
|
||||
|
||||
1. Open up a browser and go to ``http://hostname_or_ip/zm`` - should bring up ZoneMinder Console
|
||||
|
||||
|
|
|
@ -100,12 +100,13 @@ class FfmpegCamera : public Camera {
|
|||
void Initialise();
|
||||
void Terminate();
|
||||
|
||||
static int FfmpegInterruptCallback(void*ctx);
|
||||
|
||||
int PrimeCapture();
|
||||
int PreCapture();
|
||||
int Capture( Image &image );
|
||||
int CaptureAndRecord( Image &image, timeval recording, char* event_directory );
|
||||
int PostCapture();
|
||||
private:
|
||||
static int FfmpegInterruptCallback(void*ctx);
|
||||
};
|
||||
#endif // ZM_FFMPEG_CAMERA_H
|
||||
|
|
|
@ -186,6 +186,8 @@ int LibvlcCamera::PrimeCapture() {
|
|||
Error("Unable to create libvlc instance due to: %s", libvlc_errmsg());
|
||||
return -1;
|
||||
}
|
||||
libvlc_log_set(mLibvlcInstance, LibvlcCamera::log_callback, NULL);
|
||||
|
||||
|
||||
mLibvlcMedia = libvlc_media_new_location(mLibvlcInstance, mPath.c_str());
|
||||
if ( mLibvlcMedia == NULL ) {
|
||||
|
@ -214,6 +216,7 @@ int LibvlcCamera::PrimeCapture() {
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int LibvlcCamera::PreCapture() {
|
||||
return 0;
|
||||
}
|
||||
|
@ -244,4 +247,28 @@ int LibvlcCamera::PostCapture() {
|
|||
return 0;
|
||||
}
|
||||
|
||||
void LibvlcCamera::log_callback(void *ptr, int level, const libvlc_log_t *ctx, const char *fmt, va_list vargs) {
|
||||
Logger *log = Logger::fetch();
|
||||
int log_level = Logger::NOLOG;
|
||||
if ( level == LIBVLC_ERROR ) {
|
||||
log_level = Logger::WARNING; // ffmpeg outputs a lot of errors that don't really affect anything.
|
||||
//log_level = Logger::ERROR;
|
||||
} else if ( level == LIBVLC_WARNING ) {
|
||||
log_level = Logger::INFO;
|
||||
//log_level = Logger::WARNING;
|
||||
} else if ( level == LIBVLC_NOTICE ) {
|
||||
log_level = Logger::DEBUG1;
|
||||
//log_level = Logger::INFO;
|
||||
} else if ( level == LIBVLC_DEBUG ) {
|
||||
log_level = Logger::DEBUG3;
|
||||
} else {
|
||||
Error("Unknown log level %d", level);
|
||||
}
|
||||
|
||||
if ( log ) {
|
||||
char logString[8192];
|
||||
vsnprintf(logString, sizeof(logString)-1, fmt, vargs);
|
||||
log->logPrint(false, __FILE__, __LINE__, log_level, logString);
|
||||
}
|
||||
}
|
||||
#endif // HAVE_LIBVLC
|
||||
|
|
|
@ -42,6 +42,8 @@ struct LibvlcPrivateData
|
|||
};
|
||||
|
||||
class LibvlcCamera : public Camera {
|
||||
private:
|
||||
static void log_callback( void *ptr, int level, const libvlc_log_t *ctx, const char *format, va_list vargs );
|
||||
protected:
|
||||
std::string mPath;
|
||||
std::string mMethod;
|
||||
|
@ -59,9 +61,9 @@ public:
|
|||
LibvlcCamera( int p_id, const std::string &path, const std::string &p_method, const std::string &p_options, 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 );
|
||||
~LibvlcCamera();
|
||||
|
||||
const std::string &Path() const { return( mPath ); }
|
||||
const std::string &Options() const { return( mOptions ); }
|
||||
const std::string &Method() const { return( mMethod ); }
|
||||
const std::string &Path() const { return mPath; }
|
||||
const std::string &Options() const { return mOptions; }
|
||||
const std::string &Method() const { return mMethod; }
|
||||
|
||||
void Initialise();
|
||||
void Terminate();
|
||||
|
|
|
@ -942,6 +942,7 @@ void LocalCamera::Initialise() {
|
|||
v4l2_std_id stdId;
|
||||
|
||||
memset(&input, 0, sizeof(input));
|
||||
input.index = channel;
|
||||
|
||||
if ( vidioctl(vid_fd, VIDIOC_ENUMINPUT, &input) < 0 ) {
|
||||
Fatal("Failed to enumerate input %d: %s", channel, strerror(errno));
|
||||
|
@ -952,8 +953,8 @@ void LocalCamera::Initialise() {
|
|||
}
|
||||
|
||||
stdId = standard;
|
||||
if ( (input.std != V4L2_STD_UNKNOWN) && vidioctl( vid_fd, VIDIOC_S_STD, &stdId ) < 0 ) {
|
||||
Fatal("Failed to set video standard %d: %s", standard, strerror(errno));
|
||||
if ( (input.std != V4L2_STD_UNKNOWN) && (vidioctl(vid_fd, VIDIOC_S_STD, &stdId) < 0) ) {
|
||||
Fatal("Failed to set video standard %d: %d %s", standard, errno, strerror(errno));
|
||||
}
|
||||
|
||||
Contrast(contrast);
|
||||
|
|
|
@ -45,5 +45,6 @@ if ( !empty($_REQUEST['mid']) && canEdit('Monitors', $_REQUEST['mid']) ) {
|
|||
$refreshParent = true;
|
||||
}
|
||||
} // end if action
|
||||
$view = 'none';
|
||||
} // end if $mid and canEdit($mid)
|
||||
?>
|
||||
|
|
|
@ -61,7 +61,7 @@ span.noneCue {
|
|||
}
|
||||
|
||||
#menuBar1 #replayControl {
|
||||
margin: 0 4px 0 auto;
|
||||
margin: auto 5px auto auto;
|
||||
}
|
||||
|
||||
#menuBar1 div {
|
||||
|
|
|
@ -3,3 +3,8 @@
|
|||
margin-left: 3px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.SourceOptions input,
|
||||
.SourcePath input {
|
||||
width: 100%;
|
||||
}
|
||||
|
|
|
@ -128,7 +128,7 @@ if ( ! $Event->Id() ) {
|
|||
<?php
|
||||
if ( canEdit('Events') ) {
|
||||
?>
|
||||
<div id="deleteEvent"><button type="button" onclick="deleteEvent()"><?php echo translate('Delete') ?></button></div>
|
||||
<div id="deleteEvent"><button type="button" onclick="deleteEvent()" <?php echo $Event->Archived == 1 ? ' disabled="disabled" title="You cannot delete an archived event. Unarchive it first."' : '' ?>><?php echo translate('Delete') ?></button></div>
|
||||
<div id="editEvent"><button type="button" onclick="editEvent()"><?php echo translate('Edit') ?></button></div>
|
||||
<div id="archiveEvent"<?php echo $Event->Archived == 1 ? ' class="hidden"' : '' ?>><button type="button" onclick="archiveEvent()"><?php echo translate('Archive') ?></button></div>
|
||||
<div id="unarchiveEvent"<?php echo $Event->Archived == 0 ? ' class="hidden"' : '' ?>><button type="button" onclick="unarchiveEvent()"><?php echo translate('Unarchive') ?></button></div>
|
||||
|
|
|
@ -150,7 +150,7 @@ foreach ( dbFetchAll( 'SELECT Id,Name FROM Servers ORDER BY lower(Name) ASC' ) a
|
|||
$servers[$server['Id']] = $server['Name'];
|
||||
}
|
||||
$monitors = array();
|
||||
foreach ( dbFetchAll( 'select Id,Name from Monitors order by Name asc' ) as $monitor ) {
|
||||
foreach ( dbFetchAll('SELECT Id,Name FROM Monitors ORDER BY Name ASC') as $monitor ) {
|
||||
if ( visibleMonitor($monitor['Id']) ) {
|
||||
$monitors[$monitor['Name']] = $monitor['Name'];
|
||||
}
|
||||
|
@ -224,7 +224,7 @@ for ( $i=0; $i < count($terms); $i++ ) {
|
|||
}
|
||||
?>
|
||||
<td><?php if ( count($terms) > 2 ) { echo htmlSelect("filter[Query][terms][$i][obr]", $obracketTypes, $term['obr']); } else { ?> <?php } ?></td>
|
||||
<td><?php echo htmlSelect( "filter[Query][terms][$i][attr]", $attrTypes, $term['attr'], "checkValue( this );" ); ?></td>
|
||||
<td><?php echo htmlSelect("filter[Query][terms][$i][attr]", $attrTypes, $term['attr'], 'checkValue(this);'); ?></td>
|
||||
<?php
|
||||
if ( isset($term['attr']) ) {
|
||||
if ( $term['attr'] == 'Archived' ) {
|
||||
|
@ -387,7 +387,6 @@ if ( ZM_OPT_MESSAGE ) {
|
|||
?>
|
||||
<p>
|
||||
<label><?php echo translate('FilterExecuteEvents') ?></label>
|
||||
|
||||
<input type="checkbox" name="filter[AutoExecute]" value="1"<?php if ( $filter->AutoExecute() ) { ?> checked="checked"<?php } ?>/>
|
||||
<input type="text" name="filter[AutoExecuteCmd]" value="<?php echo (null !==$filter->AutoExecuteCmd())?$filter->AutoExecuteCmd():'' ?>" maxlength="255" onchange="updateButtons( this )"/>
|
||||
</p>
|
||||
|
|
|
@ -27,16 +27,16 @@ $monitor = dbFetchMonitor( $_REQUEST['mid'] );
|
|||
|
||||
$focusWindow = true;
|
||||
|
||||
xhtmlHeaders(__FILE__, translate('Function')." - ".validHtmlStr($monitor['Name']) );
|
||||
xhtmlHeaders(__FILE__, translate('Function').' - '.validHtmlStr($monitor['Name']));
|
||||
?>
|
||||
<body>
|
||||
<div id="page">
|
||||
<div id="header">
|
||||
<h2><?php echo translate('Function')." - ".validHtmlStr($monitor['Name']) ?></h2>
|
||||
<h2><?php echo translate('Function').' - '.validHtmlStr($monitor['Name']) ?></h2>
|
||||
</div>
|
||||
<div id="content">
|
||||
<form name="contentForm" id="contentForm" method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>">
|
||||
<input type="hidden" name="view" value="none"/>
|
||||
<input type="hidden" name="view" value="function"/>
|
||||
<input type="hidden" name="action" value="function"/>
|
||||
<input type="hidden" name="mid" value="<?php echo $monitor['Id'] ?>"/>
|
||||
<p>
|
||||
|
@ -49,11 +49,12 @@ foreach ( getEnumValues( 'Monitors', 'Function' ) as $optFunction ) {
|
|||
}
|
||||
?>
|
||||
</select>
|
||||
<label for="newEnabled"><?php echo translate('Enabled') ?></label><input type="checkbox" name="newEnabled" id="newEnabled" value="1"<?php if ( !empty($monitor['Enabled']) ) { ?> checked="checked"<?php } ?>/>
|
||||
<label for="newEnabled"><?php echo translate('Enabled') ?></label>
|
||||
<input type="checkbox" name="newEnabled" id="newEnabled" value="1"<?php if ( !empty($monitor['Enabled']) ) { ?> checked="checked"<?php } ?>/>
|
||||
</p>
|
||||
<div id="contentButtons">
|
||||
<input type="submit" value="<?php echo translate('Save') ?>"/>
|
||||
<input type="button" value="<?php echo translate('Cancel') ?>" onclick="closeWindow()"/>
|
||||
<button type="submit" value="Save"><?php echo translate('Save') ?></button>
|
||||
<button type="button" onclick="closeWindow()"><?php echo translate('Cancel') ?></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
@ -879,9 +879,12 @@ include('_monitor_source_nvsocket.php');
|
|||
<?php
|
||||
} elseif ( $monitor->Type() == 'Ffmpeg' || $monitor->Type() == 'Libvlc' ) {
|
||||
?>
|
||||
<tr><td><?php echo translate('SourcePath') ?></td><td><input type="text" name="newMonitor[Path]" value="<?php echo validHtmlStr($monitor->Path()) ?>" size="36"/></td></tr>
|
||||
<tr class="SourcePath"><td><?php echo translate('SourcePath') ?></td><td><input type="text" name="newMonitor[Path]" value="<?php echo validHtmlStr($monitor->Path()) ?>" /></td></tr>
|
||||
<tr><td><?php echo translate('RemoteMethod') ?> (<?php echo makePopupLink('?view=optionhelp&option=OPTIONS_RTSPTrans', 'zmOptionHelp', 'optionhelp', '?' ) ?>)</td><td><?php echo htmlSelect( "newMonitor[Method]", $rtspFFMpegMethods, $monitor->Method() ); ?></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>
|
||||
<tr class="SourceOptions">
|
||||
<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()) ?>"/></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if ( $monitor->Type() != 'NVSocket' && $monitor->Type() != 'WebSite' ) {
|
||||
|
|
|
@ -19,7 +19,11 @@
|
|||
//
|
||||
|
||||
$optionHelpIndex = preg_replace( '/^ZM_/', '', $_REQUEST['option'] );
|
||||
$optionHelpText = !empty($OLANG[$optionHelpIndex])?$OLANG[$optionHelpIndex]['Help']:$config[$_REQUEST['option']]['Help'];
|
||||
if ( !empty($OLANG[$optionHelpIndex]) ) {
|
||||
$optionHelpText = $OLANG[$optionHelpIndex]['Help'];
|
||||
} else {
|
||||
$optionHelpText = dbFetchOne('SELECT Help FROM Config WHERE Name=?', 'Help', array($_REQUEST['option']) );
|
||||
}
|
||||
$optionHelpText = validHtmlStr($optionHelpText);
|
||||
$optionHelpText = preg_replace( "/~~/", "<br/>", $optionHelpText );
|
||||
$optionHelpText = preg_replace( "/\[(.+)\]\((.+)\)/", "<a href=\"$2\" target=\"_blank\">$1</a>", $optionHelpText );
|
||||
|
|
Loading…
Reference in New Issue