Merge branch 'updated-console' into storageareas

This commit is contained in:
Isaac Connor 2016-05-03 14:34:58 -04:00
commit c3628a8dfd
8 changed files with 1596 additions and 1585 deletions

View File

@ -207,15 +207,8 @@ int SWScale::Convert(const uint8_t* in_buffer, const size_t in_buffer_size, uint
Error("Failed filling input frame with input buffer");
return -7;
}
#if LIBAVUTIL_VERSION_CHECK(54, 6, 0, 6, 0)
if(av_image_fill_arrays(output_avframe->data, output_avframe->linesize,
out_buffer, out_pf, width, height, 1) <= 0)
{
#else
if(avpicture_fill( (AVPicture*)output_avframe, out_buffer,
out_pf, width, height ) <= 0)
{
#endif
if(!avpicture_fill( (AVPicture*)output_avframe, out_buffer, out_pf, width, height ) ) {
Error("Failed filling output frame with output buffer");
return -8;
}

View File

@ -51,8 +51,6 @@ extern "C" {
#if LIBAVUTIL_VERSION_CHECK(54, 6, 0, 6, 0)
#include <libavutil/imgutils.h>
#else
#include <libavutil/avutil.h>
#endif
#elif HAVE_FFMPEG_AVUTIL_H
#include <ffmpeg/avutil.h>

View File

@ -411,7 +411,7 @@ int FfmpegCamera::OpenFfmpeg() {
Fatal("Image size mismatch. Required: %d Available: %d",pSize,imagesize);
}
Debug ( 1, "Validated imagesize %d", pSize );
Debug ( 1, "Validated imagesize" );
#if HAVE_LIBSWSCALE
Debug ( 1, "Calling sws_isSupportedInput" );

View File

@ -1,10 +1,84 @@
<?php
require_once('includes/Server.php');
//
// ZoneMinder web console file, $Date$, $Revision$
// Copyright (C) 2001-2008 Philip Coombes
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
$servers = Server::find_all();
require_once('includes/Storage.php');
$storage_areas = Storage::find_all();
$show_storage_areas = count($storage_areas) > 1 and canEdit( 'System' ) ? 1 : 0;
$eventCounts = array(
array(
"title" => translate('Events'),
"filter" => array(
"terms" => array(
)
),
),
array(
"title" => translate('Hour'),
"filter" => array(
"terms" => array(
array( "attr" => "DateTime", "op" => ">=", "val" => "-1 hour" ),
)
),
),
array(
"title" => translate('Day'),
"filter" => array(
"terms" => array(
array( "attr" => "DateTime", "op" => ">=", "val" => "-1 day" ),
)
),
),
array(
"title" => translate('Week'),
"filter" => array(
"terms" => array(
array( "attr" => "DateTime", "op" => ">=", "val" => "-7 day" ),
)
),
),
array(
"title" => translate('Month'),
"filter" => array(
"terms" => array(
array( "attr" => "DateTime", "op" => ">=", "val" => "-1 month" ),
)
),
),
array(
"title" => translate('Archived'),
"filter" => array(
"terms" => array(
array( "attr" => "Archived", "op" => "=", "val" => "1" ),
)
),
),
);
noCacheHeaders();
$seqUpFile = getSkinFile( 'graphics/seq-u.gif' );
$seqDownFile = getSkinFile( 'graphics/seq-d.gif' );
xhtmlHeaders( __FILE__, translate('Console') );
?>
<body>
@ -54,9 +128,10 @@ if ( canEdit('Monitors') )
if ( $show_storage_areas ) { $columns += 1; }
echo $columns;
?>">
<input type="button" value="<?php echo translate('Refresh') ?>" onclick="location.reload(true);"/>
<input type="button" class="btn btn-primary" name="addBtn" value="<?php echo translate('AddNewMonitor') ?>" onclick="addMonitor( this )"/>
<!-- <?php echo makePopupButton( '?view=monitor', 'zmMonitor0', 'monitor', translate('AddNewMonitor'), (canEdit( 'Monitors' ) && !$user['MonitorIds']) ) ?> -->
<?php echo makePopupButton( '?view=filter&amp;filter[terms][0][attr]=DateTime&amp;filter[terms][0][op]=%3c&amp;filter[terms][0][val]=now', 'zmFilter', 'filter', translate('Filters'), canView( 'Events' ) ) ?>
</td>
<?php
for ( $i = 0; $i < count($eventCounts); $i++ )

View File

@ -21,56 +21,6 @@
require_once('includes/Server.php');
$servers = Server::find_all();
$eventCounts = array(
array(
"title" => translate('Events'),
"filter" => array(
"terms" => array(
)
),
),
array(
"title" => translate('Hour'),
"filter" => array(
"terms" => array(
array( "attr" => "DateTime", "op" => ">=", "val" => "-1 hour" ),
)
),
),
array(
"title" => translate('Day'),
"filter" => array(
"terms" => array(
array( "attr" => "DateTime", "op" => ">=", "val" => "-1 day" ),
)
),
),
array(
"title" => translate('Week'),
"filter" => array(
"terms" => array(
array( "attr" => "DateTime", "op" => ">=", "val" => "-7 day" ),
)
),
),
array(
"title" => translate('Month'),
"filter" => array(
"terms" => array(
array( "attr" => "DateTime", "op" => ">=", "val" => "-1 month" ),
)
),
),
array(
"title" => translate('Archived'),
"filter" => array(
"terms" => array(
array( "attr" => "Archived", "op" => "=", "val" => "1" ),
)
),
),
);
$running = daemonCheck();
$states = dbFetchAll( "select * from States" );
$status = $running?translate('Running'):translate('Stopped');
@ -82,8 +32,6 @@ if ( ! empty($_COOKIE['zmGroup']) ) {
$groupIds = array_flip(explode( ',', $group['MonitorIds'] ));
}
noCacheHeaders();
$maxWidth = 0;
$maxHeight = 0;
$cycleCount = 0;
@ -178,9 +126,6 @@ foreach( $displayMonitors as $monitor )
$zoneCount += $monitor['ZoneCount'];
}
$seqUpFile = getSkinFile( 'graphics/seq-u.gif' );
$seqDownFile = getSkinFile( 'graphics/seq-d.gif' );
$versionClass = (ZM_DYN_DB_VERSION&&(ZM_DYN_DB_VERSION!=ZM_VERSION))?'errorText':'';