diff --git a/.gitignore b/.gitignore index ec021d210..fa066279c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ configure config.h.in +config.h.in~ autom4te.cache aclocal.m4 depcomp @@ -12,7 +13,7 @@ scripts/ZoneMinder/blib Makefile.in Makefile docs/_build - +compile config.guess config.h config.log @@ -24,6 +25,12 @@ misc/com.zoneminder.systemctl.policy misc/com.zoneminder.systemctl.rules misc/logrotate.conf misc/syslog.conf +onvif/modules/MYMETA.json +onvif/modules/MYMETA.yml +onvif/proxy/MYMETA.json +onvif/proxy/MYMETA.yml +scripts/ZoneMinder/Makefile.old +scripts/ZoneMinder/MYMETA.json scripts/ZoneMinder/MYMETA.yml scripts/ZoneMinder/lib/ZoneMinder/Base.pm scripts/ZoneMinder/lib/ZoneMinder/Config.pm diff --git a/configure.ac b/configure.ac index be27a45de..4bb17ae79 100644 --- a/configure.ac +++ b/configure.ac @@ -327,11 +327,6 @@ AC_CHECK_SENDFILE # Other programs AC_CHECK_PROG(OPT_FFMPEG,ffmpeg,yes,no) AC_PATH_PROG(PATH_FFMPEG,ffmpeg) -AC_CHECK_PROG(OPT_NETPBM,pnmscale,yes,no) -AC_PATH_PROG(PATH_NETPBM,pnmscale) -if test "$OPT_NETPBM" == "yes"; then -PATH_NETPBM=`dirname $PATH_NETPBM` -fi # Checks for libraries. AC_CHECK_LIB(rt,clock_gettime,,AC_MSG_ERROR(zm requires librt)) diff --git a/distros/ubuntu1204/changelog b/distros/ubuntu1204/changelog index ad9212d40..2dfc8b63c 100644 --- a/distros/ubuntu1204/changelog +++ b/distros/ubuntu1204/changelog @@ -1,3 +1,16 @@ +zoneminder (1.28.1+1-trusty-SNAPSHOT2015030201) trusty; urgency=medium + + * maybe fix for RTSP Basic Auth + * Also remove dependency on netpbm + + -- Isaac Connor Mon, 02 Mar 2015 11:25:59 -0500 + +zoneminder (1.28.1+1-utopic-SNAPSHOT2015022301) utopic; urgency=medium + + * Big merge of onvif support and some fixes. + + -- Isaac Connor Mon, 23 Feb 2015 19:45:45 -0500 + zoneminder (1.28.0+1-trusty-SNAPSHOT2015021201) trusty; urgency=medium * add mysql-client-5.6 as a dependency instaed of mysql-client. diff --git a/distros/ubuntu1204/control b/distros/ubuntu1204/control index f9a5a1a1b..b1be82b34 100644 --- a/distros/ubuntu1204/control +++ b/distros/ubuntu1204/control @@ -2,12 +2,12 @@ Source: zoneminder Section: net Priority: optional Maintainer: Isaac Connor -Build-Depends: debhelper (>= 9), autoconf, automake, quilt, libphp-serialization-perl, libgnutls-dev, libmysqlclient-dev | libmariadbclient-dev, libdbd-mysql-perl, libdate-manip-perl, libwww-perl, libjpeg8-dev|libjpeg9-dev|libjpeg62-turbo-dev, libpcre3-dev, libavcodec-dev, libavformat-dev (>= 3:0.svn20090204), libswscale-dev (>= 3:0.svn20090204), libavutil-dev, libv4l-dev (>= 0.8.3), libbz2-dev, libtool, libsys-mmap-perl, ffmpeg | libav-tools, libnetpbm10-dev, libavdevice-dev, libdevice-serialport-perl, libpcre3, libarchive-zip-perl, libmime-lite-perl, dh-autoreconf, libvlccore-dev, libvlc-dev, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev, libgcrypt11-dev, libpolkit-gobject-1-dev +Build-Depends: debhelper (>= 9), autoconf, automake, quilt, libphp-serialization-perl, libgnutls-dev, libmysqlclient-dev | libmariadbclient-dev, libdbd-mysql-perl, libdate-manip-perl, libwww-perl, libjpeg8-dev|libjpeg9-dev|libjpeg62-turbo-dev, libpcre3-dev, libavcodec-dev, libavformat-dev (>= 3:0.svn20090204), libswscale-dev (>= 3:0.svn20090204), libavutil-dev, libv4l-dev (>= 0.8.3), libbz2-dev, libtool, libsys-mmap-perl, ffmpeg | libav-tools, libavdevice-dev, libdevice-serialport-perl, libpcre3, libarchive-zip-perl, libmime-lite-perl, dh-autoreconf, libvlccore-dev, libvlc-dev, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev, libgcrypt11-dev, libpolkit-gobject-1-dev Standards-Version: 3.9.4 Package: zoneminder Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, apache2, libapache2-mod-php5 | libapache2-mod-fcgid, php5, php5-mysql|php5-mysqlnd, libphp-serialization-perl, libdate-manip-perl, libmime-lite-perl, libmime-tools-perl, mariadb-client|mysql-client|mysql-client-5.6, libwww-perl, libarchive-tar-perl, libarchive-zip-perl, libdevice-serialport-perl, libpcre3, ffmpeg | libav-tools, rsyslog | system-log-daemon, libmodule-load-perl, libsys-mmap-perl, libjson-any-perl, netpbm, libavdevice53 | libavdevice55, libjpeg8|libjpeg9|libjpeg62-turbo, zip, libnet-sftp-foreign-perl, libio-pty-perl, libexpect-perl, libvlccore5 | libvlccore7 | libvlccore8, libvlc5, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev, libpolkit-gobject-1-0, liburi-encode-perl +Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, apache2, libapache2-mod-php5 | libapache2-mod-fcgid, php5, php5-mysql|php5-mysqlnd, libphp-serialization-perl, libdate-manip-perl, libmime-lite-perl, libmime-tools-perl, mariadb-client|mysql-client|mysql-client-5.6, libwww-perl, libarchive-tar-perl, libarchive-zip-perl, libdevice-serialport-perl, libpcre3, ffmpeg | libav-tools, rsyslog | system-log-daemon, libmodule-load-perl, libsys-mmap-perl, libjson-any-perl, libavdevice53 | libavdevice55, libjpeg8|libjpeg9|libjpeg62-turbo, zip, libnet-sftp-foreign-perl, libio-pty-perl, libexpect-perl, libvlccore5 | libvlccore7 | libvlccore8, libvlc5, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev, libpolkit-gobject-1-0, liburi-encode-perl Recommends: mysql-server|mariadb-server Description: Video camera security and surveillance solution ZoneMinder is intended for use in single or multi-camera video security diff --git a/onvif/modules/MYMETA.json b/onvif/modules/MYMETA.json deleted file mode 100644 index fbb5d7c77..000000000 --- a/onvif/modules/MYMETA.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "abstract" : "unknown", - "author" : [ - "Jan Hochstein" - ], - "dynamic_config" : 0, - "generated_by" : "ExtUtils::MakeMaker version 6.72, CPAN::Meta::Converter version 2.141520", - "license" : [ - "unknown" - ], - "meta-spec" : { - "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", - "version" : "2" - }, - "name" : "ONVIF", - "no_index" : { - "directory" : [ - "t", - "inc" - ] - }, - "prereqs" : { - "build" : { - "requires" : { - "ExtUtils::MakeMaker" : "0" - } - }, - "configure" : { - "requires" : { - "ExtUtils::MakeMaker" : "0" - } - }, - "runtime" : { - "requires" : {} - } - }, - "release_status" : "stable", - "version" : "" -} diff --git a/onvif/modules/MYMETA.yml b/onvif/modules/MYMETA.yml deleted file mode 100644 index 109544804..000000000 --- a/onvif/modules/MYMETA.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -abstract: unknown -author: - - 'Jan Hochstein' -build_requires: - ExtUtils::MakeMaker: '0' -configure_requires: - ExtUtils::MakeMaker: '0' -dynamic_config: 0 -generated_by: 'ExtUtils::MakeMaker version 6.72, CPAN::Meta::Converter version 2.141520' -license: unknown -meta-spec: - url: http://module-build.sourceforge.net/META-spec-v1.4.html - version: '1.4' -name: ONVIF -no_index: - directory: - - t - - inc -requires: {} -version: '' diff --git a/onvif/modules/pm_to_blib b/onvif/modules/pm_to_blib deleted file mode 100644 index e69de29bb..000000000 diff --git a/onvif/proxy/MYMETA.json b/onvif/proxy/MYMETA.json deleted file mode 100644 index fbb5d7c77..000000000 --- a/onvif/proxy/MYMETA.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "abstract" : "unknown", - "author" : [ - "Jan Hochstein" - ], - "dynamic_config" : 0, - "generated_by" : "ExtUtils::MakeMaker version 6.72, CPAN::Meta::Converter version 2.141520", - "license" : [ - "unknown" - ], - "meta-spec" : { - "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", - "version" : "2" - }, - "name" : "ONVIF", - "no_index" : { - "directory" : [ - "t", - "inc" - ] - }, - "prereqs" : { - "build" : { - "requires" : { - "ExtUtils::MakeMaker" : "0" - } - }, - "configure" : { - "requires" : { - "ExtUtils::MakeMaker" : "0" - } - }, - "runtime" : { - "requires" : {} - } - }, - "release_status" : "stable", - "version" : "" -} diff --git a/onvif/proxy/MYMETA.yml b/onvif/proxy/MYMETA.yml deleted file mode 100644 index 109544804..000000000 --- a/onvif/proxy/MYMETA.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -abstract: unknown -author: - - 'Jan Hochstein' -build_requires: - ExtUtils::MakeMaker: '0' -configure_requires: - ExtUtils::MakeMaker: '0' -dynamic_config: 0 -generated_by: 'ExtUtils::MakeMaker version 6.72, CPAN::Meta::Converter version 2.141520' -license: unknown -meta-spec: - url: http://module-build.sourceforge.net/META-spec-v1.4.html - version: '1.4' -name: ONVIF -no_index: - directory: - - t - - inc -requires: {} -version: '' diff --git a/onvif/proxy/pm_to_blib b/onvif/proxy/pm_to_blib deleted file mode 100644 index e69de29bb..000000000 diff --git a/scripts/ZoneMinder/lib/ZoneMinder/ConfigAdmin.pm b/scripts/ZoneMinder/lib/ZoneMinder/ConfigAdmin.pm index 673e13c98..d57493fc8 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/ConfigAdmin.pm +++ b/scripts/ZoneMinder/lib/ZoneMinder/ConfigAdmin.pm @@ -195,6 +195,8 @@ Loads existing configuration from the database (if any) and merges it with the d Saves configuration held in memory to the database. The act of loading and saving configuration is a convenient way to ensure that the configuration held in the database corresponds with the most recent definitions and that all components are using the same set of configuration. +=back + =head2 EXPORT None by default. diff --git a/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in b/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in index 46da03bf0..ac64d46ff 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in +++ b/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in @@ -2012,6 +2012,8 @@ Loads existing configuration from the database (if any) and merges it with the d Saves configuration held in memory to the database. The act of loading and saving configuration is a convenient way to ensure that the configuration held in the database corresponds with the most recent definitions and that all components are using the same set of configuration. +=back + =head2 EXPORT None by default. diff --git a/scripts/ZoneMinder/lib/ZoneMinder/Control/FI8608W_Y2k.pm b/scripts/ZoneMinder/lib/ZoneMinder/Control/FI8608W_Y2k.pm index 7ffbf248a..b12f42021 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/Control/FI8608W_Y2k.pm +++ b/scripts/ZoneMinder/lib/ZoneMinder/Control/FI8608W_Y2k.pm @@ -658,9 +658,9 @@ sub presetGoto __END__ # Below is stub documentation for your module. You'd better edit it! -=head1 FI-8608W +=head1 NAME -ZoneMinder::Database - Perl extension for FOSCAM FI-8608W by Christophe_Y2k +ZoneMinder::Control::FI-8608W - Perl extension for FOSCAM FI-8608W by Christophe_Y2k =head1 SYNOPSIS diff --git a/scripts/ZoneMinder/lib/ZoneMinder/Control/FI8620_Y2k.pm b/scripts/ZoneMinder/lib/ZoneMinder/Control/FI8620_Y2k.pm index 7d9cd261d..ece4736e4 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/Control/FI8620_Y2k.pm +++ b/scripts/ZoneMinder/lib/ZoneMinder/Control/FI8620_Y2k.pm @@ -734,9 +734,9 @@ sub presetGoto __END__ # Below is stub documentation for your module. You'd better edit it! -=head1 FI8620 +=head1 NAME -ZoneMinder::Database - Perl extension for FOSCAM FI8620 +ZoneMinder::Control::FI8620 - Perl extension for FOSCAM FI8620 =head1 SYNOPSIS diff --git a/scripts/ZoneMinder/lib/ZoneMinder/Control/FI8908W.pm b/scripts/ZoneMinder/lib/ZoneMinder/Control/FI8908W.pm index ab877c609..cd925f72b 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/Control/FI8908W.pm +++ b/scripts/ZoneMinder/lib/ZoneMinder/Control/FI8908W.pm @@ -220,6 +220,10 @@ sub presetHome __END__ =pod +=head1 NAME + +ZoneMinder::Control::FI8908W - Foscam FI8908W camera control + =head1 DESCRIPTION This module contains the implementation of the Foscam FI8908W / FI8918W IP camera control diff --git a/scripts/ZoneMinder/lib/ZoneMinder/Control/FI9821W_Y2k.pm b/scripts/ZoneMinder/lib/ZoneMinder/Control/FI9821W_Y2k.pm index 4177f5857..e31ab0052 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/Control/FI9821W_Y2k.pm +++ b/scripts/ZoneMinder/lib/ZoneMinder/Control/FI9821W_Y2k.pm @@ -696,9 +696,9 @@ sub presetGoto __END__ # Below is stub documentation for your module. You'd better edit it! -=head1 FI9821W +=head1 NAME -ZoneMinder::Database - Perl extension for FOSCAM FI9821W +ZoneMinder::Control::FI9821W - Perl extension for FOSCAM FI9821W =head1 SYNOPSIS diff --git a/scripts/ZoneMinder/lib/ZoneMinder/Logger.pm b/scripts/ZoneMinder/lib/ZoneMinder/Logger.pm index 5b4438c72..ea786e66a 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/Logger.pm +++ b/scripts/ZoneMinder/lib/ZoneMinder/Logger.pm @@ -827,6 +827,8 @@ This method will output a fatal error message and then die if the current debug This method will output a panic error message and then die with a stack trace if the current debug level permits it, otherwise does nothing. This message will be tagged with the PNC string in the logs. +=back + =head2 EXPORT None by default. diff --git a/scripts/ZoneMinder/lib/ZoneMinder/Memory.pm.in b/scripts/ZoneMinder/lib/ZoneMinder/Memory.pm.in index df32e7608..fbb213414 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/Memory.pm.in +++ b/scripts/ZoneMinder/lib/ZoneMinder/Memory.pm.in @@ -733,10 +733,10 @@ The core elements of ZoneMinder used mapped memory to allow multiple access to r All the methods listed below require a 'monitor' parameter. This must be a reference to a hash with at least the 'Id' field set to the monitor id of the mapped memory you wish to access. Using database methods to select the monitor details will also return this kind of data. Some of the mapped memory methods will add and amend new fields to this hash. -=over 4 - =head1 METHODS +=over 4 + =item zmMemVerify ( $monitor ); Verify that the mapped memory of the monitor given exists and is valid. It will return an undefined value if it is not valid. You should generally call this method first before using any of the other methods, but most of the remaining methods will also do so if the memory has not already been verified. @@ -809,6 +809,8 @@ Cancel any previous trigger on or off requests. This stops a triggered alarm if Indicate that the given text should be displayed in the timestamp annotation on any images captured, if the format of the annotation string defined for the monitor permits. +=back + =head1 DATA The data fields in mapped memory that may be accessed are as follows. There are two main sections, shared_data which is general data and trigger_data which is used for event triggering. Whilst reading from these fields is harmless, extreme care must be taken when writing to mapped memory, especially in the shared_data section as this is normally written to only by monitor capture and analysis processes. @@ -844,6 +846,8 @@ The data fields in mapped memory that may be accessed are as follows. There are The following constants are used by the methods above, but can also be used by user scripts if required. +=over 4 + =item STATE_IDLE STATE_PREALARM STATE_ALARM STATE_ALERT STATE_TAPE These constants define the state of the monitor with respect to alarms and events. They are used in the shared_data:state field. @@ -852,10 +856,12 @@ These constants define the state of the monitor with respect to alarms and event These constants defines the various values that can exist in the shared_data:action field. This is a bitmask which when non-zero defines an action that an executing monitor process should take. ACTION_GET requires that the current values of brightness, contrast, colour and hue are taken from the camera and written to the equivalent mapped memory fields. ACTION_SET implies the reverse, that the values in mapped memory should be written to the camera. ACTION_RELOAD signal that the monitor process should reload itself from the database in case any settings have changed there. ACTION_SUSPEND signals that a monitor should stop exaiming images for motion, though other alarms may still occur. ACTION_RESUME sigansl that a monitor should resume motion detectiom. -=item TRIGGER_CANCEL TRIGGER_ON TRIGGER_OFF +=item TRIGGER_CANCEL TRIGGER_ON TRIGGER_OFF These constants are used in the definition of external triggers. TRIGGER_CANCEL is used to indicated that any previous trigger settings should be cancelled, TRIGGER_ON signals that an alarm should be created (or continued)) as a result of the current trigger and TRIGGER_OFF signals that the trigger should prevent any alarms from being generated. See the trigger methods above for further details. +=back + =head1 EXPORT None by default. diff --git a/scripts/zmupdate.pl.in b/scripts/zmupdate.pl.in index 41a081fc1..2650ba812 100644 --- a/scripts/zmupdate.pl.in +++ b/scripts/zmupdate.pl.in @@ -20,11 +20,33 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # ========================================================================== -# -# This script just checks what the most recent release of ZoneMinder is -# at the the moment. It will eventually be responsible for applying and -# configuring upgrades etc, including on the fly upgrades. -# + +=head1 NAME + +zmupdate.pl - check and upgrade Zoneminer database + +=head1 SYNOPSIS + + zmupdate.pl -c,--check | -f,--freshen | -v,--version= [-u -p] + +=head1 DESCRIPTION + +This script just checks what the most recent release of ZoneMinder is +at the the moment. It will eventually be responsible for applying and +configuring upgrades etc, including on the fly upgrades. + +=head1 OPTIONS + + -c, --check - Check for updated versions of ZoneMinder + -f, --freshen - Freshen the configuration in the database. Equivalent of old zmconfig.pl -noi + -v, --version= - Force upgrade to the current version from + -u, --user= - Alternate DB user with privileges to alter DB + -p, --pass= - Password of alternate DB user with privileges to alter DB + -d,--dir= - Directory containing update files if not in default build location + -interactive - interact with the user + -nointeractive - do not interact with the user + +=cut use strict; use bytes; @@ -52,6 +74,7 @@ use ZoneMinder::ConfigAdmin qw( :functions ); use POSIX; use DBI; use Getopt::Long; +use autouse 'Pod::Usage'=>qw(pod2usage); use Data::Dumper; use constant EVENT_PATH => ($Config{ZM_DIR_EVENTS}=~m|/|)?$Config{ZM_DIR_EVENTS}:($Config{ZM_PATH_WEB}.'/'.$Config{ZM_DIR_EVENTS}); @@ -78,27 +101,19 @@ my $version = ''; my $dbUser = $Config{ZM_DB_USER}; my $dbPass = $Config{ZM_DB_PASS}; my $updateDir = ''; -sub Usage -{ - print( " -Usage: zmupdate.pl <-c,--check|-f,--freshen|-v,--version=> [-u -p]> -Parameters are :- --c, --check - Check for updated versions of ZoneMinder --f, --freshen - Freshen the configuration in the database. Equivalent of old zmconfig.pl -noi --v, --version= - Force upgrade to the current version from --u, --user= - Alternate DB user with privileges to alter DB --p, --pass= - Password of alternate DB user with privileges to alter DB --d,--dir= - Directory containing update files if not in default build location --interactive - interact with the user --nointeractive - do not interact with the user -"); - exit( -1 ); -} -if ( !GetOptions( 'check'=>\$check, 'freshen'=>\$freshen, 'rename'=>\$rename, 'zone-fix'=>\$zoneFix, 'migrate-events'=>\$migrateEvents, 'version=s'=>\$version, 'interactive!'=>\$interactive, 'user:s'=>\$dbUser, 'pass:s'=>\$dbPass, 'dir:s'=>\$updateDir ) ) -{ - Usage(); -} +GetOptions( + 'check' =>\$check, + 'freshen' =>\$freshen, + 'rename' =>\$rename, + 'zone-fix' =>\$zoneFix, + 'migrate-events' =>\$migrateEvents, + 'version=s' =>\$version, + 'interactive!' =>\$interactive, + 'user:s' =>\$dbUser, + 'pass:s' =>\$dbPass, + 'dir:s' =>\$updateDir +) or pod2usage(-exitstatus => -1); my $dbh = zmDbConnect(); $Config{ZM_DB_USER} = $dbUser; @@ -113,14 +128,14 @@ if ( ! ($check || $freshen || $rename || $zoneFix || $migrateEvents || $version) else { print( STDERR "Please give a valid option\n" ); - Usage(); + pod2usage(-exitstatus => -1); } } if ( ($check + $freshen + $rename + $zoneFix + $migrateEvents + ($version?1:0)) > 1 ) { print( STDERR "Please give only one option\n" ); - Usage(); + pod2usage(-exitstatus => -1); } if ( $check && $Config{ZM_CHECK_FOR_UPDATES} ) diff --git a/src/zm_mpeg.cpp b/src/zm_mpeg.cpp index 2e29880ca..e3e544e73 100644 --- a/src/zm_mpeg.cpp +++ b/src/zm_mpeg.cpp @@ -109,7 +109,7 @@ void VideoStream::SetupFormat( ) if(filename) { - snprintf( s->filename, sizeof(s->filename), filename ); + snprintf( s->filename, sizeof(s->filename), "%s", filename ); } ofc = s; diff --git a/src/zm_rtsp.cpp b/src/zm_rtsp.cpp index 61d24c0f8..76b000c9d 100644 --- a/src/zm_rtsp.cpp +++ b/src/zm_rtsp.cpp @@ -340,8 +340,19 @@ int RtspThread::run() message = "OPTIONS "+mUrl+" RTSP/1.0\r\n"; if ( !sendCommand( message ) ) return( -1 ); - if ( !recvResponse( response ) ) - return( -1 ); + + // A negative return here may indicate auth failure, but we will have setup the auth mechanisms so we need to retry. + if ( !recvResponse( response ) ) { + if ( mNeedAuth ) { + Debug( 2, "Resending OPTIONS due to possible auth requirement" ); + if ( !sendCommand( message ) ) + return( -1 ); + if ( !recvResponse( response ) ) + return( -1 ); + } else { + return( -1 ); + } + } // end if failed response maybe due to auth char publicLine[256] = ""; StringVector lines = split( response, "\r\n" ); @@ -440,7 +451,11 @@ int RtspThread::run() } else { - trackUrl += "/" + controlUrl; + if ( *trackUrl.rbegin() != '/') { + trackUrl += "/" + controlUrl; + } else { + trackUrl += controlUrl; + } } rtpClock = mediaDesc->getClock(); codecId = mFormatContext->streams[i]->codec->codec_id; diff --git a/src/zmc.cpp b/src/zmc.cpp index d993bb0b5..e97f0054f 100644 --- a/src/zmc.cpp +++ b/src/zmc.cpp @@ -274,21 +274,21 @@ int main( int argc, char *argv[] ) { if ( monitors[i]->PreCapture() < 0 ) { - Error( "Failed to pre-capture monitor %d (%d/%d)", monitors[i]->Id(), i, n_monitors ); + Error( "Failed to pre-capture monitor %d %d (%d/%d)", monitors[i]->Id(), monitors[i]->Name(), i+1, n_monitors ); zm_terminate = true; result = -1; break; } if ( monitors[i]->Capture() < 0 ) { - Error( "Failed to capture image from monitor %d (%d/%d)", monitors[i]->Id(), i, n_monitors ); + Error( "Failed to capture image from monitor %d %s (%d/%d)", monitors[i]->Id(), monitors[i]->Name(), i+1, n_monitors ); zm_terminate = true; result = -1; break; } if ( monitors[i]->PostCapture() < 0 ) { - Error( "Failed to post-capture monitor %d (%d/%d)", monitors[i]->Id(), i, n_monitors ); + Error( "Failed to post-capture monitor %d %s (%d/%d)", monitors[i]->Id(), monitors[i]->Name(), i+1, n_monitors ); zm_terminate = true; result = -1; break; diff --git a/version b/version index cfc730712..450a687b2 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.28.0 +1.28.1 diff --git a/web/lang/ro_ro.php b/web/lang/ro_ro.php index 74da43406..f82573f6b 100644 --- a/web/lang/ro_ro.php +++ b/web/lang/ro_ro.php @@ -1144,14 +1144,6 @@ $OLANG = array( 'Prompt' => "Opţiuni adiţionale pentru ffmpeg", 'Help' => "Ffmpeg suportă multe opţiuni pentru controlul calităţii secvenţei video produse. Această opţiune vă permite să specificaţi propriile opţiuni. Citiţi documentaţia ffmpeg pentru mai multe detalii." ), - 'OPT_NETPBM' => array( - 'Prompt' => "Sunt instalate utilitarele Netpbm (opţional)", - 'Help' => "În cazul laţimii de bandă redusă ZoneMinder va miniaturiza imaginile înainte de a le direcţiona spre browser pentru a reduce traficul. Pentru aceasta foloseşte pachetul Netpbm; această opţiune ar trebuie să direcţioneze ZoneMinder spre binarele pachetului. Dacă nu aveţi pachetul Netpbm instalat imaginilor vor fi întotdeauna trimise la scară reală şi redimensionate în browser." - ), - 'PATH_NETPBM' => array( - 'Prompt' => "Cale la utilitarele Netpbm (opţional)", - 'Help' => "Calea la utilitarele Netpbm (opţional)" - ), 'OPT_TRIGGERS' => array( 'Prompt' => "Interacţionează cu declanşatoare externe via socket sau fişierele dispozitivelor", 'Help' => "ZoneMinder poate interacţiona cu sisteme externe care acţionează sau revocă o alarmă. Acest lucru este realizat prin intermediului script-ului zmtrigger.pl. Această opţiune indică folosirea declanşatoarelor externe, majoritatea vor alege nu aici." diff --git a/web/skins/classic/css/classic/control.css b/web/skins/classic/css/classic/control.css index 685258614..4a7f05a5b 100644 --- a/web/skins/classic/css/classic/control.css +++ b/web/skins/classic/css/classic/control.css @@ -46,11 +46,11 @@ */ .ptzControls .controlsPanel .upBtn { - background: url("../graphics/arrow-l-u.gif") no-repeat 0 0; + background: url("../../graphics/arrow-l-u.gif") no-repeat 0 0; } .ptzControls .controlsPanel .downBtn { - background: url("../graphics/arrow-l-d.gif") no-repeat 0 0; + background: url("../../graphics/arrow-l-d.gif") no-repeat 0 0; } .ptzControls .controlsPanel .focusControls { diff --git a/web/skins/classic/css/flat/control.css b/web/skins/classic/css/flat/control.css index 685258614..4a7f05a5b 100644 --- a/web/skins/classic/css/flat/control.css +++ b/web/skins/classic/css/flat/control.css @@ -46,11 +46,11 @@ */ .ptzControls .controlsPanel .upBtn { - background: url("../graphics/arrow-l-u.gif") no-repeat 0 0; + background: url("../../graphics/arrow-l-u.gif") no-repeat 0 0; } .ptzControls .controlsPanel .downBtn { - background: url("../graphics/arrow-l-d.gif") no-repeat 0 0; + background: url("../../graphics/arrow-l-d.gif") no-repeat 0 0; } .ptzControls .controlsPanel .focusControls { diff --git a/web/skins/classic/css/flat/views/control.css b/web/skins/classic/css/flat/views/control.css index e881ba70b..5e10dcfd9 100644 --- a/web/skins/classic/css/flat/views/control.css +++ b/web/skins/classic/css/flat/views/control.css @@ -1 +1 @@ -@import url(../css/control.css); +@import url(../control.css); diff --git a/web/skins/classic/css/flat/views/watch.css b/web/skins/classic/css/flat/views/watch.css index 41b8c03b4..5fec8ec82 100644 --- a/web/skins/classic/css/flat/views/watch.css +++ b/web/skins/classic/css/flat/views/watch.css @@ -1,4 +1,4 @@ -@import url(../css/control.css); +@import url(../control.css); #menuBar { margin: 6px auto 4px; diff --git a/web/skins/classic/views/event.php b/web/skins/classic/views/event.php index db0aa6543..721e7b18e 100644 --- a/web/skins/classic/views/event.php +++ b/web/skins/classic/views/event.php @@ -27,13 +27,15 @@ if ( !canView( 'Events' ) ) $eid = validInt( $_REQUEST['eid'] ); $fid = !empty($_REQUEST['fid'])?validInt($_REQUEST['fid']):1; -if ( $user['MonitorIds'] ) - $midSql = " and MonitorId in (".join( ",", preg_split( '/["\'\s]*,["\'\s]*/', dbEscape($user['MonitorIds']) ) ).")"; -else - $midSql = ''; +$sql = 'SELECT E.*,M.Name AS MonitorName,M.Width,M.Height,M.DefaultRate,M.DefaultScale FROM Events AS E INNER JOIN Monitors AS M ON E.MonitorId = M.Id WHERE E.Id = ?'; +$sql_values = array( $eid ); -$sql = 'SELECT E.*,M.Name AS MonitorName,M.DefaultRate,M.DefaultScale FROM Events AS E INNER JOIN Monitors AS M ON E.MonitorId = M.Id WHERE E.Id = ?'.$midSql; -$event = dbFetchOne( $sql, NULL, array($eid) ); +if ( $user['MonitorIds'] ) { + $monitor_ids = explode( ',', $user['MonitorIds'] ); + $sql .= ' AND MonitorId IN (' .implode( ',', array_fill(0,count($monitor_ids),'?') ) . ')'; + $sql_values = array_merge( $sql_values, $monitor_ids ); +} +$event = dbFetchOne( $sql, NULL, $sql_values ); if ( isset( $_REQUEST['rate'] ) ) $rate = validInt($_REQUEST['rate']); diff --git a/web/skins/classic/views/events.php b/web/skins/classic/views/events.php index 9c4a5a299..59403c76b 100644 --- a/web/skins/classic/views/events.php +++ b/web/skins/classic/views/events.php @@ -32,7 +32,7 @@ if ( !empty($_REQUEST['execute']) ) $countSql = 'SELECT count(E.Id) AS EventCount FROM Monitors AS M INNER JOIN Events AS E ON (M.Id = E.MonitorId) WHERE'; $eventsSql = 'SELECT E.Id,E.MonitorId,M.Name AS MonitorName,M.DefaultScale,E.Name,E.Width,E.Height,E.Cause,E.Notes,E.StartTime,E.Length,E.Frames,E.AlarmFrames,E.TotScore,E.AvgScore,E.MaxScore,E.Archived FROM Monitors AS M INNER JOIN Events AS E on (M.Id = E.MonitorId) WHERE'; if ( $user['MonitorIds'] ) { - $user_monitor_ids = " M.Id in (".join( ",", preg_split( '/["\'\s]*,["\'\s]*/', $user['MonitorIds'] ) ).")"; + $user_monitor_ids = ' M.Id in ('.$user['MonitorIds'].')'; $countSql .= $user_monitor_ids; $eventsSql .= $user_monitor_ids; } else { diff --git a/web/skins/classic/views/timeline.php b/web/skins/classic/views/timeline.php index a0e9d01f9..eefa830d5 100644 --- a/web/skins/classic/views/timeline.php +++ b/web/skins/classic/views/timeline.php @@ -147,7 +147,7 @@ $eventsSql = "select E.Id,E.Name,E.StartTime,E.EndTime,E.Length,E.Frames,E.MaxSc if ( !empty($user['MonitorIds']) ) { - $monFilterSql = " and M.Id in (".join( ",", preg_split( '/["\'\s]*,["\'\s]*/', $user['MonitorIds'] ) ).")"; + $monFilterSql = ' AND M.Id IN ('.$user['MonitorIds'].')'; $rangeSql .= $monFilterSql; $eventsSql .= $monFilterSql; diff --git a/web/skins/classic/views/video.php b/web/skins/classic/views/video.php index e1db10329..05ee55afb 100644 --- a/web/skins/classic/views/video.php +++ b/web/skins/classic/views/video.php @@ -24,13 +24,17 @@ if ( !canView( 'Events' ) ) return; } -if ( !empty($user['MonitorIds']) ) - $midSql = " and MonitorId in (".join( ",", preg_split( '/["\'\s]*,["\'\s]*/', $user['MonitorIds'] ) ).")"; -else - $midSql = ''; +$eid = validInt($_REQUEST['eid']); -$sql = 'SELECT E.*,M.Name AS MonitorName,M.DefaultRate,M.DefaultScale FROM Events AS E INNER JOIN Monitors AS M ON E.MonitorId = M.Id WHERE E.Id = ?'.$midSql; -$event = dbFetchOne( $sql, NULL, array( $_REQUEST['eid'] ) ); +$sql = 'SELECT E.*,M.Name AS MonitorName,M.DefaultRate,M.DefaultScale FROM Events AS E INNER JOIN Monitors AS M ON E.MonitorId = M.Id WHERE E.Id = ?'; +$sql_values = array( $eid ); + +if ( $user['MonitorIds'] ) { + $monitor_ids = explode( ',', $user['MonitorIds'] ); + $sql .= ' AND MonitorId IN (' .implode( ',', array_fill(0,count($monitor_ids),'?') ) . ')'; + $sql_values = array_merge( $sql_values, $monitor_ids ); +} +$event = dbFetchOne( $sql, NULL, $sql_values ); if ( isset( $_REQUEST['rate'] ) ) $rate = validInt($_REQUEST['rate']);