Merge branch 'storageareas' of github.com:/ConnorTechnology/ZoneMinder into storageareas
Conflicts: distros/ubuntu1604/control
|
@ -0,0 +1,4 @@
|
|||
web/api/lib
|
||||
web/skins/classic/js/jquery-1.11.3.js
|
||||
web/skins/classic/js/jquery.js
|
||||
web/tools/mootools
|
|
@ -0,0 +1,29 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
"env": {
|
||||
"browser": true,
|
||||
},
|
||||
"extends": ["google"],
|
||||
"rules": {
|
||||
"brace-style": "off",
|
||||
"camelcase": "off",
|
||||
"comma-dangle": "off",
|
||||
"key-spacing": "off",
|
||||
"max-len": "off",
|
||||
"new-cap": ["error", {
|
||||
capIsNewExceptions: ["Error", "Warning", "Debug", "Polygon_calcArea", "Play", "Stop"],
|
||||
newIsCapExceptionPattern: "^Asset\.."
|
||||
}],
|
||||
"no-array-constructor": "off",
|
||||
"no-caller": "off",
|
||||
"no-new-object": "off",
|
||||
"no-unused-vars": "off",
|
||||
"no-var": "off",
|
||||
"object-curly-spacing": "off",
|
||||
"prefer-rest-params": "off",
|
||||
"quotes": "off",
|
||||
"require-jsdoc": "off",
|
||||
"spaced-comment": "off",
|
||||
},
|
||||
};
|
|
@ -103,7 +103,8 @@ mark_as_advanced(
|
|||
ZM_PERL_MM_PARMS
|
||||
ZM_PERL_SEARCH_PATH
|
||||
ZM_TARGET_DISTRO
|
||||
ZM_CONFIG_DIR)
|
||||
ZM_CONFIG_DIR
|
||||
ZM_SYSTEMD)
|
||||
|
||||
set(ZM_RUNDIR "/var/run/zm" CACHE PATH
|
||||
"Location of transient process files, default: /var/run/zm")
|
||||
|
@ -166,6 +167,8 @@ set(ZM_PERL_SEARCH_PATH "" CACHE PATH
|
|||
installed outside Perl's default search path.")
|
||||
set(ZM_TARGET_DISTRO "" CACHE STRING
|
||||
"Build ZoneMinder for a specific distribution. Currently, valid names are: fc24, fc25, el6, el7, OS13, FreeBSD")
|
||||
set(ZM_SYSTEMD "OFF" CACHE BOOL
|
||||
"Set to ON to force building ZM with systemd support. default: OFF")
|
||||
|
||||
# Reassign some variables if a target distro has been specified
|
||||
if((ZM_TARGET_DISTRO STREQUAL "fc24") OR (ZM_TARGET_DISTRO STREQUAL "fc25"))
|
||||
|
@ -223,6 +226,11 @@ include_directories("${CMAKE_BINARY_DIR}")
|
|||
# This is required to enable searching in lib64 (if exists), do not change
|
||||
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS ON)
|
||||
|
||||
# Set the systemd flag if systemd is autodetected or ZM_SYSTEMD has been set
|
||||
if(ZM_SYSTEMD OR (IS_DIRECTORY /usr/lib/systemd/system) OR (IS_DIRECTORY /lib/systemd/system))
|
||||
set(WITH_SYSTEMD 1)
|
||||
endif(ZM_SYSTEMD OR (IS_DIRECTORY /usr/lib/systemd/system) OR (IS_DIRECTORY /lib/systemd/system))
|
||||
|
||||
# System checks
|
||||
check_include_file("libv4l1-videodev.h" HAVE_LIBV4L1_VIDEODEV_H)
|
||||
if(NOT HAVE_LIBV4L1_VIDEODEV_H)
|
||||
|
@ -404,13 +412,13 @@ find_library(MYSQLCLIENT_LIBRARIES mysqlclient PATH_SUFFIXES mysql)
|
|||
if(MYSQLCLIENT_LIBRARIES)
|
||||
set(HAVE_LIBMYSQLCLIENT 1)
|
||||
list(APPEND ZM_BIN_LIBS "${MYSQLCLIENT_LIBRARIES}")
|
||||
find_path(MYSQLCLIENT_INCLUDE_DIR mysql/mysql.h)
|
||||
find_path(MYSQLCLIENT_INCLUDE_DIR mysql.h PATH_SUFFIXES mysql)
|
||||
if(MYSQLCLIENT_INCLUDE_DIR)
|
||||
include_directories("${MYSQLCLIENT_INCLUDE_DIR}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${MYSQLCLIENT_INCLUDE_DIR}")
|
||||
endif(MYSQLCLIENT_INCLUDE_DIR)
|
||||
mark_as_advanced(FORCE MYSQLCLIENT_LIBRARIES MYSQLCLIENT_INCLUDE_DIR)
|
||||
check_include_file("mysql/mysql.h" HAVE_MYSQL_H)
|
||||
check_include_file("mysql.h" HAVE_MYSQL_H)
|
||||
if(NOT HAVE_MYSQL_H)
|
||||
message(FATAL_ERROR
|
||||
"ZoneMinder requires MySQL headers - check that MySQL development packages are installed")
|
||||
|
@ -754,12 +762,14 @@ endif(NOT ZM_WEB_GROUP)
|
|||
message(STATUS "Using web user: ${ZM_WEB_USER}")
|
||||
message(STATUS "Using web group: ${ZM_WEB_GROUP}")
|
||||
|
||||
# Check for polkit
|
||||
find_package(Polkit)
|
||||
if(NOT POLKIT_FOUND)
|
||||
message(FATAL_ERROR
|
||||
"Running ZoneMinder requires polkit. Building ZoneMinder requires the polkit development package.")
|
||||
endif(NOT POLKIT_FOUND)
|
||||
if(WITH_SYSTEMD)
|
||||
# Check for polkit
|
||||
find_package(Polkit)
|
||||
if(NOT POLKIT_FOUND)
|
||||
message(FATAL_ERROR
|
||||
"Running ZoneMinder requires polkit. Building ZoneMinder requires the polkit development package.")
|
||||
endif(NOT POLKIT_FOUND)
|
||||
endif(WITH_SYSTEMD)
|
||||
|
||||
# Some variables that zm expects
|
||||
set(ZM_PID "${ZM_RUNDIR}/zm.pid")
|
||||
|
@ -828,7 +838,15 @@ else(zmconfgen_result EQUAL 0)
|
|||
endif(zmconfgen_result EQUAL 0)
|
||||
|
||||
# Install zm.conf
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zm.conf" DESTINATION "${ZM_CONFIG_DIR}")
|
||||
install(CODE "
|
||||
if (NOT EXISTS \"${ZM_CONFIG_DIR}/zm.conf\")
|
||||
file(INSTALL \"${CMAKE_CURRENT_BINARY_DIR}/zm.conf\" DESTINATION \"${ZM_CONFIG_DIR}\")
|
||||
else (NOT EXISTS \"${ZM_CONFIG_DIR}/zm.conf\")
|
||||
file(RENAME \"${CMAKE_CURRENT_BINARY_DIR}/zm.conf\" \"${CMAKE_CURRENT_BINARY_DIR}/zm.conf.new\")
|
||||
file(INSTALL \"${CMAKE_CURRENT_BINARY_DIR}/zm.conf.new\" DESTINATION \"${ZM_CONFIG_DIR}\")
|
||||
endif()
|
||||
")
|
||||
|
||||
|
||||
# Uninstall target
|
||||
configure_file(
|
||||
|
|
10
Dockerfile
|
@ -1,7 +1,7 @@
|
|||
# ZoneMinder
|
||||
|
||||
FROM ubuntu:trusty
|
||||
MAINTAINER Kyle Johnson <kjohnson@gnulnx.net>
|
||||
FROM ubuntu:xenial
|
||||
MAINTAINER Markos Vakondios <mvakondios@gmail.com>
|
||||
|
||||
# Resynchronize the package index files
|
||||
RUN apt-get update && \
|
||||
|
@ -10,8 +10,8 @@ RUN apt-get update && \
|
|||
libdbi-perl libarchive-zip-perl libdate-manip-perl libdevice-serialport-perl libmime-perl libpcre3 \
|
||||
libwww-perl libdbd-mysql-perl libsys-mmap-perl yasm cmake libjpeg-turbo8-dev \
|
||||
libjpeg-turbo8 libtheora-dev libvorbis-dev libvpx-dev libx264-dev libmp4v2-dev libav-tools mysql-client \
|
||||
apache2 php5 php5-mysql apache2-mpm-prefork libapache2-mod-php5 php5-cli \
|
||||
mysql-server libvlc-dev libvlc5 libvlccore-dev libvlccore7 vlc-data libcurl4-openssl-dev \
|
||||
apache2 php php-mysql libapache2-mod-php php-cli \
|
||||
mysql-server libvlc-dev libvlc5 libvlccore-dev libvlccore8 vlc-data libcurl4-openssl-dev \
|
||||
libavformat-dev libswscale-dev libavutil-dev libavcodec-dev libavfilter-dev \
|
||||
libavresample-dev libavdevice-dev libpostproc-dev libv4l-dev libtool libnetpbm10-dev \
|
||||
libmime-lite-perl dh-autoreconf dpatch \
|
||||
|
@ -46,7 +46,7 @@ RUN chown -R www-data:www-data /usr/local/share/zoneminder/
|
|||
RUN cp misc/apache.conf /etc/apache2/sites-available/000-default.conf
|
||||
ADD utils/docker/phpdate.ini /etc/php5/apache2/conf.d/25-phpdate.ini
|
||||
|
||||
# Expose http ports
|
||||
# Expose http port
|
||||
EXPOSE 80
|
||||
|
||||
# Initial database and apache setup:
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
--
|
||||
-- This updates a 1.30.3 database to 1.30.4
|
||||
--
|
||||
-- No changes required
|
||||
--
|
|
@ -271,3 +271,8 @@ EXECUTE stmt;
|
|||
|
||||
ALTER TABLE Monitors MODIFY EncoderParameters TEXT;
|
||||
ALTER TABLE Monitors MODIFY Path VARCHAR(255);
|
||||
|
||||
ALTER TAble Monitors MODIFY V4LMultiBuffer tinyint(1) unsigned;
|
||||
ALTER TAble Monitors MODIFY ControlId int(10) unsigned;
|
||||
ALTER TAble Monitors MODIFY TrackDelay smallint(5) unsigned;
|
||||
ALTER TAble Monitors MODIFY ReturnDelay smallint(5) unsigned;
|
||||
|
|
|
@ -157,7 +157,9 @@ Upgrades
|
|||
|
||||
sudo zmupdate.pl --user=root --pass=<mysql_root_pwd> --version=<from version>
|
||||
|
||||
5. Now start zoneminder:
|
||||
5. Now restart nginx and php-fpm then start and zoneminder:
|
||||
|
||||
sudo systemctl restart nginx
|
||||
sudo systemctl restart php-fpm
|
||||
sudo systemctl start zoneminder
|
||||
|
||||
|
|
|
@ -17,6 +17,11 @@
|
|||
# This will tell zoneminder's cmake process we are building against a known distro
|
||||
%global zmtargetdistro %{?rhel:el%{rhel}}%{!?rhel:fc%{fedora}}
|
||||
|
||||
# Fedora >= 25 needs apcu backwards compatibility module
|
||||
%if 0%{?fedora} >= 25
|
||||
%global with_apcu_bc 1
|
||||
%endif
|
||||
|
||||
# Include files for SysV init or systemd
|
||||
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
|
||||
%global with_init_systemd 1
|
||||
|
@ -28,7 +33,7 @@
|
|||
%global _hardened_build 1
|
||||
|
||||
Name: zoneminder
|
||||
Version: 1.30.3
|
||||
Version: 1.30.4
|
||||
Release: 1%{?dist}
|
||||
Summary: A camera monitoring and analysis tool
|
||||
Group: System Environment/Daemons
|
||||
|
@ -45,6 +50,7 @@ Source1: https://github.com/FriendsOfCake/crud/archive/v%{crud_version}.tar.gz#/
|
|||
%{?with_init_systemd:BuildRequires: systemd-devel}
|
||||
%{?with_init_systemd:BuildRequires: mariadb-devel}
|
||||
%{?with_init_systemd:BuildRequires: perl-podlators}
|
||||
%{?with_init_systemd:BuildRequires: polkit-devel}
|
||||
%{?with_init_sysv:BuildRequires: mysql-devel}
|
||||
%{?el6:BuildRequires: epel-rpm-macros}
|
||||
BuildRequires: cmake >= 2.8.7
|
||||
|
@ -76,7 +82,6 @@ BuildRequires: vlc-devel
|
|||
BuildRequires: libcurl-devel
|
||||
BuildRequires: libv4l-devel
|
||||
BuildRequires: ffmpeg-devel
|
||||
BuildRequires: polkit-devel
|
||||
|
||||
%{?with_nginx:Requires: nginx}
|
||||
%{?with_nginx:Requires: fcgiwrap}
|
||||
|
@ -86,8 +91,8 @@ BuildRequires: polkit-devel
|
|||
Requires: php-mysqli
|
||||
Requires: php-common
|
||||
Requires: php-gd
|
||||
%{?fedora:Requires: php-pecl-apcu-bc}
|
||||
%{?rhel:Requires: php-pecl-apcu}
|
||||
Requires: php-pecl-apcu
|
||||
%{?with_apcu_bc:Requires: php-pecl-apcu-bc}
|
||||
Requires: cambozola
|
||||
Requires: net-tools
|
||||
Requires: psmisc
|
||||
|
@ -132,8 +137,7 @@ designed to support as many cameras as you can attach to your computer without
|
|||
too much degradation of performance.
|
||||
|
||||
%prep
|
||||
%autosetup -n ZoneMinder-%{version}
|
||||
%autosetup -a 1 -n ZoneMinder-%{version}
|
||||
%autosetup -p 1 -a 1 -n ZoneMinder-%{version}
|
||||
%{__rm} -rf ./web/api/app/Plugin/Crud
|
||||
%{__mv} -f crud-%{crud_version} ./web/api/app/Plugin/Crud
|
||||
|
||||
|
@ -287,6 +291,8 @@ rm -rf %{_docdir}/%{name}-%{version}
|
|||
%if 0%{?with_init_systemd}
|
||||
%{_tmpfilesdir}/zoneminder.conf
|
||||
%{_unitdir}/zoneminder.service
|
||||
%{_datadir}/polkit-1/actions/com.zoneminder.systemctl.policy
|
||||
%{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules
|
||||
%endif
|
||||
|
||||
%if 0%{?with_init_sysv}
|
||||
|
@ -299,7 +305,6 @@ rm -rf %{_docdir}/%{name}-%{version}
|
|||
%{_bindir}/zmc
|
||||
%{_bindir}/zmcontrol.pl
|
||||
%{_bindir}/zmdc.pl
|
||||
%{_bindir}/zmf
|
||||
%{_bindir}/zmfilter.pl
|
||||
%{_bindir}/zmpkg.pl
|
||||
%{_bindir}/zmtrack.pl
|
||||
|
@ -324,9 +329,6 @@ rm -rf %{_docdir}/%{name}-%{version}
|
|||
%{_libexecdir}/zoneminder/
|
||||
%{_datadir}/zoneminder/
|
||||
|
||||
%{_datadir}/polkit-1/actions/com.zoneminder.systemctl.policy
|
||||
%{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules
|
||||
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_sharedstatedir}/zoneminder
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_sharedstatedir}/zoneminder/events
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_sharedstatedir}/zoneminder/images
|
||||
|
@ -338,6 +340,11 @@ rm -rf %{_docdir}/%{name}-%{version}
|
|||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/run/zoneminder
|
||||
|
||||
%changelog
|
||||
* Tue May 09 2017 Andrew Bauer <zonexpertconsulting@outlook.com> - 1.30.4-1
|
||||
- modify autosetup macro parameters
|
||||
- modify requirements for php-pecl-acpu-bc package
|
||||
- 1.30.4 release
|
||||
|
||||
* Tue May 02 2017 Andrew Bauer <zonexpertconsulting@outlook.com> - 1.30.3-1
|
||||
- 1.30.3 release
|
||||
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
d /var/run/zm 0755 www-data www-data
|
||||
d /tmp/zm 0755 www-data www-data
|
||||
d /var/tmp/zm 0755 www-data www-data
|
||||
d /var/tmp/cache 0755 www-data www-data
|
||||
d /var/tmp/cache/models 0755 www-data www-data
|
||||
d /var/tmp/cache/persistent 0755 www-data www-data
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
d /var/run/zm 0755 www-data www-data
|
||||
d /tmp/zm 0755 www-data www-data
|
||||
d /var/tmp/zm 0755 www-data www-data
|
||||
d /var/tmp/cache 0755 www-data www-data
|
||||
d /var/tmp/cache/models 0755 www-data www-data
|
||||
d /var/tmp/cache/persistent 0755 www-data www-data
|
||||
|
|
|
@ -309,7 +309,7 @@ The main causes are.
|
|||
* Capture frame rates. Unless there's a compelling reason in your case there is often little benefit in running cameras at 25fps when 5-10fps would often get you results just as good. Try changing your monitor settings to limit your cameras to lower frame rates. You can still configure ZM to ignore these limits and capture as fast as possible when motion is detected.
|
||||
* Run function. Obviously running in Record or Mocord modes or in Modect with lots of events generates a lot of DB and file activity and so CPU and load will increase.
|
||||
* Basic default detection zones. By default when a camera is added one detection zone is added which covers the whole image with a default set of parameters. If your camera covers a view in which various regions are unlikely to generate a valid alarm (ie the sky) then I would experiment with reducing the zone sizes or adding inactive zones to blank out areas you don't want to monitor. Additionally the actual settings of the zone themselves may not be optimal. When doing motion detection the number of changed pixels above a threshold is examined, then this is filter, then contiguous regions are calculated to see if an alarm is generated. If any maximum or minimum threshold is exceeded according to your zone settings at any time the calculation stops. If your settings always result in the calculations going through to the last stage before being failed then additional CPU time is used unnecessarily. Make sure your maximum and minimumzone thresholds are set to sensible values and experiment by switching RECORD_EVENT_STATS on and seeing what the actual values of alarmed pixels etc are during sample events.
|
||||
* Optimise your settings. After you've got some settings you're happy with then switching off RECORD_EVENT_STATS will prevent the statistics being written to the database which saves some time. Other settings which might make a difference are ZM_FAST_RGB_DIFFS, ZM_OPT_FRAME_SERVER and the JPEG_xxx_QUALITY ones.
|
||||
* Optimise your settings. After you've got some settings you're happy with then switching off RECORD_EVENT_STATS will prevent the statistics being written to the database which saves some time. Other settings which might make a difference are ZM_FAST_RGB_DIFFS and the JPEG_xxx_QUALITY ones.
|
||||
|
||||
I'm sure there are other things which might make a difference such as what else you have running on the box and memory sizes (make sure there's no swapping going on). Also speed of disk etc will make some difference during event capture and also if you are watching the whole time then you may have a bunch of zms processes running also.
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ Here is what the filter window looks like
|
|||
events later and also make sure archived events don't get deleted, for example
|
||||
* Email details of all matches: Sends an email to the configured address with details about the event.
|
||||
The email can be customized as per TBD
|
||||
* Execute command on all matches: Allows you to execute any arbitrary command on the matched events
|
||||
* Execute command on all matches: Allows you to execute any arbitrary command on the matched events. You can use replacement tokens as subsequent arguents to the command, the last argument will be the absolute path to the event, preceeded by replacement arguents. eg: /usr/bin/script.sh %MN% will excecute as /usr/bin/script.sh MonitorName /path/to/event.
|
||||
* Delete all matches: Deletes all the matched events
|
||||
* *E*: Use 'Submit' to 'test' your matching conditions. This will just match and show you what filters match. Use 'Execute' to actually execute the action after matching your conditions. Use 'Save' to save the filter for future use and 'Reset' to clear your settings
|
||||
|
||||
|
|
|
@ -33,10 +33,6 @@ RUN_AUDIT - The zmaudit daemon exists to check that the saved information in the
|
|||
|
||||
AUDIT_CHECK_INTERVAL - The zmaudit daemon exists to check that the saved information in the database and on the filesystem match and are consistent with each other. If an error occurs or if you are using 'fast deletes' it may be that database records are deleted but files remain. In this case, and similar, zmaudit will remove redundant information to synchronise the two data stores. The default check interval of 900 seconds (15 minutes) is fine for most systems however if you have a very large number of events the process of scanning the database and filesystem may take a long time and impact performance. In this case you may prefer to make this interval much larger to reduce the impact on your system. This option determines how often these checks are performed.
|
||||
|
||||
OPT_FRAME_SERVER - In some circumstances it is possible for a slow disk to take so long writing images to disk that it causes the analysis daemon to fall behind especially during high frame rate events. Setting this option to yes enables a frame server daemon (zmf) which will be sent the images from the analysis daemon and will do the actual writing of images itself freeing up the analysis daemon to get on with other things. Should this transmission fail or other permanent or transient error occur, this function will fall back to the analysis daemon.
|
||||
|
||||
FRAME_SOCKET_SIZE - For large captured images it is possible for the writes from the analysis daemon to the frame server to fail as the amount to be written exceeds the default buffer size. While the images are then written by the analysis daemon so no data is lost, it defeats the object of the frame server daemon in the first place. You can use this option to indicate that a larger buffer size should be used. Note that you may have to change the existing maximum socket buffer size on your system via sysctl (or in /proc/sys/net/core/wmem_max) to allow this new size to be set. Alternatively you can change the default buffer size on your system in the same way in which case that will be used with no change necessary in this option
|
||||
|
||||
OPT_CONTROL - ZoneMinder includes limited support for controllable cameras. A number of sample protocols are included and others can easily be added. If you wish to control your cameras via ZoneMinder then select this option otherwise if you only have static cameras or use other control methods then leave this option off.
|
||||
|
||||
OPT_TRIGGERS - ZoneMinder can interact with external systems which prompt or cancel alarms. This is done via the zmtrigger.pl script. This option indicates whether you want to use these external triggers. Most people will say no here.
|
||||
|
|
|
@ -13,7 +13,9 @@ configure_file(zoneminder.desktop.in "${CMAKE_CURRENT_BINARY_DIR}/zoneminder.des
|
|||
# Do not install the misc files by default
|
||||
#install(FILES "${CMAKE_CURRENT_BINARY_DIR}/apache.conf" "${CMAKE_CURRENT_BINARY_DIR}/logrotate.conf" "${CMAKE_CURRENT_BINARY_DIR}/syslog.conf" DESTINATION "${CMAKE_INSTALL_DATADIR}/zoneminder/misc")
|
||||
|
||||
# Install Policykit rules and actions into the proper folders
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/com.zoneminder.systemctl.policy" DESTINATION "${PC_POLKIT_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/polkit-1/actions")
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/com.zoneminder.systemctl.rules" DESTINATION "${PC_POLKIT_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/polkit-1/rules.d")
|
||||
# Install Policykit rules and actions into the proper folders only on systems with systemd
|
||||
if(WITH_SYSTEMD)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/com.zoneminder.systemctl.policy" DESTINATION "${PC_POLKIT_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/polkit-1/actions")
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/com.zoneminder.systemctl.rules" DESTINATION "${PC_POLKIT_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/polkit-1/rules.d")
|
||||
endif(WITH_SYSTEMD)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zoneminder.desktop" DESTINATION "${CMAKE_INSTALL_DATADIR}/applications")
|
||||
|
|
|
@ -2722,47 +2722,6 @@ our @options = (
|
|||
type => $types{boolean},
|
||||
category => 'config',
|
||||
},
|
||||
{
|
||||
name => 'ZM_OPT_FRAME_SERVER',
|
||||
default => 'no',
|
||||
description => 'Should analysis farm out the writing of images to disk',
|
||||
#requires => [ { name => 'ZM_OPT_ADAPTIVE_SKIP', value => 'yes' } ],
|
||||
help => q`
|
||||
In some circumstances it is possible for a slow disk to take so
|
||||
long writing images to disk that it causes the analysis daemon
|
||||
to fall behind especially during high frame rate events.
|
||||
Setting this option to yes enables a frame server daemon (zmf)
|
||||
which will be sent the images from the analysis daemon and will
|
||||
do the actual writing of images itself freeing up the analysis
|
||||
daemon to get on with other things. Should this transmission
|
||||
fail or other permanent or transient error occur, this function
|
||||
will fall back to the analysis daemon.
|
||||
`,
|
||||
type => $types{boolean},
|
||||
category => 'system',
|
||||
},
|
||||
{
|
||||
name => 'ZM_FRAME_SOCKET_SIZE',
|
||||
default => '0',
|
||||
description => 'Specify the frame server socket buffer size if non-standard',
|
||||
requires => [ { name => 'ZM_OPT_FRAME_SERVER', value => 'yes' } ],
|
||||
help => q`
|
||||
For large captured images it is possible for the writes from
|
||||
the analysis daemon to the frame server to fail as the amount
|
||||
to be written exceeds the default buffer size. While the images
|
||||
are then written by the analysis daemon so no data is lost, it
|
||||
defeats the object of the frame server daemon in the first
|
||||
place. You can use this option to indicate that a larger buffer
|
||||
size should be used. Note that you may have to change the
|
||||
existing maximum socket buffer size on your system via sysctl
|
||||
(or in /proc/sys/net/core/wmem_max) to allow this new size to
|
||||
be set. Alternatively you can change the default buffer size on
|
||||
your system in the same way in which case that will be used
|
||||
with no change necessary in this option
|
||||
`,
|
||||
type => $types{integer},
|
||||
category => 'system',
|
||||
},
|
||||
{
|
||||
name => 'ZM_OPT_CONTROL',
|
||||
default => 'no',
|
||||
|
|
|
@ -92,7 +92,6 @@ delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};
|
|||
my @daemons = (
|
||||
'zmc',
|
||||
'zma',
|
||||
'zmf',
|
||||
'zmfilter.pl',
|
||||
'zmaudit.pl',
|
||||
'zmtrigger.pl',
|
||||
|
|
|
@ -935,6 +935,7 @@ sub executeCommand
|
|||
|
||||
my $command = $filter->{AutoExecuteCmd};
|
||||
$command .= " $event_path";
|
||||
$command = substituteTags( $command, $filter, $event );
|
||||
|
||||
Info( "Executing '$command'\n" );
|
||||
my $output = qx($command);
|
||||
|
|
|
@ -251,10 +251,6 @@ if ( $command =~ /^(?:start|restart)$/ )
|
|||
}
|
||||
if ( $monitor->{Function} ne 'Monitor' )
|
||||
{
|
||||
if ( $Config{ZM_OPT_FRAME_SERVER} )
|
||||
{
|
||||
runCommand( "zmdc.pl start zmf -m $monitor->{Id}" );
|
||||
}
|
||||
runCommand( "zmdc.pl start zma -m $monitor->{Id}" );
|
||||
}
|
||||
if ( $Config{ZM_OPT_CONTROL} )
|
||||
|
|
|
@ -203,19 +203,17 @@ if ( $event_id ) {
|
|||
$concat_name = $filter_name if $concat_name eq '';
|
||||
}
|
||||
|
||||
my $sql = " SELECT max(F.Delta)-min(F.Delta) as FullLength,
|
||||
E.*,
|
||||
unix_timestamp(E.StartTime) as Time,
|
||||
my $sql = " SELECT (SELECT max(Delta) FROM Frames WHERE EventId=Events.Id)-(SELECT min(Delta) FROM Frames WHERE EventId=Events.Id) as FullLength,
|
||||
Events.*,
|
||||
unix_timestamp(Events.StartTime) as Time,
|
||||
M.Name as MonitorName,
|
||||
M.Width as MonitorWidth,
|
||||
M.Height as MonitorHeight,
|
||||
M.Palette
|
||||
FROM Frames as F
|
||||
INNER JOIN Events as E on F.EventId = E.Id
|
||||
INNER JOIN Monitors as M on E.MonitorId = M.Id
|
||||
WHERE EventId = ?
|
||||
GROUP BY F.EventId"
|
||||
;
|
||||
FROM Events
|
||||
INNER JOIN Monitors as M on Events.MonitorId = M.Id
|
||||
WHERE Events.Id = ?
|
||||
";
|
||||
my $sth = $dbh->prepare_cached( $sql ) or Fatal( "Can't prepare '$sql': ".$dbh->errstr() );
|
||||
Debug($sql);
|
||||
|
||||
|
|
|
@ -12,21 +12,19 @@ add_library(zm STATIC ${ZM_BIN_SRC_FILES})
|
|||
add_executable(zmc zmc.cpp)
|
||||
add_executable(zma zma.cpp)
|
||||
add_executable(zmu zmu.cpp)
|
||||
add_executable(zmf zmf.cpp)
|
||||
add_executable(zms zms.cpp)
|
||||
|
||||
target_link_libraries(zmc zm ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS})
|
||||
target_link_libraries(zma zm ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS})
|
||||
target_link_libraries(zmu zm ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS})
|
||||
target_link_libraries(zmf zm ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS})
|
||||
target_link_libraries(zms zm ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS})
|
||||
|
||||
# Generate man files for the binaries destined for the bin folder
|
||||
FOREACH(CBINARY zma zmc zmf zmu)
|
||||
FOREACH(CBINARY zma zmc zmu)
|
||||
POD2MAN(${CMAKE_CURRENT_SOURCE_DIR}/${CBINARY}.cpp zoneminder-${CBINARY} 8)
|
||||
ENDFOREACH(CBINARY zma zmc zmf zmu)
|
||||
ENDFOREACH(CBINARY zma zmc zmu)
|
||||
|
||||
install(TARGETS zmc zma zmu zmf RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
install(TARGETS zmc zma zmu RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
install(TARGETS zms RUNTIME DESTINATION "${ZM_CGIDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
install(CODE "execute_process(COMMAND ln -sf zms nph-zms WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})" )
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/nph-zms DESTINATION "${ZM_CGIDIR}")
|
||||
|
|
|
@ -40,10 +40,10 @@ Camera::Camera( unsigned int p_monitor_id, SourceType p_type, unsigned int p_wid
|
|||
Debug(2,"New camera id: %d width: %d height: %d colours: %d subpixelorder: %d capture: %d",monitor_id,width,height,colours,subpixelorder,capture);
|
||||
|
||||
/* Because many loops are unrolled and work on 16 colours/time or 4 pixels/time, we have to meet requirements */
|
||||
if((colours == ZM_COLOUR_GRAY8 || colours == ZM_COLOUR_RGB32) && (imagesize % 16) != 0) {
|
||||
Fatal("Image size is not multiples of 16");
|
||||
} else if(colours == ZM_COLOUR_RGB24 && ((imagesize % 16) != 0 || (imagesize % 12) != 0)) {
|
||||
Fatal("Image size is not multiples of 12 and 16");
|
||||
if((colours == ZM_COLOUR_GRAY8 || colours == ZM_COLOUR_RGB32) && (imagesize % 64) != 0) {
|
||||
Fatal("Image size is not multiples of 64");
|
||||
} else if(colours == ZM_COLOUR_RGB24 && ((imagesize % 64) != 0 || (imagesize % 12) != 0)) {
|
||||
Fatal("Image size is not multiples of 12 and 64");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
123
src/zm_event.cpp
|
@ -42,8 +42,6 @@ extern "C"
|
|||
#include "zm_sendfile.h"
|
||||
}
|
||||
|
||||
#include "zmf.h"
|
||||
|
||||
#if HAVE_SYS_SENDFILE_H
|
||||
#include <sys/sendfile.h>
|
||||
#endif
|
||||
|
@ -278,116 +276,6 @@ void Event::createNotes( std::string ¬es ) {
|
|||
|
||||
int Event::sd = -1;
|
||||
|
||||
bool Event::OpenFrameSocket( int monitor_id ) {
|
||||
if ( sd > 0 ) {
|
||||
close( sd );
|
||||
}
|
||||
|
||||
sd = socket( AF_UNIX, SOCK_STREAM, 0 );
|
||||
if ( sd < 0 ) {
|
||||
Error( "Can't create socket: %s", strerror(errno) );
|
||||
return( false );
|
||||
}
|
||||
|
||||
int socket_buffer_size = config.frame_socket_size;
|
||||
if ( socket_buffer_size > 0 ) {
|
||||
if ( setsockopt( sd, SOL_SOCKET, SO_SNDBUF, &socket_buffer_size, sizeof(socket_buffer_size) ) < 0 ) {
|
||||
Error( "Can't get socket buffer size to %d, error = %s", socket_buffer_size, strerror(errno) );
|
||||
close( sd );
|
||||
sd = -1;
|
||||
return( false );
|
||||
}
|
||||
}
|
||||
|
||||
int flags;
|
||||
if ( (flags = fcntl( sd, F_GETFL )) < 0 ) {
|
||||
Error( "Can't get socket flags, error = %s", strerror(errno) );
|
||||
close( sd );
|
||||
sd = -1;
|
||||
return( false );
|
||||
}
|
||||
flags |= O_NONBLOCK;
|
||||
if ( fcntl( sd, F_SETFL, flags ) < 0 ) {
|
||||
Error( "Can't set socket flags, error = %s", strerror(errno) );
|
||||
close( sd );
|
||||
sd = -1;
|
||||
return( false );
|
||||
}
|
||||
|
||||
char sock_path[PATH_MAX] = "";
|
||||
snprintf( sock_path, sizeof(sock_path), "%s/zmf-%d.sock", config.path_socks, monitor_id );
|
||||
|
||||
struct sockaddr_un addr;
|
||||
|
||||
strncpy( addr.sun_path, sock_path, sizeof(addr.sun_path) );
|
||||
addr.sun_family = AF_UNIX;
|
||||
|
||||
if ( connect( sd, (struct sockaddr *)&addr, strlen(addr.sun_path)+sizeof(addr.sun_family)+1) < 0 ) {
|
||||
Warning( "Can't connect to frame server: %s", strerror(errno) );
|
||||
close( sd );
|
||||
sd = -1;
|
||||
return( false );
|
||||
}
|
||||
|
||||
Debug( 1, "Opened connection to frame server" );
|
||||
return( true );
|
||||
}
|
||||
|
||||
bool Event::ValidateFrameSocket( int monitor_id ) {
|
||||
if ( sd < 0 ) {
|
||||
return( OpenFrameSocket( monitor_id ) );
|
||||
}
|
||||
return( true );
|
||||
}
|
||||
|
||||
bool Event::SendFrameImage( const Image *image, bool alarm_frame ) {
|
||||
if ( !ValidateFrameSocket( monitor->Id() ) ) {
|
||||
return( false );
|
||||
}
|
||||
|
||||
static int jpg_buffer_size = 0;
|
||||
static unsigned char jpg_buffer[ZM_MAX_IMAGE_SIZE];
|
||||
|
||||
image->EncodeJpeg( jpg_buffer, &jpg_buffer_size, (alarm_frame&&(config.jpeg_alarm_file_quality>config.jpeg_file_quality))?config.jpeg_alarm_file_quality:config.jpeg_file_quality );
|
||||
|
||||
static FrameHeader frame_header;
|
||||
|
||||
frame_header.event_id = id;
|
||||
if ( config.use_deep_storage )
|
||||
frame_header.event_time = start_time.tv_sec;
|
||||
frame_header.frame_id = frames;
|
||||
frame_header.alarm_frame = alarm_frame;
|
||||
frame_header.image_length = jpg_buffer_size;
|
||||
|
||||
struct iovec iovecs[2];
|
||||
iovecs[0].iov_base = &frame_header;
|
||||
iovecs[0].iov_len = sizeof(frame_header);
|
||||
iovecs[1].iov_base = jpg_buffer;
|
||||
iovecs[1].iov_len = jpg_buffer_size;
|
||||
|
||||
ssize_t writev_size = sizeof(frame_header)+jpg_buffer_size;
|
||||
ssize_t writev_result = writev( sd, iovecs, sizeof(iovecs)/sizeof(*iovecs));
|
||||
if ( writev_result != writev_size ) {
|
||||
if ( writev_result < 0 ) {
|
||||
if ( errno == EAGAIN ) {
|
||||
Warning( "Blocking write detected" );
|
||||
} else {
|
||||
Error( "Can't write frame: %s", strerror(errno) );
|
||||
close( sd );
|
||||
sd = -1;
|
||||
}
|
||||
} else {
|
||||
Error( "Incomplete frame write: %zd of %zd bytes written", writev_result, writev_size );
|
||||
close( sd );
|
||||
sd = -1;
|
||||
}
|
||||
return( false );
|
||||
}
|
||||
Debug( 1, "Wrote frame image, %d bytes", jpg_buffer_size );
|
||||
|
||||
return( true );
|
||||
}
|
||||
|
||||
bool Event::WriteFrameImage( Image *image, struct timeval timestamp, const char *event_file, bool alarm_frame ) {
|
||||
Image* ImgToWrite;
|
||||
Image* ts_image = NULL;
|
||||
|
@ -400,10 +288,9 @@ bool Event::WriteFrameImage( Image *image, struct timeval timestamp, const char
|
|||
} else
|
||||
ImgToWrite=image;
|
||||
|
||||
if ( !config.opt_frame_server || !SendFrameImage(ImgToWrite, alarm_frame) ) {
|
||||
int thisquality = ( alarm_frame && (config.jpeg_alarm_file_quality > config.jpeg_file_quality) ) ? config.jpeg_alarm_file_quality : 0 ; // quality to use, zero is default
|
||||
ImgToWrite->WriteJpeg( event_file, thisquality, (monitor->Exif() ? timestamp : (timeval){0,0}) ); // exif is only timestamp at present this switches on or off for write
|
||||
}
|
||||
int thisquality = ( alarm_frame && (config.jpeg_alarm_file_quality > config.jpeg_file_quality) ) ? config.jpeg_alarm_file_quality : 0 ; // quality to use, zero is default
|
||||
ImgToWrite->WriteJpeg( event_file, thisquality, (monitor->Exif() ? timestamp : (timeval){0,0}) ); // exif is only timestamp at present this switches on or off for write
|
||||
|
||||
if(ts_image) delete(ts_image); // clean up if used.
|
||||
return( true );
|
||||
}
|
||||
|
@ -1491,6 +1378,8 @@ void EventStream::runStream() {
|
|||
|
||||
if ( !paused ) {
|
||||
curr_frame_id += replay_rate>0?1:-1;
|
||||
if ( (mode == MODE_SINGLE) && ((unsigned int)curr_frame_id == event_data->frame_count) )
|
||||
curr_frame_id = 1;
|
||||
if ( send_frame && type != STREAM_MPEG ) {
|
||||
Debug( 3, "dUs: %d", delta_us );
|
||||
usleep( delta_us );
|
||||
|
@ -1498,7 +1387,7 @@ void EventStream::runStream() {
|
|||
} else {
|
||||
usleep( (unsigned long)((1000000 * ZM_RATE_BASE)/((base_fps?base_fps:1)*abs(replay_rate*2))) );
|
||||
}
|
||||
}
|
||||
} // end while ! zm_terminate
|
||||
#if HAVE_LIBAVCODEC
|
||||
if ( type == STREAM_MPEG )
|
||||
delete vid_stream;
|
||||
|
|
232
src/zm_image.cpp
|
@ -204,16 +204,32 @@ void Image::Initialise()
|
|||
fptr_blend = &std_blend;
|
||||
Debug(4,"Blend: Using standard blend function");
|
||||
}
|
||||
|
||||
__attribute__((aligned(64))) uint8_t blend1[128] = {
|
||||
86,58,54,63,149,62,209,34,148,46,186,176,9,236,193,254,113,146,228,220,123,164,92,98,9,72,67,156,63,118,96,167,
|
||||
48,224,106,176,201,245,223,219,198,50,100,31,68,77,33,76,166,90,254,128,191,82,84,32,3,171,147,248,14,196,141,179,
|
||||
79,237,121,11,132,37,194,225,45,171,169,167,56,64,193,85,147,33,97,221,94,97,90,44,191,248,65,8,17,240,167,207,
|
||||
224,23,71,74,81,1,46,110,227,94,163,170,55,155,52,147,224,154,237,35,255,26,229,11,223,242,118,155,82,37,189,2
|
||||
};
|
||||
__attribute__((aligned(64))) uint8_t blend2[128] = {
|
||||
92,188,203,118,121,231,252,218,126,88,80,72,123,16,91,131,109,0,57,56,95,204,74,8,137,94,6,69,18,146,229,194,
|
||||
146,230,13,146,95,48,185,65,162,47,152,172,184,111,245,143,247,105,49,42,89,37,145,255,221,200,103,80,98,39,14,227,
|
||||
227,46,46,59,248,7,83,20,157,79,36,161,237,55,77,175,232,200,38,170,198,239,89,19,82,88,130,120,203,184,141,117,
|
||||
228,140,150,107,103,195,74,130,42,11,150,70,176,204,198,188,38,252,174,104,128,106,31,17,141,231,62,104,179,29,143,130
|
||||
};
|
||||
__attribute__((aligned(64))) uint8_t blendexp[128] = {
|
||||
86,73,71,69,145,82,214,56,145,51,173,163,22,209,180,239,112,128,207,200,119,168,89,87,24,74,59,145,57,121,111,170,
|
||||
59,224,94,172,188,221,218,200,193,49,106,47,81,81,58,84,175,91,229,117,178,76,91,58,29,174,141,227,24,177,125,184,
|
||||
96,214,112,16,145,33,180,200,58,159,153,166,77,62,179,95,157,53,89,214,106,114,89,41,177,228,72,21,39,233,163,196,
|
||||
224,37,80,77,83,24,49,112,204,84,161,158,69,160,69,151,201,165,229,43,239,35,205,11,213,240,111,148,93,36,183,17
|
||||
};
|
||||
__attribute__((aligned(64))) uint8_t blendres[128];
|
||||
|
||||
__attribute__((aligned(16))) uint8_t blend1[16] = {142,255,159,91,88,227,0,52,37,80,152,97,104,252,90,82};
|
||||
__attribute__((aligned(16))) uint8_t blend2[16] = {129,56,136,96,119,149,94,29,96,176,1,144,230,203,111,172};
|
||||
__attribute__((aligned(16))) uint8_t blendres[16];
|
||||
__attribute__((aligned(16))) uint8_t blendexp[16] = {141,231,157,92,91,217,11,49,45,92,133,103,119,246,92,93}; /* Expected results for 12.5% blend */
|
||||
|
||||
(*fptr_blend)(blend1,blend2,blendres,16,12.5);
|
||||
/* Run the blend function */
|
||||
(*fptr_blend)(blend1,blend2,blendres,128,12.0);
|
||||
|
||||
/* Compare results with expected results */
|
||||
for(int i=0;i<16;i++) {
|
||||
for(int i=0;i<128;i++) {
|
||||
if(abs(blendexp[i] - blendres[i]) > 3) {
|
||||
Panic("Blend function failed self-test: Results differ from the expected results");
|
||||
}
|
||||
|
@ -238,15 +254,6 @@ void Image::Initialise()
|
|||
fptr_delta8_bgra = &sse2_delta8_bgra;
|
||||
fptr_delta8_argb = &sse2_delta8_argb;
|
||||
fptr_delta8_abgr = &sse2_delta8_abgr;
|
||||
/*
|
||||
** On some systems, the 4 SSE2 algorithms above might be a little slower than
|
||||
** the standard algorithms, especially on early Pentium 4 processors.
|
||||
** In that case, comment out the 4 lines above and uncomment the 4 lines below
|
||||
*/
|
||||
// fptr_delta8_rgba = &std_delta8_rgba;
|
||||
// fptr_delta8_bgra = &std_delta8_bgra;
|
||||
// fptr_delta8_argb = &std_delta8_argb;
|
||||
// fptr_delta8_abgr = &std_delta8_abgr;
|
||||
fptr_delta8_gray8 = &sse2_delta8_gray8;
|
||||
Debug(4,"Delta: Using SSE2 delta functions");
|
||||
} else if(neonversion >= 1) {
|
||||
|
@ -276,11 +283,55 @@ void Image::Initialise()
|
|||
Debug(4,"Delta: CPU extensions disabled, using standard delta functions");
|
||||
}
|
||||
|
||||
__attribute__((aligned(64))) uint8_t delta8_1[128] = {
|
||||
221,22,234,254,8,140,15,28,166,13,203,56,92,250,79,225,19,59,241,145,253,33,87,204,97,168,229,180,3,108,205,177,
|
||||
41,108,65,149,4,87,16,240,56,50,135,64,153,3,219,214,239,55,169,180,167,45,243,56,191,119,145,250,102,145,73,32,
|
||||
207,213,189,167,147,83,217,30,113,51,142,125,219,97,60,5,135,195,95,133,21,197,150,82,134,93,198,97,97,49,117,24,
|
||||
242,253,242,5,190,71,182,1,0,69,25,181,139,84,242,79,150,158,29,215,98,100,245,16,86,165,18,98,46,100,139,19
|
||||
};
|
||||
__attribute__((aligned(64))) uint8_t delta8_2[128] = {
|
||||
236,22,153,161,50,141,15,130,89,251,33,5,140,201,225,194,138,76,248,89,25,26,29,93,250,251,48,157,41,126,140,152,
|
||||
170,177,134,14,234,99,3,105,217,76,38,233,89,30,93,48,234,40,202,80,184,4,250,71,183,249,76,78,184,148,185,120,
|
||||
137,214,238,57,50,93,29,60,99,207,40,15,43,28,177,118,60,231,90,47,198,251,250,241,212,114,249,17,95,161,216,218,
|
||||
51,178,137,161,213,108,35,72,65,24,5,176,110,15,0,2,137,58,0,133,197,1,122,169,175,33,223,138,37,114,52,186
|
||||
};
|
||||
__attribute__((aligned(64))) uint8_t delta8_gray8_exp[128] = {
|
||||
15,0,81,93,42,1,0,102,77,238,170,51,48,49,146,31,119,17,7,56,228,7,58,111,153,83,181,23,38,18,65,25,
|
||||
129,69,69,135,230,12,13,135,161,26,97,169,64,27,126,166,5,15,33,100,17,41,7,15,8,130,69,172,82,3,112,88,
|
||||
70,1,49,110,97,10,188,30,14,156,102,110,176,69,117,113,75,36,5,86,177,54,100,159,78,21,51,80,2,112,99,194,
|
||||
191,75,105,156,23,37,147,71,65,45,20,5,29,69,242,77,13,100,29,82,99,99,123,153,89,132,205,40,9,14,87,167
|
||||
};
|
||||
__attribute__((aligned(64))) uint8_t delta8_rgba_exp[32] = {
|
||||
73,25,148,105,20,64,129,49,85,43,106,123,47,13,102,92,58,126,110,110,29,109,54,124,114,114,19,179,51,127,154,97
|
||||
};
|
||||
__attribute__((aligned(64))) uint8_t delta8_gray8_res[128];
|
||||
__attribute__((aligned(64))) uint8_t delta8_rgba_res[32];
|
||||
|
||||
/* Run the delta8 grayscale function */
|
||||
(*fptr_delta8_gray8)(delta8_1,delta8_2,delta8_gray8_exp,128);
|
||||
|
||||
/* Compare results with expected results */
|
||||
for(int i=0;i<128;i++) {
|
||||
if(abs(delta8_gray8_exp[i] - delta8_gray8_res[i]) > 7) {
|
||||
Panic("Delta grayscale function failed self-test: Results differ from the expected results");
|
||||
}
|
||||
}
|
||||
|
||||
/* Run the delta8 RGBA function */
|
||||
(*fptr_delta8_rgba)(delta8_1,delta8_2,delta8_rgba_exp,32);
|
||||
|
||||
/* Compare results with expected results */
|
||||
for(int i=0;i<32;i++) {
|
||||
if(abs(delta8_rgba_exp[i] - delta8_rgba_res[i]) > 7) {
|
||||
Panic("Delta RGBA function failed self-test: Results differ from the expected results");
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
SSSE3 deinterlacing functions were removed because they were usually equal
|
||||
or slower than the standard code (compiled with -O2 or better)
|
||||
The function is too complicated to be vectorized efficiently
|
||||
*/
|
||||
The function is too complicated to be vectorized efficiently on SSSE3
|
||||
*/
|
||||
fptr_deinterlace_4field_rgba = &std_deinterlace_4field_rgba;
|
||||
fptr_deinterlace_4field_bgra = &std_deinterlace_4field_bgra;
|
||||
fptr_deinterlace_4field_argb = &std_deinterlace_4field_argb;
|
||||
|
@ -1658,6 +1709,8 @@ Image *Image::Highlight( unsigned int n_images, Image *images[], const Rgb thres
|
|||
unsigned int size = result->size;
|
||||
for ( unsigned int c = 0; c < colours; c++ )
|
||||
{
|
||||
unsigned int ref_colour_rgb = RGB_VAL(ref_colour,c);
|
||||
|
||||
for ( unsigned int i = 0; i < size; i++ )
|
||||
{
|
||||
unsigned int count = 0;
|
||||
|
@ -1666,14 +1719,12 @@ Image *Image::Highlight( unsigned int n_images, Image *images[], const Rgb thres
|
|||
{
|
||||
uint8_t *psrc = images[j]->buffer+c;
|
||||
|
||||
#ifndef SOLARIS
|
||||
if ( (unsigned)abs((*psrc)-RGB_VAL(ref_colour,c)) >= RGB_VAL(threshold,c) )
|
||||
#else
|
||||
if ( (unsigned)std::abs((*psrc)-RGB_VAL(ref_colour,c)) >= RGB_VAL(threshold,c) )
|
||||
#endif
|
||||
{
|
||||
count++;
|
||||
}
|
||||
unsigned int diff = ((*psrc)-ref_colour_rgb) > 0 ? (*psrc)-ref_colour_rgb : ref_colour_rgb - (*psrc);
|
||||
|
||||
if (diff >= RGB_VAL(threshold,c))
|
||||
{
|
||||
count++;
|
||||
}
|
||||
psrc += colours;
|
||||
}
|
||||
*pdest = (count*255)/n_images;
|
||||
|
@ -3337,12 +3388,22 @@ void neon32_armv7_fastblend(const uint8_t* col1, const uint8_t* col2, uint8_t* r
|
|||
current_blendpercent = blendpercent;
|
||||
}
|
||||
|
||||
/* Q0(D0,D1) = col1 */
|
||||
/* Q1(D2,D3) = col2 */
|
||||
/* Q2(D4,D5) = col1 backup */
|
||||
/* Q3(D6,D7) = divider */
|
||||
/* Q0(D0,D1) = col1+0 */
|
||||
/* Q1(D2,D3) = col1+16 */
|
||||
/* Q2(D4,D5) = col1+32 */
|
||||
/* Q3(D6,D7) = col1+48 */
|
||||
/* Q4(D8,D9) = col2+0 */
|
||||
/* Q5(D10,D11) = col2+16 */
|
||||
/* Q6(D12,D13) = col2+32 */
|
||||
/* Q7(D14,D15) = col2+48 */
|
||||
/* Q8(D16,D17) = col1tmp+0 */
|
||||
/* Q9(D18,D19) = col1tmp+16 */
|
||||
/* Q10(D20,D21) = col1tmp+32 */
|
||||
/* Q11(D22,D23) = col1tmp+48 */
|
||||
/* Q12(D24,D25) = divider */
|
||||
|
||||
__asm__ __volatile__ (
|
||||
<<<<<<< HEAD
|
||||
"mov r12, %4\n\t"
|
||||
"vdup.8 q3, r12\n\t"
|
||||
"neon32_armv7_fastblend_iter:\n\t"
|
||||
|
@ -3359,6 +3420,38 @@ void neon32_armv7_fastblend(const uint8_t* col1, const uint8_t* col2, uint8_t* r
|
|||
: "r" (col1), "r" (col2), "r" (result), "r" (count), "g" (divider)
|
||||
: "%r12", "%q0", "%q1", "%q2", "%q3", "cc", "memory"
|
||||
);
|
||||
=======
|
||||
"mov r12, %4\n\t"
|
||||
"vdup.8 q12, r12\n\t"
|
||||
"neon32_armv7_fastblend_iter:\n\t"
|
||||
"pld [%0,#256]\n\t"
|
||||
"pld [%1,#256]\n\t"
|
||||
"vldm %0!, {q0,q1,q2,q3}\n\t"
|
||||
"vldm %1!, {q4,q5,q6,q7}\n\t"
|
||||
"vrshl.u8 q8, q0, q12\n\t"
|
||||
"vrshl.u8 q9, q1, q12\n\t"
|
||||
"vrshl.u8 q10, q2, q12\n\t"
|
||||
"vrshl.u8 q11, q3, q12\n\t"
|
||||
"vrshl.u8 q4, q4, q12\n\t"
|
||||
"vrshl.u8 q5, q5, q12\n\t"
|
||||
"vrshl.u8 q6, q6, q12\n\t"
|
||||
"vrshl.u8 q7, q7, q12\n\t"
|
||||
"vsub.i8 q4, q4, q8\n\t"
|
||||
"vsub.i8 q5, q5, q9\n\t"
|
||||
"vsub.i8 q6, q6, q10\n\t"
|
||||
"vsub.i8 q7, q7, q11\n\t"
|
||||
"vadd.i8 q4, q4, q0\n\t"
|
||||
"vadd.i8 q5, q5, q1\n\t"
|
||||
"vadd.i8 q6, q6, q2\n\t"
|
||||
"vadd.i8 q7, q7, q3\n\t"
|
||||
"vstm %2!, {q4,q5,q6,q7}\n\t"
|
||||
"subs %3, %3, #64\n\t"
|
||||
"bne neon32_armv7_fastblend_iter\n\t"
|
||||
:
|
||||
: "r" (col1), "r" (col2), "r" (result), "r" (count), "r" (divider)
|
||||
: "%r12", "%q0", "%q1", "%q2", "%q3", "%q4", "%q5", "%q6", "%q7", "%q8", "%q9", "%q10", "%q11", "%q12", "cc", "memory"
|
||||
);
|
||||
>>>>>>> master
|
||||
#else
|
||||
Panic("Neon function called on a non-ARM platform or Neon code is absent");
|
||||
#endif
|
||||
|
@ -3593,10 +3686,17 @@ __attribute__((noinline,__target__("fpu=neon")))
|
|||
void neon32_armv7_delta8_gray8(const uint8_t* col1, const uint8_t* col2, uint8_t* result, unsigned long count) {
|
||||
#if (defined(__arm__) && !defined(ZM_STRIP_NEON))
|
||||
|
||||
/* Q0(D0,D1) = col1 */
|
||||
/* Q1(D2,D3) = col2 */
|
||||
/* Q0(D0,D1) = col1+0 */
|
||||
/* Q1(D2,D3) = col1+16 */
|
||||
/* Q2(D4,D5) = col1+32 */
|
||||
/* Q3(D6,D7) = col1+48 */
|
||||
/* Q4(D8,D9) = col2+0 */
|
||||
/* Q5(D10,D11) = col2+16 */
|
||||
/* Q6(D12,D13) = col2+32 */
|
||||
/* Q7(D14,D15) = col2+48 */
|
||||
|
||||
__asm__ __volatile__ (
|
||||
<<<<<<< HEAD
|
||||
"neon32_armv7_delta8_gray8_iter:\n\t"
|
||||
"vldm %0!, {q0}\n\t"
|
||||
"vldm %1!, {q1}\n\t"
|
||||
|
@ -3608,6 +3708,24 @@ void neon32_armv7_delta8_gray8(const uint8_t* col1, const uint8_t* col2, uint8_t
|
|||
: "r" (col1), "r" (col2), "r" (result), "r" (count)
|
||||
: "%q0", "%q1", "cc", "memory"
|
||||
);
|
||||
=======
|
||||
"neon32_armv7_delta8_gray8_iter:\n\t"
|
||||
"pld [%0,#256]\n\t"
|
||||
"pld [%1,#256]\n\t"
|
||||
"vldm %0!, {q0,q1,q2,q3}\n\t"
|
||||
"vldm %1!, {q4,q5,q6,q7}\n\t"
|
||||
"vabd.u8 q0, q0, q4\n\t"
|
||||
"vabd.u8 q1, q1, q5\n\t"
|
||||
"vabd.u8 q2, q2, q6\n\t"
|
||||
"vabd.u8 q3, q3, q7\n\t"
|
||||
"vstm %2!, {q0,q1,q2,q3}\n\t"
|
||||
"subs %3, %3, #64\n\t"
|
||||
"bne neon32_armv7_delta8_gray8_iter\n\t"
|
||||
:
|
||||
: "r" (col1), "r" (col2), "r" (result), "r" (count)
|
||||
: "%q0", "%q1", "%q2", "%q3", "%q4", "%q5", "%q6", "%q7", "cc", "memory"
|
||||
);
|
||||
>>>>>>> master
|
||||
#else
|
||||
Panic("Neon function called on a non-ARM platform or Neon code is absent");
|
||||
#endif
|
||||
|
@ -3620,11 +3738,18 @@ __attribute__((noinline,__target__("fpu=neon")))
|
|||
void neon32_armv7_delta8_rgb32(const uint8_t* col1, const uint8_t* col2, uint8_t* result, unsigned long count, uint32_t multiplier) {
|
||||
#if (defined(__arm__) && !defined(ZM_STRIP_NEON))
|
||||
|
||||
/* Q0(D0,D1) = col1 */
|
||||
/* Q1(D2,D3) = col2 */
|
||||
/* Q2(D4,D5) = multiplier */
|
||||
/* Q0(D0,D1) = col1+0 */
|
||||
/* Q1(D2,D3) = col1+16 */
|
||||
/* Q2(D4,D5) = col1+32 */
|
||||
/* Q3(D6,D7) = col1+48 */
|
||||
/* Q4(D8,D9) = col2+0 */
|
||||
/* Q5(D10,D11) = col2+16 */
|
||||
/* Q6(D12,D13) = col2+32 */
|
||||
/* Q7(D14,D15) = col2+48 */
|
||||
/* Q8(D16,D17) = multiplier */
|
||||
|
||||
__asm__ __volatile__ (
|
||||
<<<<<<< HEAD
|
||||
"mov r12, %4\n\t"
|
||||
"vdup.32 q2, r12\n\t"
|
||||
"neon32_armv7_delta8_rgb32_iter:\n\t"
|
||||
|
@ -3643,6 +3768,43 @@ void neon32_armv7_delta8_rgb32(const uint8_t* col1, const uint8_t* col2, uint8_t
|
|||
: "r" (col1), "r" (col2), "r" (result), "r" (count), "r" (multiplier)
|
||||
: "%r12", "%q0", "%q1", "%q2", "cc", "memory"
|
||||
);
|
||||
=======
|
||||
"mov r12, %4\n\t"
|
||||
"vdup.32 q8, r12\n\t"
|
||||
"neon32_armv7_delta8_rgb32_iter:\n\t"
|
||||
"pld [%0,#256]\n\t"
|
||||
"pld [%1,#256]\n\t"
|
||||
"vldm %0!, {q0,q1,q2,q3}\n\t"
|
||||
"vldm %1!, {q4,q5,q6,q7}\n\t"
|
||||
"vabd.u8 q0, q0, q4\n\t"
|
||||
"vabd.u8 q1, q1, q5\n\t"
|
||||
"vabd.u8 q2, q2, q6\n\t"
|
||||
"vabd.u8 q3, q3, q7\n\t"
|
||||
"vrshr.u8 q0, q0, #3\n\t"
|
||||
"vrshr.u8 q1, q1, #3\n\t"
|
||||
"vrshr.u8 q2, q2, #3\n\t"
|
||||
"vrshr.u8 q3, q3, #3\n\t"
|
||||
"vmul.i8 q0, q0, q8\n\t"
|
||||
"vmul.i8 q1, q1, q8\n\t"
|
||||
"vmul.i8 q2, q2, q8\n\t"
|
||||
"vmul.i8 q3, q3, q8\n\t"
|
||||
"vpadd.i8 d0, d0, d1\n\t"
|
||||
"vpadd.i8 d2, d2, d3\n\t"
|
||||
"vpadd.i8 d4, d4, d5\n\t"
|
||||
"vpadd.i8 d6, d6, d7\n\t"
|
||||
"vpadd.i8 d0, d0, d0\n\t"
|
||||
"vpadd.i8 d1, d2, d2\n\t"
|
||||
"vpadd.i8 d2, d4, d4\n\t"
|
||||
"vpadd.i8 d3, d6, d6\n\t"
|
||||
"vst4.32 {d0[0],d1[0],d2[0],d3[0]}, [%2]!\n\t"
|
||||
"subs %3, %3, #16\n\t"
|
||||
"bne neon32_armv7_delta8_rgb32_iter\n\t"
|
||||
:
|
||||
: "r" (col1), "r" (col2), "r" (result), "r" (count), "r" (multiplier)
|
||||
: "%r12", "%q0", "%q1", "%q2", "%q3", "%q4", "%q5", "%q6", "%q7", "%q8", "cc", "memory"
|
||||
);
|
||||
}
|
||||
>>>>>>> master
|
||||
#else
|
||||
Panic("Neon function called on a non-ARM platform or Neon code is absent");
|
||||
#endif
|
||||
|
|
|
@ -54,7 +54,7 @@ extern imgbufcpy_fptr_t fptr_imgbufcpy;
|
|||
|
||||
/* Should be called from Image class functions */
|
||||
inline static uint8_t* AllocBuffer(size_t p_bufsize) {
|
||||
uint8_t* buffer = (uint8_t*)zm_mallocaligned(16,p_bufsize);
|
||||
uint8_t* buffer = (uint8_t*)zm_mallocaligned(64,p_bufsize);
|
||||
if(buffer == NULL)
|
||||
Fatal("Memory allocation failed: %s",strerror(errno));
|
||||
|
||||
|
|
|
@ -182,9 +182,9 @@ int LibvlcCamera::PrimeCapture()
|
|||
|
||||
mLibvlcData.bufferSize = width * height * mBpp;
|
||||
// Libvlc wants 32 byte alignment for images (should in theory do this for all image lines)
|
||||
mLibvlcData.buffer = (uint8_t*)zm_mallocaligned(32, mLibvlcData.bufferSize);
|
||||
mLibvlcData.prevBuffer = (uint8_t*)zm_mallocaligned(32, mLibvlcData.bufferSize);
|
||||
|
||||
mLibvlcData.buffer = (uint8_t*)zm_mallocaligned(64, mLibvlcData.bufferSize);
|
||||
mLibvlcData.prevBuffer = (uint8_t*)zm_mallocaligned(64, mLibvlcData.bufferSize);
|
||||
|
||||
mLibvlcData.newImage.setValueImmediate(false);
|
||||
|
||||
libvlc_media_player_play(mLibvlcMediaPlayer);
|
||||
|
|
|
@ -31,9 +31,9 @@
|
|||
#include <signal.h>
|
||||
#include <stdarg.h>
|
||||
#include <errno.h>
|
||||
#include <libgen.h>
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/thr.h>
|
||||
#include <libgen.h>
|
||||
#endif
|
||||
|
||||
bool Logger::smInitialised = false;
|
||||
|
@ -515,7 +515,8 @@ void Logger::logPrint( bool hex, const char * const filepath, const int line, co
|
|||
va_list argPtr;
|
||||
struct timeval timeVal;
|
||||
|
||||
const char * const file = basename(filepath);
|
||||
char *filecopy = strdup(filepath);
|
||||
const char * const file = basename(filecopy);
|
||||
const char *classString = smCodes[level].c_str();
|
||||
|
||||
if ( level < PANIC || level > DEBUG9 )
|
||||
|
@ -630,6 +631,7 @@ void Logger::logPrint( bool hex, const char * const filepath, const int line, co
|
|||
syslog( priority, "%s [%s] [%s]", classString, mId.c_str(), syslogStart );
|
||||
}
|
||||
|
||||
free(filecopy);
|
||||
if ( level <= FATAL )
|
||||
{
|
||||
if ( level <= PANIC )
|
||||
|
|
|
@ -148,7 +148,7 @@ bool Monitor::MonitorLink::connect() {
|
|||
return( false );
|
||||
}
|
||||
mem_ptr = (unsigned char *)shmat( shm_id, 0, 0 );
|
||||
if ( mem_ptr < 0 ) {
|
||||
if ( mem_ptr < (void *)0 ) {
|
||||
Debug( 3, "Can't shmat link memory: %s", strerror(errno) );
|
||||
connected = false;
|
||||
return( false );
|
||||
|
@ -374,7 +374,7 @@ Monitor::Monitor(
|
|||
+ sizeof(VideoStoreData) //Information to pass back to the capture process
|
||||
+ (image_buffer_count*sizeof(struct timeval))
|
||||
+ (image_buffer_count*camera->ImageSize())
|
||||
+ 64; /* Padding used to permit aligning the images buffer to 16 byte boundary */
|
||||
+ 64; /* Padding used to permit aligning the images buffer to 64 byte boundary */
|
||||
|
||||
Debug( 1, "mem.size=%d", mem_size );
|
||||
mem_ptr = NULL;
|
||||
|
@ -530,7 +530,7 @@ bool Monitor::connect() {
|
|||
exit( -1 );
|
||||
}
|
||||
mem_ptr = (unsigned char *)shmat( shm_id, 0, 0 );
|
||||
if ( mem_ptr < 0 ) {
|
||||
if ( mem_ptr < (void *)0 ) {
|
||||
Error( "Can't shmat: %s", strerror(errno));
|
||||
exit( -1 );
|
||||
}
|
||||
|
@ -541,10 +541,10 @@ bool Monitor::connect() {
|
|||
struct timeval *shared_timestamps = (struct timeval *)((char *)video_store_data + sizeof(VideoStoreData));
|
||||
unsigned char *shared_images = (unsigned char *)((char *)shared_timestamps + (image_buffer_count*sizeof(struct timeval)));
|
||||
|
||||
if(((unsigned long)shared_images % 16) != 0) {
|
||||
/* Align images buffer to nearest 16 byte boundary */
|
||||
Debug(3,"Aligning shared memory images to the next 16 byte boundary");
|
||||
shared_images = (uint8_t*)((unsigned long)shared_images + (16 - ((unsigned long)shared_images % 16)));
|
||||
if(((unsigned long)shared_images % 64) != 0) {
|
||||
/* Align images buffer to nearest 64 byte boundary */
|
||||
Debug(3,"Aligning shared memory images to the next 64 byte boundary");
|
||||
shared_images = (uint8_t*)((unsigned long)shared_images + (64 - ((unsigned long)shared_images % 64)));
|
||||
}
|
||||
Debug(3, "Allocating %d image buffers", image_buffer_count );
|
||||
image_buffer = new Snapshot[image_buffer_count];
|
||||
|
|
|
@ -222,9 +222,6 @@ VideoStore::VideoStore(const char *filename_in, const char *format_in,
|
|||
}
|
||||
}
|
||||
|
||||
//av_dict_set(&opts, "movflags", "frag_custom+dash+delay_moov", 0);
|
||||
//if ((ret = avformat_write_header(ctx, &opts)) < 0) {
|
||||
//}
|
||||
//os->ctx_inited = 1;
|
||||
//avio_flush(ctx->pb);
|
||||
//av_dict_free(&opts);
|
||||
|
@ -232,13 +229,24 @@ VideoStore::VideoStore(const char *filename_in, const char *format_in,
|
|||
if ( audio_output_stream )
|
||||
zm_dump_stream_format( oc, 1, 0, 1 );
|
||||
|
||||
/* Write the stream header, if any. */
|
||||
ret = avformat_write_header(oc, NULL);
|
||||
AVDictionary * opts = NULL;
|
||||
//av_dict_set(&opts, "movflags", "frag_custom+dash+delay_moov", 0);
|
||||
//av_dict_set(&opts, "movflags", "frag_custom+dash+delay_moov", 0);
|
||||
//av_dict_set(&opts, "movflags", "frag_keyframe+empty_moov+default_base_moof", 0);
|
||||
if ((ret = avformat_write_header(oc, &opts)) < 0) {
|
||||
Warning("Unable to set movflags to frag_custom+dash+delay_moov");
|
||||
/* Write the stream header, if any. */
|
||||
ret = avformat_write_header(oc, NULL);
|
||||
} else if (av_dict_count(opts) != 0) {
|
||||
Warning("some options not set\n");
|
||||
}
|
||||
if (ret < 0) {
|
||||
Error("Error occurred when writing output file header to %s: %s\n",
|
||||
filename,
|
||||
av_make_error_string(ret).c_str());
|
||||
}
|
||||
if ( opts )
|
||||
av_dict_free(&opts);
|
||||
|
||||
video_last_pts = 0;
|
||||
video_last_dts = 0;
|
||||
|
|
|
@ -141,11 +141,6 @@ int main( int argc, char *argv[] )
|
|||
{
|
||||
Info( "In mode %d/%d, warming up", monitor->GetFunction(), monitor->Enabled() );
|
||||
|
||||
if ( config.opt_frame_server )
|
||||
{
|
||||
Event::OpenFrameSocket( monitor->Id() );
|
||||
}
|
||||
|
||||
zmSetDefaultHupHandler();
|
||||
zmSetDefaultTermHandler();
|
||||
zmSetDefaultDieHandler();
|
||||
|
|
32
src/zmf.h
|
@ -1,32 +0,0 @@
|
|||
//
|
||||
// ZoneMinder Image File Write Class Interface, $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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
//
|
||||
|
||||
#ifndef ZMFILE_H
|
||||
#define ZMFILE_H
|
||||
|
||||
struct FrameHeader
|
||||
{
|
||||
unsigned long event_id;
|
||||
time_t event_time;
|
||||
unsigned long frame_id;
|
||||
bool alarm_frame;
|
||||
unsigned long image_length;
|
||||
};
|
||||
|
||||
#endif // ZMFILE_H
|
|
@ -1,252 +0,0 @@
|
|||
//
|
||||
// ZoneMinder Streamer, $Date: 2010-10-14 23:21:00 +0200 (Thu, 14 Oct 2010) $
|
||||
// Copyright (C) 2001-2010 Philip Coombes, Chris Kistner
|
||||
//
|
||||
// This program is based on revision 3143 of
|
||||
// http://svn.zoneminder.com/svn/zm/trunk/src/zms.cpp
|
||||
//
|
||||
// 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
/*
|
||||
|
||||
=head1 NAME
|
||||
|
||||
zmstreamer - eyeZM video streamer
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
zmstreamer -e <mode>
|
||||
zmstreamer -o <format>
|
||||
zmstreamer -u <buffer size>
|
||||
zmstreamer -f <maximum fps>
|
||||
zmstreamer -s <scale>
|
||||
zmstreamer -b <bitrate in bps>
|
||||
zmstreamer -m <monitor id>
|
||||
zmstreamer -d <debug mode>
|
||||
zmstreamer -i
|
||||
zmstreamer -?
|
||||
zmstreamer -h
|
||||
zmstreamer -v
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
*DEPRECIATED* The xml skin and all files associated with the xml skin are now
|
||||
depreciated. Please use the ZoneMinder API instead.
|
||||
|
||||
This binary works in conjunction with the XML skin to stream video to iPhones
|
||||
running the eyeZm app.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
-e <mode> - Specify output mode: mpeg/jpg/zip/single/raw.
|
||||
-o <format> - Specify output format.
|
||||
-u <buffer size> - Specify buffer size in ms.
|
||||
-f <maximum fps> - Specify maximum framerate.
|
||||
-s <scale> - Specify scale.
|
||||
-b <bitrate in bps> - Specify bitrate.
|
||||
-m <monitor id> - Specify monitor id.
|
||||
-d <debug mode> - 0 = off, 1 = no streaming, 2 = with streaming.
|
||||
-i, -?, -h - Display usage information
|
||||
-v - Print the installed version of ZoneMinder
|
||||
|
||||
=cut
|
||||
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/msg.h>
|
||||
|
||||
#include "zm.h"
|
||||
#include "zm_db.h"
|
||||
#include "zm_user.h"
|
||||
#include "zm_signal.h"
|
||||
#include "zm_monitor.h"
|
||||
#include "zm_stream.h"
|
||||
|
||||
// Possible command-line options
|
||||
#define OPTIONS "e:o:u:f:s:b:m:d:i:?:h:v"
|
||||
|
||||
// Default ZMS values
|
||||
#define ZMS_DEFAULT_DEBUG 0
|
||||
#define ZMS_DEFAULT_ID 1
|
||||
#define ZMS_DEFAULT_BITRATE 100000
|
||||
#define ZMS_DEFAULT_SCALE 100
|
||||
#define ZMS_DEFAULT_MODE "mpeg"
|
||||
#define ZMS_DEFAULT_FORMAT "asf"
|
||||
#define ZMS_DEFAULT_FPS 25.0
|
||||
#define ZMS_DEFAULT_BUFFER 1000
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
self = argv[0];
|
||||
// Set initial values to the default values
|
||||
int debug = ZMS_DEFAULT_DEBUG;
|
||||
int id = ZMS_DEFAULT_ID;
|
||||
int bitrate = ZMS_DEFAULT_BITRATE;
|
||||
int scale = ZMS_DEFAULT_SCALE;
|
||||
char mode[32];
|
||||
sprintf(mode, "%s", ZMS_DEFAULT_MODE);
|
||||
char format[32];
|
||||
sprintf(format, "%s", ZMS_DEFAULT_FORMAT);
|
||||
double maxfps = ZMS_DEFAULT_FPS;
|
||||
int buffer = ZMS_DEFAULT_BUFFER;
|
||||
|
||||
// Parse command-line options
|
||||
int arg;
|
||||
while ((arg = getopt(argc, argv, OPTIONS)) != -1) {
|
||||
switch (arg) {
|
||||
case 'e':
|
||||
sprintf(mode, "%s", optarg);
|
||||
break;
|
||||
case 'o':
|
||||
sprintf(format, "%s", optarg);
|
||||
break;
|
||||
case 'u':
|
||||
buffer = atoi(optarg);
|
||||
break;
|
||||
case 'f':
|
||||
maxfps = atof(optarg);
|
||||
break;
|
||||
case 's':
|
||||
scale = atoi(optarg);
|
||||
break;
|
||||
case 'b':
|
||||
bitrate = atoi(optarg);
|
||||
break;
|
||||
case 'm':
|
||||
id = atoi(optarg);
|
||||
break;
|
||||
case 'd':
|
||||
debug = atoi(optarg);
|
||||
break;
|
||||
case 'h':
|
||||
case 'i':
|
||||
case '?':
|
||||
printf("-e <mode> : Specify output mode: mpeg/jpg/zip/single/raw. Default = %s\n", ZMS_DEFAULT_MODE);
|
||||
printf("-o <format> : Specify output format. Default = %s\n", ZMS_DEFAULT_FORMAT);
|
||||
printf("-u <buffer size> : Specify buffer size in ms. Default = %d\n", ZMS_DEFAULT_BUFFER);
|
||||
printf("-f <maximum fps> : Specify maximum framerate. Default = %lf\n", ZMS_DEFAULT_FPS);
|
||||
printf("-s <scale> : Specify scale. Default = %d\n", ZMS_DEFAULT_SCALE);
|
||||
printf("-b <bitrate in bps> : Specify bitrate. Default = %d\n", ZMS_DEFAULT_BITRATE);
|
||||
printf("-m <monitor id> : Specify monitor id. Default = %d\n", ZMS_DEFAULT_ID);
|
||||
printf("-d <debug mode> : 0 = off, 1 = no streaming, 2 = with streaming. Default = 0\n");
|
||||
printf("-i or -? or -h: This information\n");
|
||||
printf("-v : This installed version of ZoneMinder\n");
|
||||
return EXIT_SUCCESS;
|
||||
case 'v':
|
||||
std::cout << ZM_VERSION << "\n";
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
// Set stream type
|
||||
StreamBase::StreamType streamtype;
|
||||
if (!strcasecmp("raw", mode))
|
||||
streamtype = MonitorStream::STREAM_RAW;
|
||||
else if (!strcasecmp("mpeg", mode))
|
||||
streamtype = MonitorStream::STREAM_MPEG;
|
||||
else if (!strcasecmp("jpg", mode))
|
||||
streamtype = MonitorStream::STREAM_JPEG;
|
||||
else if (!strcasecmp("single", mode))
|
||||
streamtype = MonitorStream::STREAM_SINGLE;
|
||||
else if (!strcasecmp("zip", mode))
|
||||
streamtype = MonitorStream::STREAM_ZIP;
|
||||
else
|
||||
streamtype = MonitorStream::STREAM_MPEG;
|
||||
|
||||
if (debug) {
|
||||
// Show stream parameters
|
||||
printf("Stream parameters:\n");
|
||||
switch (streamtype) {
|
||||
case MonitorStream::STREAM_MPEG:
|
||||
printf("Output mode (-e) = %s\n", "mpeg");
|
||||
printf("Output format (-o) = %s\n", format);
|
||||
break;
|
||||
default:
|
||||
printf("Output mode (-e) = %s\n", mode);
|
||||
}
|
||||
printf("Buffer size (-u) = %d ms\n", buffer);
|
||||
printf("Maximum FPS (-f) = %lf FPS\n", maxfps);
|
||||
printf("Scale (-s) = %d%%\n", scale);
|
||||
printf("Bitrate (-b) = %d bps\n", bitrate);
|
||||
printf("Monitor Id (-m) = %d\n", id);
|
||||
}
|
||||
|
||||
if (debug) {
|
||||
// Set ZM debugger to print to stdout
|
||||
printf("Setting up ZoneMinder debugger to print to stdout...");
|
||||
setenv("ZM_DBG_PRINT", "1", 1);
|
||||
printf("Done.\n");
|
||||
}
|
||||
|
||||
// Loading ZM configurations
|
||||
printf("Loading ZoneMinder configurations...");
|
||||
zmLoadConfig();
|
||||
printf("Done.\n");
|
||||
|
||||
logInit("zmstreamer");
|
||||
|
||||
hwcaps_detect();
|
||||
|
||||
// Setting stream parameters
|
||||
MonitorStream stream;
|
||||
stream.setStreamScale(scale); // default = 100 (scale)
|
||||
stream.setStreamReplayRate(100); // default = 100 (rate)
|
||||
stream.setStreamMaxFPS(maxfps); // default = 10 (maxfps)
|
||||
if (debug) stream.setStreamTTL(1);
|
||||
else stream.setStreamTTL(0); // default = 0 (ttl)
|
||||
stream.setStreamQueue(0); // default = 0 (connkey)
|
||||
stream.setStreamBuffer(buffer); // default = 0 (buffer)
|
||||
stream.setStreamStart(id); // default = 0 (monitor_id)
|
||||
stream.setStreamType(streamtype);
|
||||
if (streamtype == MonitorStream::STREAM_MPEG) {
|
||||
#if HAVE_LIBAVCODEC
|
||||
if (debug) printf("HAVE_LIBAVCODEC is set\n");
|
||||
stream.setStreamFormat(format); // default = "" (format)
|
||||
stream.setStreamBitrate(bitrate); // default = 100000 (bitrate)
|
||||
#else
|
||||
fprintf(stderr, "MPEG streaming is disabled.\nYou should configure with the --with-ffmpeg option and rebuild to use this functionality.\n");
|
||||
logTerm();
|
||||
zmDbClose();
|
||||
return EXIT_FAILURE;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (debug != 1) {
|
||||
if (debug) printf("Running stream...");
|
||||
|
||||
// Output headers
|
||||
fprintf(stdout, "Server: ZoneMinder Video Server/%s\r\n", ZM_VERSION);
|
||||
time_t now = time(0);
|
||||
char date_string[64];
|
||||
strftime(date_string, sizeof (date_string) - 1, "%a, %d %b %Y %H:%M:%S GMT", gmtime(&now));
|
||||
fprintf(stdout, "Expires: Mon, 26 Jul 1997 05:00:00 GMT\r\n");
|
||||
fprintf(stdout, "Last-Modified: %s\r\n", date_string);
|
||||
fprintf(stdout, "Cache-Control: no-store, no-cache, must-revalidate\r\n");
|
||||
fprintf(stdout, "Cache-Control: post-check=0, pre-check=0\r\n");
|
||||
fprintf(stdout, "Pragma: no-cache\r\n");
|
||||
|
||||
// Run stream
|
||||
stream.runStream();
|
||||
}
|
||||
if (debug) printf("Done.\n");
|
||||
|
||||
logTerm();
|
||||
zmDbClose();
|
||||
|
||||
return (EXIT_SUCCESS);
|
||||
}
|
|
@ -52,7 +52,9 @@ case $i in
|
|||
shift # past argument with no value
|
||||
;;
|
||||
*)
|
||||
# unknown option
|
||||
# unknown option
|
||||
read -p "Unknown option $i, continue? (Y|n)"
|
||||
[[ $REPLY == [yY] ]] && { echo "continuing..."; } || exit 1;
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
@ -61,6 +63,8 @@ DATE=`date -R`
|
|||
if [ "$TYPE" == "" ]; then
|
||||
echo "Defaulting to source build"
|
||||
TYPE="source";
|
||||
else
|
||||
echo "Doing $TYPE build"
|
||||
fi;
|
||||
|
||||
if [ "$DISTRO" == "" ]; then
|
||||
|
@ -79,6 +83,8 @@ if [ "$RELEASE" != "" ]; then
|
|||
if [ "$GITHUB_FORK" != "" ] && [ "$GITHUB_FORK" != "ZoneMinder" ]; then
|
||||
echo "Releases cannot have a fork ($GITHUB_FORK).... exiting."
|
||||
exit 0;
|
||||
else
|
||||
GITHUB_FORK="ZoneMinder";
|
||||
fi
|
||||
BRANCH="release-$RELEASE"
|
||||
else
|
||||
|
@ -127,11 +133,7 @@ else
|
|||
fi;
|
||||
|
||||
cd "${GITHUB_FORK}_zoneminder_release"
|
||||
if [ $RELEASE ]; then
|
||||
git checkout $RELEASE
|
||||
else
|
||||
git checkout $BRANCH
|
||||
fi;
|
||||
cd ../
|
||||
|
||||
VERSION=`cat ${GITHUB_FORK}_zoneminder_release/version`
|
||||
|
@ -146,6 +148,11 @@ fi;
|
|||
DIRECTORY="zoneminder_$VERSION";
|
||||
echo "Doing $TYPE release $DIRECTORY";
|
||||
mv "${GITHUB_FORK}_zoneminder_release" "$DIRECTORY.orig";
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error status code is: $?"
|
||||
echo "Setting up build dir failed.";
|
||||
exit $?;
|
||||
fi;
|
||||
cd "$DIRECTORY.orig";
|
||||
|
||||
git submodule init
|
||||
|
@ -214,6 +221,7 @@ else
|
|||
echo "Status: $?"
|
||||
DEBUILD="debuild -i -us -uc -b"
|
||||
else
|
||||
# Source build, don't need build depends.
|
||||
DEBUILD="debuild -S -sa"
|
||||
fi;
|
||||
fi;
|
||||
|
@ -230,10 +238,10 @@ fi;
|
|||
cd ../
|
||||
if [ "$INTERACTIVE" != "no" ]; then
|
||||
read -p "Do you want to keep the checked out version of Zoneminder (incase you want to modify it later) [y/N]"
|
||||
[[ $REPLY == [yY] ]] && { mv $DIRECTORY zoneminder_release; echo "The checked out copy is preserved in zoneminder_release"; } || { rm -fr $DIRECTORY; echo "The checked out copy has been deleted"; }
|
||||
[[ $REPLY == [yY] ]] && { mv "$DIRECTORY.orig" zoneminder_release; echo "The checked out copy is preserved in zoneminder_release"; } || { rm -fr "$DIRECTORY.orig"; echo "The checked out copy has been deleted"; }
|
||||
echo "Done!"
|
||||
else
|
||||
rm -fr $DIRECTORY; echo "The checked out copy has been deleted";
|
||||
rm -fr "$DIRECTORY.orig"; echo "The checked out copy has been deleted";
|
||||
fi
|
||||
|
||||
if [ $TYPE == "binary" ]; then
|
||||
|
@ -244,11 +252,19 @@ if [ $TYPE == "binary" ]; then
|
|||
sudo dpkg -i $DIRECTORY*.deb
|
||||
fi;
|
||||
if [ "$DISTRO" == "jessie" ]; then
|
||||
echo "Do you want to upload this binary to zmrepo? (y/N)"
|
||||
read install
|
||||
if [ "$install" == "Y" ]; then
|
||||
scp "zoneminder_*-${VERSION}-${DISTRO}*" "zmrepo@zmrepo.connortechnology.com:debian/${BRANCH}/mini-dinstall/incoming/"
|
||||
echo "Do you want to upload this binary to zmrepo? (y/N)"
|
||||
read install
|
||||
if [ "$install" == "Y" ]; then
|
||||
if [ "$RELEASE" != "" ]; then
|
||||
scp "zoneminder_${VERSION}-${DISTRO}*" "zmrepo@zmrepo.connortechnology.com:debian/stable/mini-dinstall/incoming/"
|
||||
else
|
||||
if [ "$BRANCH" == "" ]; then
|
||||
scp "zoneminder_${VERSION}-${DISTRO}*" "zmrepo@zmrepo.connortechnology.com:debian/master/mini-dinstall/incoming/"
|
||||
else
|
||||
scp "zoneminder_${VERSION}-${DISTRO}*" "zmrepo@zmrepo.connortechnology.com:debian/${BRANCH}/mini-dinstall/incoming/"
|
||||
fi;
|
||||
fi;
|
||||
fi;
|
||||
fi;
|
||||
fi;
|
||||
else
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Start MySQL
|
||||
/usr/bin/mysqld_safe &
|
||||
test -e /var/run/mysqld || install -m 755 -o mysql -g root -d /var/run/mysqld
|
||||
su - mysql -s /bin/sh -c "/usr/bin/mysqld_safe > /dev/null 2>&1 &"
|
||||
|
||||
|
||||
# Give MySQL time to wake up
|
||||
SECONDS_LEFT=120
|
||||
|
|
|
@ -7,7 +7,8 @@ umount /dev/shm
|
|||
mount -t tmpfs -o rw,nosuid,nodev,noexec,relatime,size=512M tmpfs /dev/shm
|
||||
|
||||
# Start MySQL
|
||||
/usr/bin/mysqld_safe &
|
||||
test -e /var/run/mysqld || install -m 755 -o mysql -g root -d /var/run/mysqld
|
||||
su - mysql -s /bin/sh -c "/usr/bin/mysqld_safe > /dev/null 2>&1 &"
|
||||
|
||||
# Ensure we shut down mysql cleanly later:
|
||||
trap close_mysql SIGTERM
|
||||
|
|
BIN
version.enc
|
@ -116,7 +116,7 @@ switch ( $data['type'] )
|
|||
session_start();
|
||||
$time = time();
|
||||
// Regenerate auth hash after half the lifetime of the hash
|
||||
if ( $_SESSION['AuthHashGeneratedAt'] < $time - (ZM_AUTH_HASH_TTL * 1800) ) {
|
||||
if ( (!isset($_SESSION['AuthHashGeneratedAt'])) or ( $_SESSION['AuthHashGeneratedAt'] < $time - (ZM_AUTH_HASH_TTL * 1800) ) ) {
|
||||
$data['auth'] = generateAuthHash( ZM_AUTH_HASH_IPS );
|
||||
}
|
||||
session_write_close();
|
||||
|
@ -134,7 +134,7 @@ switch ( $data['type'] )
|
|||
session_start();
|
||||
$time = time();
|
||||
// Regenerate auth hash after half the lifetime of the hash
|
||||
if ( $_SESSION['AuthHashGeneratedAt'] < $time - (ZM_AUTH_HASH_TTL * 1800) ) {
|
||||
if ( (!isset($_SESSION['AuthHashGeneratedAt'])) or ( $_SESSION['AuthHashGeneratedAt'] < $time - (ZM_AUTH_HASH_TTL * 1800) ) ) {
|
||||
$data['auth'] = generateAuthHash( ZM_AUTH_HASH_IPS );
|
||||
}
|
||||
session_write_close();
|
||||
|
|
Before Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 384 B |
Before Width: | Height: | Size: 61 B |
After Width: | Height: | Size: 137 B |
|
@ -126,7 +126,7 @@ class Event {
|
|||
} # ! ZM_OPT_FAST_DELETE
|
||||
} # end Event->delete
|
||||
|
||||
public function getStreamSrc( $args, $querySep='&' ) {
|
||||
public function getStreamSrc( $args=array(), $querySep='&' ) {
|
||||
if ( $this->{'DefaultVideo'} ) {
|
||||
return ( ZM_BASE_PATH != '/' ? ZM_BASE_PATH : '' ).'/index.php?view=view_video&eid='.$this->{'Id'};
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ $GLOBALS['csrf']['rewrite-js'] = false;
|
|||
* place it here. If you change this value, all previously generated tokens
|
||||
* will become invalid.
|
||||
*/
|
||||
$GLOBALS['csrf']['secret'] = '';
|
||||
$GLOBALS['csrf']['secret'] = ZM_AUTH_HASH_SECRET;
|
||||
// nota bene: library code should use csrf_get_secret() and not access
|
||||
// this global directly
|
||||
|
||||
|
@ -102,7 +102,7 @@ $GLOBALS['csrf']['user'] = false;
|
|||
* tokens, and have Squid ignore that cookie for get requests, for anonymous
|
||||
* users. (If you haven't guessed, this scheme was(?) used for MediaWiki).
|
||||
*/
|
||||
$GLOBALS['csrf']['key'] = false;
|
||||
$GLOBALS['csrf']['key'] = ZM_AUTH_HASH_SECRET;
|
||||
|
||||
/**
|
||||
* The name of the magic CSRF token that will be placed in all forms, i.e.
|
||||
|
@ -188,11 +188,23 @@ function csrf_check($fatal = true) {
|
|||
$ok = false;
|
||||
$tokens = '';
|
||||
do {
|
||||
if (!isset($_POST[$name])) break;
|
||||
if (!isset($_POST[$name])) {
|
||||
Debug("POST[$name] is not set");
|
||||
break;
|
||||
} else {
|
||||
Debug("POST[$name] is set as " . $_POST[$name] );
|
||||
|
||||
}
|
||||
// we don't regenerate a token and check it because some token creation
|
||||
// schemes are volatile.
|
||||
$tokens = $_POST[$name];
|
||||
if (!csrf_check_tokens($tokens)) break;
|
||||
if (!csrf_check_tokens($tokens)) {
|
||||
Debug("Failed checking tokens");
|
||||
break;
|
||||
|
||||
} else {
|
||||
Debug("Token passed");
|
||||
}
|
||||
$ok = true;
|
||||
} while (false);
|
||||
if ($fatal && !$ok) {
|
||||
|
@ -225,13 +237,13 @@ function csrf_get_tokens() {
|
|||
csrf_start();
|
||||
|
||||
// These are "strong" algorithms that don't require per se a secret
|
||||
if ($GLOBALS['csrf']['key']) return 'key:' . csrf_hash($GLOBALS['csrf']['key']) . $ip;
|
||||
if (session_id()) return 'sid:' . csrf_hash(session_id()) . $ip;
|
||||
if ($GLOBALS['csrf']['cookie']) {
|
||||
$val = csrf_generate_secret();
|
||||
setcookie($GLOBALS['csrf']['cookie'], $val);
|
||||
return 'cookie:' . csrf_hash($val) . $ip;
|
||||
}
|
||||
if ($GLOBALS['csrf']['key']) return 'key:' . csrf_hash($GLOBALS['csrf']['key']) . $ip;
|
||||
// These further algorithms require a server-side secret
|
||||
if (!$secret) return 'invalid';
|
||||
if ($GLOBALS['csrf']['user'] !== false) {
|
||||
|
@ -296,24 +308,41 @@ function csrf_check_tokens($tokens) {
|
|||
* Checks if a token is valid.
|
||||
*/
|
||||
function csrf_check_token($token) {
|
||||
if (strpos($token, ':') === false) return false;
|
||||
Debug("Checking CSRF token $token");
|
||||
if (strpos($token, ':') === false) {
|
||||
Debug("Checking CSRF token $token bad because no :");
|
||||
return false;
|
||||
}
|
||||
list($type, $value) = explode(':', $token, 2);
|
||||
if (strpos($value, ',') === false) return false;
|
||||
if (strpos($value, ',') === false) {
|
||||
Debug("Checking CSRF token $token bad because no ,");
|
||||
return false;
|
||||
}
|
||||
list($x, $time) = explode(',', $token, 2);
|
||||
if ($GLOBALS['csrf']['expires']) {
|
||||
if (time() > $time + $GLOBALS['csrf']['expires']) return false;
|
||||
if (time() > $time + $GLOBALS['csrf']['expires']) {
|
||||
Debug("Checking CSRF token $token bad because expired");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
switch ($type) {
|
||||
case 'sid':
|
||||
{
|
||||
Debug("Checking sid: $value === " . csrf_hash(session_id(), $time) );
|
||||
return $value === csrf_hash(session_id(), $time);
|
||||
}
|
||||
case 'cookie':
|
||||
$n = $GLOBALS['csrf']['cookie'];
|
||||
if (!$n) return false;
|
||||
if (!isset($_COOKIE[$n])) return false;
|
||||
return $value === csrf_hash($_COOKIE[$n], $time);
|
||||
case 'key':
|
||||
if (!$GLOBALS['csrf']['key']) return false;
|
||||
return $value === csrf_hash($GLOBALS['csrf']['key'], $time);
|
||||
if (!$GLOBALS['csrf']['key']) {
|
||||
Debug("Checking key: no key set" );
|
||||
return false;
|
||||
}
|
||||
Debug("Checking sid: $value === " . csrf_hash($GLOBALS['csrf']['key'], $time) );
|
||||
return $value === csrf_hash($GLOBALS['csrf']['key'], $time);
|
||||
// We could disable these 'weaker' checks if 'key' was set, but
|
||||
// that doesn't make me feel good then about the cookie-based
|
||||
// implementation.
|
||||
|
|
|
@ -118,7 +118,7 @@ function getAuthUser( $auth ) {
|
|||
}
|
||||
}
|
||||
|
||||
if ( $_SESSION['username'] ) {
|
||||
if ( isset( $_SESSION['username'] ) ) {
|
||||
# Most of the time we will be logged in already and the session will have our username, so we can significantly speed up our hash testing by only looking at our user.
|
||||
# Only really important if you have a lot of users.
|
||||
$sql = "SELECT * FROM Users WHERE Enabled = 1 AND Username='".$_SESSION['username']."'";
|
||||
|
@ -891,21 +891,12 @@ function zmaControl( $monitor, $mode=false ) {
|
|||
daemonControl( "stop", "zmtrack.pl", "-m ".$monitor['Id'] );
|
||||
}
|
||||
daemonControl( "stop", "zma", "-m ".$monitor['Id'] );
|
||||
if ( ZM_OPT_FRAME_SERVER ) {
|
||||
daemonControl( "stop", "zmf", "-m ".$monitor['Id'] );
|
||||
}
|
||||
} else {
|
||||
if ( $mode == "restart" ) {
|
||||
if ( ZM_OPT_CONTROL ) {
|
||||
daemonControl( "stop", "zmtrack.pl", "-m ".$monitor['Id'] );
|
||||
}
|
||||
daemonControl( "stop", "zma", "-m ".$monitor['Id'] );
|
||||
if ( ZM_OPT_FRAME_SERVER ) {
|
||||
daemonControl( "stop", "zmf", "-m ".$monitor['Id'] );
|
||||
}
|
||||
}
|
||||
if ( ZM_OPT_FRAME_SERVER ) {
|
||||
daemonControl( "start", "zmf", "-m ".$monitor['Id'] );
|
||||
}
|
||||
daemonControl( "start", "zma", "-m ".$monitor['Id'] );
|
||||
if ( ZM_OPT_CONTROL && $monitor['Controllable'] && $monitor['TrackMotion'] && ( $monitor['Function'] == 'Modect' || $monitor['Function'] == 'Mocord' ) ) {
|
||||
|
@ -1043,7 +1034,9 @@ function createVideo( $event, $format, $rate, $scale, $overwrite=false ) {
|
|||
$command .= " -s ".sprintf( "%.2f", ($scale/SCALE_BASE) );
|
||||
if ( $overwrite )
|
||||
$command .= " -o";
|
||||
$result = exec( escapeshellcmd( $command ), $output, $status );
|
||||
$command = escapeshellcmd( $command );
|
||||
$result = exec( $command, $output, $status );
|
||||
Debug("generating Video $command: result($result outptu:(".implode("\n", $output )." status($status");
|
||||
return( $status?"":rtrim($result) );
|
||||
}
|
||||
|
||||
|
|
|
@ -175,7 +175,9 @@ foreach ( getSkinIncludes( 'skin.php' ) as $includeFile )
|
|||
|
||||
if ( ZM_OPT_USE_AUTH && ZM_AUTH_HASH_LOGINS ) {
|
||||
if ( empty($user) && ! empty($_REQUEST['auth']) ) {
|
||||
Debug("Getting user from auth hash");
|
||||
if ( $authUser = getAuthUser( $_REQUEST['auth'] ) ) {
|
||||
Debug("Success Getting user from auth hash");
|
||||
userLogin( $authUser['Username'], $authUser['Password'], true );
|
||||
}
|
||||
} else if ( ! empty($user) ) {
|
||||
|
@ -206,6 +208,7 @@ require_once( 'includes/actions.php' );
|
|||
|
||||
# If I put this here, it protects all views and popups, but it has to go after actions.php because actions.php does the actual logging in.
|
||||
if ( ZM_OPT_USE_AUTH && ! isset($user) ) {
|
||||
Debug("Redirecting to login" );
|
||||
$view = 'login';
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ function logReport( level, message, file, line )
|
|||
return;
|
||||
|
||||
if ( arguments && arguments.callee && arguments.callee.caller && arguments.callee.caller.name )
|
||||
message += ' - '+arguments.callee.caller.caller.name+'()';
|
||||
message += ' - '+arguments.callee.caller.caller.name+'()';
|
||||
|
||||
if ( !debugReq )
|
||||
{
|
||||
|
@ -115,4 +115,4 @@ window.onerror =
|
|||
function( message, url, line )
|
||||
{
|
||||
logReport( "ERR", message, url, line );
|
||||
}
|
||||
};
|
||||
|
|
|
@ -84,7 +84,7 @@ var Overlay = new Class({
|
|||
showAnimation:function()
|
||||
{
|
||||
showOverlay();
|
||||
|
||||
|
||||
//console.log( "Showing overlay loading" );
|
||||
if ( !this.loading )
|
||||
{
|
||||
|
@ -116,7 +116,7 @@ function setupOverlays()
|
|||
overlay.getElements('.overlayCloser').each(
|
||||
function( closer )
|
||||
{
|
||||
closer.addEvent( 'click', function() { overlay.element.hide(); } )
|
||||
closer.addEvent( 'click', function() { overlay.element.hide(); } );
|
||||
}
|
||||
);
|
||||
overlay.overlayShow = function() { overlay.element.show(); };
|
||||
|
|
|
@ -822,14 +822,6 @@ $OLANG = array(
|
|||
'Prompt' => "Crează imagini analizate cu marcaje ale mişcării",
|
||||
'Help' => "Implicit, în cazul unei alarme, ZoneMinder înregistrează atât imaginile neprelucrate cât şi cele ce au fost analizate şi au zone marcate unde a fost detectată mişcare. Acest lucru poate fi foarte folositor la configurarea zonelor sau în analiza evenimentelor. Acest parametru permite oprirea înregistrării imaginilor cu zone de mişcare marcate."
|
||||
),
|
||||
'OPT_FRAME_SERVER' => array(
|
||||
'Prompt' => "Daemon-ul de analiză va scrie imaginile pe disc",
|
||||
'Help' => "În unele cazuri este posibil ca viteza de scriere a unui HDD sa fie atât de mică încat să cauzeze încetinirea daemon-ului de analiză în special în timpul evenimentelor cu multe cadre. Activarea acestei opţiuni porneşte daemon-ul de cadre (zmf) care va 'primi' imaginile de la daemon-ul de analiză şi le va scrie pe disc. Dacă această transmisie eşuează sau apar alte erori, funcţia de scriere va reveni daemon-ului de analiză."
|
||||
),
|
||||
'FRAME_SOCKET_SIZE' => array(
|
||||
'Prompt' => "Specificaţi dimensiunea memoriei tampon",
|
||||
'Help' => "Pentru imaginile de dimensiuni mari capturate este posibil ca scrierea lor pe disc să eşueze deoarece cantitatea de informaţie scrisă este mai mare decât memoria tampon alocată. Deşi imaginile sunt scrise apoi de către daemon-ul de analiză, se distruge obiectul daemon-ului de cadre. Puteţi folosi această opţiune pentru a specifica o memorie tampon de dimensiuni mai mari. Va trebui sa modificaţi dimensiunea socket-ului tampon maxim folosind 'sysctl' (sau in /proc/sys/net/core/wmem_max) pentru a permite setarea acestei noi valori. Alternativa este să schimbaţi mărimea implicită a memorie tampon a sistemului, caz în care modificarea acestei valori nu mai este necesară."
|
||||
),
|
||||
'OPT_CONTROL' => array(
|
||||
'Prompt' => "Suport camere controlabile (rotire/înclinare/zoom)",
|
||||
'Help' => "ZoneMinder include suport limitat pentru camere controlabile. Sunt incluse câteva protocoale mostră şi pot fi adăugate cu uşurinţă şi altele. Dacă vreţi să controlaţi camerele prin intermediul ZoneMinder selectaţi această opţiune."
|
||||
|
|
|
@ -80,8 +80,8 @@
|
|||
border: 1px solid #006699;
|
||||
text-align: center;
|
||||
padding: 1px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
width: 102px;
|
||||
height: 102px;
|
||||
}
|
||||
|
||||
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .arrowBtn {
|
||||
|
|
|
@ -80,8 +80,8 @@
|
|||
border: 1px solid #006699;
|
||||
text-align: center;
|
||||
padding: 1px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
width: 102px;
|
||||
height: 102px;
|
||||
}
|
||||
|
||||
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .arrowBtn {
|
||||
|
|
Before Width: | Height: | Size: 293 B |
After Width: | Height: | Size: 313 B |
Before Width: | Height: | Size: 232 B |
After Width: | Height: | Size: 321 B |
Before Width: | Height: | Size: 263 B |
After Width: | Height: | Size: 324 B |
Before Width: | Height: | Size: 538 B |
After Width: | Height: | Size: 520 B |
Before Width: | Height: | Size: 524 B |
After Width: | Height: | Size: 479 B |
Before Width: | Height: | Size: 284 B |
After Width: | Height: | Size: 304 B |
Before Width: | Height: | Size: 265 B |
After Width: | Height: | Size: 299 B |
Before Width: | Height: | Size: 206 B |
After Width: | Height: | Size: 237 B |
Before Width: | Height: | Size: 203 B |
After Width: | Height: | Size: 234 B |
Before Width: | Height: | Size: 278 B |
After Width: | Height: | Size: 297 B |
Before Width: | Height: | Size: 286 B |
After Width: | Height: | Size: 332 B |
Before Width: | Height: | Size: 282 B |
After Width: | Height: | Size: 337 B |
Before Width: | Height: | Size: 621 B |
After Width: | Height: | Size: 641 B |
Before Width: | Height: | Size: 76 B |
After Width: | Height: | Size: 156 B |
Before Width: | Height: | Size: 76 B |
After Width: | Height: | Size: 156 B |
Before Width: | Height: | Size: 76 B |
After Width: | Height: | Size: 156 B |
Before Width: | Height: | Size: 68 B |
After Width: | Height: | Size: 165 B |
Before Width: | Height: | Size: 68 B |
After Width: | Height: | Size: 162 B |
|
@ -98,10 +98,10 @@ var $j = jQuery.noConflict();
|
|||
<script src='https://www.google.com/recaptcha/api.js'></script>
|
||||
<?php } else if ( $title == 'Event' ) {
|
||||
?>
|
||||
<link href="skins/<?php echo $skin; ?>/js/video-js.css" rel="stylesheet">
|
||||
<script src="skins/<?php echo $skin; ?>/js/video.js"></script>
|
||||
<link href="skins/<?php echo $skin ?>/js/video-js.css" rel="stylesheet">
|
||||
<script src="skins/<?php echo $skin ?>/js/video.js"></script>
|
||||
<script src="./js/videojs.zoomrotate.js"></script>
|
||||
<script src="skins/<?php echo $skin; ?>/js/moment.min.js"></script>
|
||||
<script src="skins/<?php echo $skin ?>/js/moment.min.js"></script>
|
||||
<?php
|
||||
}
|
||||
if ( $skinJsPhpFile )
|
||||
|
|
|
@ -33,7 +33,7 @@ var popupSizes = {
|
|||
'device': { 'width': 260, 'height': 150 },
|
||||
'devices': { 'width': 400, 'height': 240 },
|
||||
'donate': { 'width': 500, 'height': 280 },
|
||||
'event': { 'addWidth': 108, 'minWidth': 496, 'addHeight': 230, minHeight: 540 },
|
||||
'event': { 'addWidth': 108, 'minWidth': 496, 'addHeight': 230, 'minHeight': 540 },
|
||||
'eventdetail': { 'width': 600, 'height': 220 },
|
||||
'events': { 'width': 960, 'height': 780 },
|
||||
'export': { 'width': 400, 'height': 340 },
|
||||
|
|
|
@ -33,7 +33,7 @@ var popupSizes = {
|
|||
'device': { 'width': 260, 'height': 150 },
|
||||
'devices': { 'width': 400, 'height': 240 },
|
||||
'donate': { 'width': 500, 'height': 280 },
|
||||
'event': { 'addWidth': 108, 'minWidth': 496, 'addHeight': 230, minHeight: 540 },
|
||||
'event': { 'addWidth': 108, 'minWidth': 496, 'addHeight': 230, 'minHeight': 540 },
|
||||
'eventdetail': { 'width': 600, 'height': 220 },
|
||||
'events': { 'width': 960, 'height': 780 },
|
||||
'export': { 'width': 400, 'height': 340 },
|
||||
|
|
|
@ -33,7 +33,7 @@ var popupSizes = {
|
|||
'device': { 'width': 260, 'height': 150 },
|
||||
'devices': { 'width': 400, 'height': 240 },
|
||||
'donate': { 'width': 500, 'height': 280 },
|
||||
'event': { 'addWidth': 108, 'minWidth': 496, 'addHeight': 230, minHeight: 540 },
|
||||
'event': { 'addWidth': 108, 'minWidth': 496, 'addHeight': 230, 'minHeight': 540 },
|
||||
'eventdetail': { 'width': 600, 'height': 220 },
|
||||
'events': { 'width': 1220, 'height': 780 },
|
||||
'export': { 'width': 400, 'height': 340 },
|
||||
|
|
|
@ -31,11 +31,11 @@ function checkSize() {
|
|||
var h = window.outerHeight;
|
||||
var prevH = h;
|
||||
if (h > screen.availHeight)
|
||||
h = screen.availHeight;
|
||||
h = screen.availHeight;
|
||||
if (w > screen.availWidth)
|
||||
w = screen.availWidth;
|
||||
w = screen.availWidth;
|
||||
if (w != prevW || h != prevH)
|
||||
window.resizeTo(w,h);
|
||||
window.resizeTo(w, h);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ function getPopupSize( tag, width, height )
|
|||
if ( popupSize.width && popupSize.height )
|
||||
{
|
||||
if ( width || height )
|
||||
Warning( "Ignoring passed dimensions "+width+"x"+height+" when getting popup size for tag '"+tag+"'" );
|
||||
Warning( "Ignoring passed dimensions "+width+"x"+height+" when getting popup size for tag '"+tag+"'" );
|
||||
return( popupSize );
|
||||
}
|
||||
if ( popupSize.addWidth )
|
||||
|
|
|
@ -0,0 +1,165 @@
|
|||
/*! Video.js v4.11.4 Copyright 2014 Brightcove, Inc. https://github.com/videojs/video.js/blob/master/LICENSE */
|
||||
(function() {var b=void 0,f=!0,k=null,l=!1;function m(){return function(){}}function n(a){return function(){return this[a]}}function r(a){return function(){return a}}var s;document.createElement("video");document.createElement("audio");document.createElement("track");function t(a,c,d){if("string"===typeof a){0===a.indexOf("#")&&(a=a.slice(1));if(t.Ga[a])return t.Ga[a];a=t.w(a)}if(!a||!a.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");return a.player||new t.Player(a,c,d)}
|
||||
var videojs=window.videojs=t;t.bc="4.11";t.ed="https:"==document.location.protocol?"https://":"http://";
|
||||
t.options={techOrder:["html5","flash"],html5:{},flash:{},width:300,height:150,defaultVolume:0,playbackRates:[],inactivityTimeout:2E3,children:{mediaLoader:{},posterImage:{},textTrackDisplay:{},loadingSpinner:{},bigPlayButton:{},controlBar:{},errorDisplay:{}},language:document.getElementsByTagName("html")[0].getAttribute("lang")||navigator.languages&&navigator.languages[0]||navigator.Ke||navigator.language||"en",languages:{},notSupportedMessage:"No compatible source was found for this video."};
|
||||
"GENERATED_CDN_VSN"!==t.bc&&(videojs.options.flash.swf=t.ed+"vjs.zencdn.net/"+t.bc+"/video-js.swf");t.sd=function(a,c){t.options.languages[a]=t.options.languages[a]!==b?t.W.pa(t.options.languages[a],c):c;return t.options.languages};t.Ga={};"function"===typeof define&&define.amd?define([],function(){return videojs}):"object"===typeof exports&&"object"===typeof module&&(module.exports=videojs);t.va=t.CoreObject=m();
|
||||
t.va.extend=function(a){var c,d;a=a||{};c=a.init||a.i||this.prototype.init||this.prototype.i||m();d=function(){c.apply(this,arguments)};d.prototype=t.h.create(this.prototype);d.prototype.constructor=d;d.extend=t.va.extend;d.create=t.va.create;for(var e in a)a.hasOwnProperty(e)&&(d.prototype[e]=a[e]);return d};t.va.create=function(){var a=t.h.create(this.prototype);this.apply(a,arguments);return a};
|
||||
t.c=function(a,c,d){if(t.h.isArray(c))return u(t.c,a,c,d);var e=t.getData(a);e.C||(e.C={});e.C[c]||(e.C[c]=[]);d.q||(d.q=t.q++);e.C[c].push(d);e.X||(e.disabled=l,e.X=function(c){if(!e.disabled){c=t.Cc(c);var d=e.C[c.type];if(d)for(var d=d.slice(0),j=0,p=d.length;j<p&&!c.Jc();j++)d[j].call(a,c)}});1==e.C[c].length&&(a.addEventListener?a.addEventListener(c,e.X,l):a.attachEvent&&a.attachEvent("on"+c,e.X))};
|
||||
t.k=function(a,c,d){if(t.Ec(a)){var e=t.getData(a);if(e.C){if(t.h.isArray(c))return u(t.k,a,c,d);if(c){var g=e.C[c];if(g){if(d){if(d.q)for(e=0;e<g.length;e++)g[e].q===d.q&&g.splice(e--,1)}else e.C[c]=[];t.sc(a,c)}}else for(g in e.C)c=g,e.C[c]=[],t.sc(a,c)}}};t.sc=function(a,c){var d=t.getData(a);0===d.C[c].length&&(delete d.C[c],a.removeEventListener?a.removeEventListener(c,d.X,l):a.detachEvent&&a.detachEvent("on"+c,d.X));t.Ob(d.C)&&(delete d.C,delete d.X,delete d.disabled);t.Ob(d)&&t.Sc(a)};
|
||||
t.Cc=function(a){function c(){return f}function d(){return l}if(!a||!a.Pb){var e=a||window.event;a={};for(var g in e)"layerX"!==g&&("layerY"!==g&&"keyLocation"!==g)&&("returnValue"==g&&e.preventDefault||(a[g]=e[g]));a.target||(a.target=a.srcElement||document);a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;a.preventDefault=function(){e.preventDefault&&e.preventDefault();a.returnValue=l;a.Nd=c;a.defaultPrevented=f};a.Nd=d;a.defaultPrevented=l;a.stopPropagation=function(){e.stopPropagation&&
|
||||
e.stopPropagation();a.cancelBubble=f;a.Pb=c};a.Pb=d;a.stopImmediatePropagation=function(){e.stopImmediatePropagation&&e.stopImmediatePropagation();a.Jc=c;a.stopPropagation()};a.Jc=d;if(a.clientX!=k){g=document.documentElement;var h=document.body;a.pageX=a.clientX+(g&&g.scrollLeft||h&&h.scrollLeft||0)-(g&&g.clientLeft||h&&h.clientLeft||0);a.pageY=a.clientY+(g&&g.scrollTop||h&&h.scrollTop||0)-(g&&g.clientTop||h&&h.clientTop||0)}a.which=a.charCode||a.keyCode;a.button!=k&&(a.button=a.button&1?0:a.button&
|
||||
4?1:a.button&2?2:0)}return a};t.l=function(a,c){var d=t.Ec(a)?t.getData(a):{},e=a.parentNode||a.ownerDocument;"string"===typeof c&&(c={type:c,target:a});c=t.Cc(c);d.X&&d.X.call(a,c);if(e&&!c.Pb()&&c.bubbles!==l)t.l(e,c);else if(!e&&!c.defaultPrevented&&(d=t.getData(c.target),c.target[c.type])){d.disabled=f;if("function"===typeof c.target[c.type])c.target[c.type]();d.disabled=l}return!c.defaultPrevented};
|
||||
t.Q=function(a,c,d){function e(){t.k(a,c,e);d.apply(this,arguments)}if(t.h.isArray(c))return u(t.Q,a,c,d);e.q=d.q=d.q||t.q++;t.c(a,c,e)};function u(a,c,d,e){t.pc.forEach(d,function(d){a(c,d,e)})}var v=Object.prototype.hasOwnProperty;t.e=function(a,c){var d;c=c||{};d=document.createElement(a||"div");t.h.Y(c,function(a,c){-1!==a.indexOf("aria-")||"role"==a?d.setAttribute(a,c):d[a]=c});return d};t.ba=function(a){return a.charAt(0).toUpperCase()+a.slice(1)};t.h={};
|
||||
t.h.create=Object.create||function(a){function c(){}c.prototype=a;return new c};t.h.Y=function(a,c,d){for(var e in a)v.call(a,e)&&c.call(d||this,e,a[e])};t.h.z=function(a,c){if(!c)return a;for(var d in c)v.call(c,d)&&(a[d]=c[d]);return a};t.h.Ad=function(a,c){var d,e,g;a=t.h.copy(a);for(d in c)v.call(c,d)&&(e=a[d],g=c[d],a[d]=t.h.ab(e)&&t.h.ab(g)?t.h.Ad(e,g):c[d]);return a};t.h.copy=function(a){return t.h.z({},a)};
|
||||
t.h.ab=function(a){return!!a&&"object"===typeof a&&"[object Object]"===a.toString()&&a.constructor===Object};t.h.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};t.Pd=function(a){return a!==a};t.bind=function(a,c,d){function e(){return c.apply(a,arguments)}c.q||(c.q=t.q++);e.q=d?d+"_"+c.q:c.q;return e};t.ya={};t.q=1;t.expando="vdata"+(new Date).getTime();t.getData=function(a){var c=a[t.expando];c||(c=a[t.expando]=t.q++,t.ya[c]={});return t.ya[c]};
|
||||
t.Ec=function(a){a=a[t.expando];return!(!a||t.Ob(t.ya[a]))};t.Sc=function(a){var c=a[t.expando];if(c){delete t.ya[c];try{delete a[t.expando]}catch(d){a.removeAttribute?a.removeAttribute(t.expando):a[t.expando]=k}}};t.Ob=function(a){for(var c in a)if(a[c]!==k)return l;return f};t.$a=function(a,c){return-1!==(" "+a.className+" ").indexOf(" "+c+" ")};t.n=function(a,c){t.$a(a,c)||(a.className=""===a.className?c:a.className+" "+c)};
|
||||
t.r=function(a,c){var d,e;if(t.$a(a,c)){d=a.className.split(" ");for(e=d.length-1;0<=e;e--)d[e]===c&&d.splice(e,1);a.className=d.join(" ")}};t.A=t.e("video");t.N=navigator.userAgent;t.md=/iPhone/i.test(t.N);t.ld=/iPad/i.test(t.N);t.nd=/iPod/i.test(t.N);t.kd=t.md||t.ld||t.nd;var aa=t,x;var y=t.N.match(/OS (\d+)_/i);x=y&&y[1]?y[1]:b;aa.Ae=x;t.hd=/Android/i.test(t.N);var ba=t,z;var A=t.N.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i),B,C;
|
||||
A?(B=A[1]&&parseFloat(A[1]),C=A[2]&&parseFloat(A[2]),z=B&&C?parseFloat(A[1]+"."+A[2]):B?B:k):z=k;ba.ac=z;t.od=t.hd&&/webkit/i.test(t.N)&&2.3>t.ac;t.jd=/Firefox/i.test(t.N);t.Be=/Chrome/i.test(t.N);t.wb=!!("ontouchstart"in window||window.gd&&document instanceof window.gd);t.fd="backgroundSize"in t.A.style;t.Uc=function(a,c){t.h.Y(c,function(c,e){e===k||"undefined"===typeof e||e===l?a.removeAttribute(c):a.setAttribute(c,e===f?"":e)})};
|
||||
t.Ea=function(a){var c,d,e,g;c={};if(a&&a.attributes&&0<a.attributes.length){d=a.attributes;for(var h=d.length-1;0<=h;h--){e=d[h].name;g=d[h].value;if("boolean"===typeof a[e]||-1!==",autoplay,controls,loop,muted,default,".indexOf(","+e+","))g=g!==k?f:l;c[e]=g}}return c};
|
||||
t.He=function(a,c){var d="";document.defaultView&&document.defaultView.getComputedStyle?d=document.defaultView.getComputedStyle(a,"").getPropertyValue(c):a.currentStyle&&(d=a["client"+c.substr(0,1).toUpperCase()+c.substr(1)]+"px");return d};t.Nb=function(a,c){c.firstChild?c.insertBefore(a,c.firstChild):c.appendChild(a)};t.Va={};t.w=function(a){0===a.indexOf("#")&&(a=a.slice(1));return document.getElementById(a)};
|
||||
t.Da=function(a,c){c=c||a;var d=Math.floor(a%60),e=Math.floor(a/60%60),g=Math.floor(a/3600),h=Math.floor(c/60%60),j=Math.floor(c/3600);if(isNaN(a)||Infinity===a)g=e=d="-";g=0<g||0<j?g+":":"";return g+(((g||10<=h)&&10>e?"0"+e:e)+":")+(10>d?"0"+d:d)};t.ud=function(){document.body.focus();document.onselectstart=r(l)};t.ve=function(){document.onselectstart=r(f)};t.trim=function(a){return(a+"").replace(/^\s+|\s+$/g,"")};t.round=function(a,c){c||(c=0);return Math.round(a*Math.pow(10,c))/Math.pow(10,c)};
|
||||
t.Eb=function(a,c){return{length:1,start:function(){return a},end:function(){return c}}};t.je=function(a){try{var c=window.localStorage||l;c&&(c.volume=a)}catch(d){22==d.code||1014==d.code?t.log("LocalStorage Full (VideoJS)",d):18==d.code?t.log("LocalStorage not allowed (VideoJS)",d):t.log("LocalStorage Error (VideoJS)",d)}};t.Jd=function(a){a.match(/^https?:\/\//)||(a=t.e("div",{innerHTML:'<a href="'+a+'">x</a>'}).firstChild.href);return a};
|
||||
t.fe=function(a){var c,d,e,g;g="protocol hostname port pathname search hash host".split(" ");d=t.e("a",{href:a});if(e=""===d.host&&"file:"!==d.protocol)c=t.e("div"),c.innerHTML='<a href="'+a+'"></a>',d=c.firstChild,c.setAttribute("style","display:none; position:absolute;"),document.body.appendChild(c);a={};for(var h=0;h<g.length;h++)a[g[h]]=d[g[h]];e&&document.body.removeChild(c);return a};
|
||||
function D(a,c){var d,e;d=Array.prototype.slice.call(c);e=m();e=window.console||{log:e,warn:e,error:e};a?d.unshift(a.toUpperCase()+":"):a="log";t.log.history.push(d);d.unshift("VIDEOJS:");if(e[a].apply)e[a].apply(e,d);else e[a](d.join(" "))}t.log=function(){D(k,arguments)};t.log.history=[];t.log.error=function(){D("error",arguments)};t.log.warn=function(){D("warn",arguments)};
|
||||
t.Hd=function(a){var c,d;a.getBoundingClientRect&&a.parentNode&&(c=a.getBoundingClientRect());if(!c)return{left:0,top:0};a=document.documentElement;d=document.body;return{left:t.round(c.left+(window.pageXOffset||d.scrollLeft)-(a.clientLeft||d.clientLeft||0)),top:t.round(c.top+(window.pageYOffset||d.scrollTop)-(a.clientTop||d.clientTop||0))}};t.pc={};t.pc.forEach=function(a,c,d){if(t.h.isArray(a)&&c instanceof Function)for(var e=0,g=a.length;e<g;++e)c.call(d||t,a[e],e,a);return a};
|
||||
t.ye=function(a,c){var d,e,g,h,j,p,q;"string"===typeof a&&(a={uri:a});videojs.W.pa({method:"GET",timeout:45E3},a);c=c||m();p=function(){window.clearTimeout(j);c(k,e,e.response||e.responseText)};q=function(a){window.clearTimeout(j);if(!a||"string"===typeof a)a=Error(a);c(a,e)};d=window.XMLHttpRequest;"undefined"===typeof d&&(d=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(c){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(d){}throw Error("This browser does not support XMLHttpRequest.");
|
||||
});e=new d;e.uri=a.uri;d=t.fe(a.uri);g=window.location;d.protocol+d.host!==g.protocol+g.host&&window.XDomainRequest&&!("withCredentials"in e)?(e=new window.XDomainRequest,e.onload=p,e.onerror=q,e.onprogress=m(),e.ontimeout=m()):(h="file:"==d.protocol||"file:"==g.protocol,e.onreadystatechange=function(){if(4===e.readyState){if(e.te)return q("timeout");200===e.status||h&&0===e.status?p():q()}},a.timeout&&(j=window.setTimeout(function(){4!==e.readyState&&(e.te=f,e.abort())},a.timeout)));try{e.open(a.method||
|
||||
"GET",a.uri,f)}catch(w){q(w);return}a.withCredentials&&(e.withCredentials=f);a.responseType&&(e.responseType=a.responseType);try{e.send()}catch(ja){q(ja)}};t.W={};t.W.pa=function(a,c){var d,e,g;a=t.h.copy(a);for(d in c)c.hasOwnProperty(d)&&(e=a[d],g=c[d],a[d]=t.h.ab(e)&&t.h.ab(g)?t.W.pa(e,g):c[d]);return a};
|
||||
t.a=t.va.extend({i:function(a,c,d){this.d=a;this.m=t.h.copy(this.m);c=this.options(c);this.K=c.id||c.el&&c.el.id;this.K||(this.K=(a.id&&a.id()||"no_player")+"_component_"+t.q++);this.Vd=c.name||k;this.b=c.el||this.e();this.O=[];this.Xa={};this.Ya={};this.Gc();this.H(d);if(c.Tc!==l){var e,g;this.j().reportUserActivity&&(e=t.bind(this.j(),this.j().reportUserActivity),this.c("touchstart",function(){e();this.clearInterval(g);g=this.setInterval(e,250)}),a=function(){e();this.clearInterval(g)},this.c("touchmove",
|
||||
e),this.c("touchend",a),this.c("touchcancel",a))}}});s=t.a.prototype;s.dispose=function(){this.l({type:"dispose",bubbles:l});if(this.O)for(var a=this.O.length-1;0<=a;a--)this.O[a].dispose&&this.O[a].dispose();this.Ya=this.Xa=this.O=k;this.k();this.b.parentNode&&this.b.parentNode.removeChild(this.b);t.Sc(this.b);this.b=k};s.d=f;s.j=n("d");s.options=function(a){return a===b?this.m:this.m=t.W.pa(this.m,a)};s.e=function(a,c){return t.e(a,c)};
|
||||
s.t=function(a){var c=this.d.language(),d=this.d.languages();return d&&d[c]&&d[c][a]?d[c][a]:a};s.w=n("b");s.ma=function(){return this.v||this.b};s.id=n("K");s.name=n("Vd");s.children=n("O");s.Kd=function(a){return this.Xa[a]};s.na=function(a){return this.Ya[a]};
|
||||
s.U=function(a,c){var d,e;"string"===typeof a?(e=a,c=c||{},d=c.componentClass||t.ba(e),c.name=e,d=new window.videojs[d](this.d||this,c)):d=a;this.O.push(d);"function"===typeof d.id&&(this.Xa[d.id()]=d);(e=e||d.name&&d.name())&&(this.Ya[e]=d);"function"===typeof d.el&&d.el()&&this.ma().appendChild(d.el());return d};
|
||||
s.removeChild=function(a){"string"===typeof a&&(a=this.na(a));if(a&&this.O){for(var c=l,d=this.O.length-1;0<=d;d--)if(this.O[d]===a){c=f;this.O.splice(d,1);break}c&&(this.Xa[a.id()]=k,this.Ya[a.name()]=k,(c=a.w())&&c.parentNode===this.ma()&&this.ma().removeChild(a.w()))}};
|
||||
s.Gc=function(){var a,c,d,e,g,h;a=this;c=a.options();if(d=c.children)if(h=function(d,e){c[d]!==b&&(e=c[d]);e!==l&&(a[d]=a.U(d,e))},t.h.isArray(d))for(var j=0;j<d.length;j++)e=d[j],"string"==typeof e?(g=e,e={}):g=e.name,h(g,e);else t.h.Y(d,h)};s.S=r("");
|
||||
s.c=function(a,c,d){var e,g,h;"string"===typeof a||t.h.isArray(a)?t.c(this.b,a,t.bind(this,c)):(e=t.bind(this,d),h=this,g=function(){h.k(a,c,e)},g.q=e.q,this.c("dispose",g),d=function(){h.k("dispose",g)},d.q=e.q,a.nodeName?(t.c(a,c,e),t.c(a,"dispose",d)):"function"===typeof a.c&&(a.c(c,e),a.c("dispose",d)));return this};
|
||||
s.k=function(a,c,d){!a||"string"===typeof a||t.h.isArray(a)?t.k(this.b,a,c):(d=t.bind(this,d),this.k("dispose",d),a.nodeName?(t.k(a,c,d),t.k(a,"dispose",d)):(a.k(c,d),a.k("dispose",d)));return this};s.Q=function(a,c,d){var e,g,h;"string"===typeof a||t.h.isArray(a)?t.Q(this.b,a,t.bind(this,c)):(e=t.bind(this,d),g=this,h=function(){g.k(a,c,h);e.apply(this,arguments)},h.q=e.q,this.c(a,c,h));return this};s.l=function(a){t.l(this.b,a);return this};
|
||||
s.H=function(a){a&&(this.oa?a.call(this):(this.hb===b&&(this.hb=[]),this.hb.push(a)));return this};s.Na=function(){this.oa=f;var a=this.hb;if(a&&0<a.length){for(var c=0,d=a.length;c<d;c++)a[c].call(this);this.hb=[];this.l("ready")}};s.$a=function(a){return t.$a(this.b,a)};s.n=function(a){t.n(this.b,a);return this};s.r=function(a){t.r(this.b,a);return this};s.show=function(){this.b.style.display="block";return this};s.Z=function(){this.b.style.display="none";return this};
|
||||
function E(a){a.r("vjs-lock-showing")}s.disable=function(){this.Z();this.show=m()};s.width=function(a,c){return F(this,"width",a,c)};s.height=function(a,c){return F(this,"height",a,c)};s.Dd=function(a,c){return this.width(a,f).height(c)};
|
||||
function F(a,c,d,e){if(d!==b){if(d===k||t.Pd(d))d=0;a.b.style[c]=-1!==(""+d).indexOf("%")||-1!==(""+d).indexOf("px")?d:"auto"===d?"":d+"px";e||a.l("resize");return a}if(!a.b)return 0;d=a.b.style[c];e=d.indexOf("px");return-1!==e?parseInt(d.slice(0,e),10):parseInt(a.b["offset"+t.ba(c)],10)}
|
||||
function G(a){var c,d,e,g,h,j,p,q;c=0;d=k;a.c("touchstart",function(a){1===a.touches.length&&(d=a.touches[0],c=(new Date).getTime(),g=f)});a.c("touchmove",function(a){1<a.touches.length?g=l:d&&(j=a.touches[0].pageX-d.pageX,p=a.touches[0].pageY-d.pageY,q=Math.sqrt(j*j+p*p),22<q&&(g=l))});h=function(){g=l};a.c("touchleave",h);a.c("touchcancel",h);a.c("touchend",function(a){d=k;g===f&&(e=(new Date).getTime()-c,250>e&&(a.preventDefault(),this.l("tap")))})}
|
||||
s.setTimeout=function(a,c){function d(){this.clearTimeout(e)}a=t.bind(this,a);var e=setTimeout(a,c);d.q="vjs-timeout-"+e;this.c("dispose",d);return e};s.clearTimeout=function(a){function c(){}clearTimeout(a);c.q="vjs-timeout-"+a;this.k("dispose",c);return a};s.setInterval=function(a,c){function d(){this.clearInterval(e)}a=t.bind(this,a);var e=setInterval(a,c);d.q="vjs-interval-"+e;this.c("dispose",d);return e};
|
||||
s.clearInterval=function(a){function c(){}clearInterval(a);c.q="vjs-interval-"+a;this.k("dispose",c);return a};t.u=t.a.extend({i:function(a,c){t.a.call(this,a,c);G(this);this.c("tap",this.s);this.c("click",this.s);this.c("focus",this.fb);this.c("blur",this.eb)}});s=t.u.prototype;
|
||||
s.e=function(a,c){var d;c=t.h.z({className:this.S(),role:"button","aria-live":"polite",tabIndex:0},c);d=t.a.prototype.e.call(this,a,c);c.innerHTML||(this.v=t.e("div",{className:"vjs-control-content"}),this.Cb=t.e("span",{className:"vjs-control-text",innerHTML:this.t(this.la)||"Need Text"}),this.v.appendChild(this.Cb),d.appendChild(this.v));return d};s.S=function(){return"vjs-control "+t.a.prototype.S.call(this)};s.s=m();s.fb=function(){t.c(document,"keydown",t.bind(this,this.ea))};
|
||||
s.ea=function(a){if(32==a.which||13==a.which)a.preventDefault(),this.s()};s.eb=function(){t.k(document,"keydown",t.bind(this,this.ea))};t.R=t.a.extend({i:function(a,c){t.a.call(this,a,c);this.td=this.na(this.m.barName);this.handle=this.na(this.m.handleName);this.c("mousedown",this.gb);this.c("touchstart",this.gb);this.c("focus",this.fb);this.c("blur",this.eb);this.c("click",this.s);this.c(a,"controlsvisible",this.update);this.c(a,this.Oc,this.update)}});s=t.R.prototype;
|
||||
s.e=function(a,c){c=c||{};c.className+=" vjs-slider";c=t.h.z({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},c);return t.a.prototype.e.call(this,a,c)};s.gb=function(a){a.preventDefault();t.ud();this.n("vjs-sliding");this.c(document,"mousemove",this.fa);this.c(document,"mouseup",this.ra);this.c(document,"touchmove",this.fa);this.c(document,"touchend",this.ra);this.fa(a)};s.fa=m();
|
||||
s.ra=function(){t.ve();this.r("vjs-sliding");this.k(document,"mousemove",this.fa);this.k(document,"mouseup",this.ra);this.k(document,"touchmove",this.fa);this.k(document,"touchend",this.ra);this.update()};s.update=function(){if(this.b){var a,c=this.Lb(),d=this.handle,e=this.td;isNaN(c)&&(c=0);a=c;if(d){a=this.b.offsetWidth;var g=d.w().offsetWidth;a=g?g/a:0;c*=1-a;a=c+a/2;d.w().style.left=t.round(100*c,2)+"%"}e&&(e.w().style.width=t.round(100*a,2)+"%")}};
|
||||
function H(a,c){var d,e,g,h;d=a.b;e=t.Hd(d);h=g=d.offsetWidth;d=a.handle;if(a.options().vertical)return h=e.top,e=c.changedTouches?c.changedTouches[0].pageY:c.pageY,d&&(d=d.w().offsetHeight,h+=d/2,g-=d),Math.max(0,Math.min(1,(h-e+g)/g));g=e.left;e=c.changedTouches?c.changedTouches[0].pageX:c.pageX;d&&(d=d.w().offsetWidth,g+=d/2,h-=d);return Math.max(0,Math.min(1,(e-g)/h))}s.fb=function(){this.c(document,"keydown",this.ea)};
|
||||
s.ea=function(a){if(37==a.which||40==a.which)a.preventDefault(),this.Yc();else if(38==a.which||39==a.which)a.preventDefault(),this.Zc()};s.eb=function(){this.k(document,"keydown",this.ea)};s.s=function(a){a.stopImmediatePropagation();a.preventDefault()};t.$=t.a.extend();t.$.prototype.defaultValue=0;t.$.prototype.e=function(a,c){c=c||{};c.className+=" vjs-slider-handle";c=t.h.z({innerHTML:'<span class="vjs-control-text">'+this.defaultValue+"</span>"},c);return t.a.prototype.e.call(this,"div",c)};
|
||||
t.ja=t.a.extend();function ca(a,c){a.U(c);c.c("click",t.bind(a,function(){E(this)}))}t.ja.prototype.e=function(){var a=this.options().uc||"ul";this.v=t.e(a,{className:"vjs-menu-content"});a=t.a.prototype.e.call(this,"div",{append:this.v,className:"vjs-menu"});a.appendChild(this.v);t.c(a,"click",function(a){a.preventDefault();a.stopImmediatePropagation()});return a};t.J=t.u.extend({i:function(a,c){t.u.call(this,a,c);this.selected(c.selected)}});
|
||||
t.J.prototype.e=function(a,c){return t.u.prototype.e.call(this,"li",t.h.z({className:"vjs-menu-item",innerHTML:this.t(this.m.label)},c))};t.J.prototype.s=function(){this.selected(f)};t.J.prototype.selected=function(a){a?(this.n("vjs-selected"),this.b.setAttribute("aria-selected",f)):(this.r("vjs-selected"),this.b.setAttribute("aria-selected",l))};
|
||||
t.L=t.u.extend({i:function(a,c){t.u.call(this,a,c);this.Fa=this.Aa();this.U(this.Fa);this.P&&0===this.P.length&&this.Z();this.c("keydown",this.ea);this.b.setAttribute("aria-haspopup",f);this.b.setAttribute("role","button")}});s=t.L.prototype;s.xa=l;s.Aa=function(){var a=new t.ja(this.d);this.options().title&&a.ma().appendChild(t.e("li",{className:"vjs-menu-title",innerHTML:t.ba(this.options().title),re:-1}));if(this.P=this.createItems())for(var c=0;c<this.P.length;c++)ca(a,this.P[c]);return a};
|
||||
s.za=m();s.S=function(){return this.className+" vjs-menu-button "+t.u.prototype.S.call(this)};s.fb=m();s.eb=m();s.s=function(){this.Q("mouseout",t.bind(this,function(){E(this.Fa);this.b.blur()}));this.xa?I(this):J(this)};s.ea=function(a){32==a.which||13==a.which?(this.xa?I(this):J(this),a.preventDefault()):27==a.which&&(this.xa&&I(this),a.preventDefault())};function J(a){a.xa=f;a.Fa.n("vjs-lock-showing");a.b.setAttribute("aria-pressed",f);a.P&&0<a.P.length&&a.P[0].w().focus()}
|
||||
function I(a){a.xa=l;E(a.Fa);a.b.setAttribute("aria-pressed",l)}t.D=function(a){"number"===typeof a?this.code=a:"string"===typeof a?this.message=a:"object"===typeof a&&t.h.z(this,a);this.message||(this.message=t.D.Bd[this.code]||"")};t.D.prototype.code=0;t.D.prototype.message="";t.D.prototype.status=k;t.D.Za="MEDIA_ERR_CUSTOM MEDIA_ERR_ABORTED MEDIA_ERR_NETWORK MEDIA_ERR_DECODE MEDIA_ERR_SRC_NOT_SUPPORTED MEDIA_ERR_ENCRYPTED".split(" ");
|
||||
t.D.Bd={1:"You aborted the video playback",2:"A network error caused the video download to fail part-way.",3:"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.",4:"The video could not be loaded, either because the server or network failed or because the format is not supported.",5:"The video is encrypted and we do not have the keys to decrypt it."};for(var K=0;K<t.D.Za.length;K++)t.D[t.D.Za[K]]=K,t.D.prototype[t.D.Za[K]]=K;
|
||||
var L,M,N,O;
|
||||
L=["requestFullscreen exitFullscreen fullscreenElement fullscreenEnabled fullscreenchange fullscreenerror".split(" "),"webkitRequestFullscreen webkitExitFullscreen webkitFullscreenElement webkitFullscreenEnabled webkitfullscreenchange webkitfullscreenerror".split(" "),"webkitRequestFullScreen webkitCancelFullScreen webkitCurrentFullScreenElement webkitCancelFullScreen webkitfullscreenchange webkitfullscreenerror".split(" "),"mozRequestFullScreen mozCancelFullScreen mozFullScreenElement mozFullScreenEnabled mozfullscreenchange mozfullscreenerror".split(" "),"msRequestFullscreen msExitFullscreen msFullscreenElement msFullscreenEnabled MSFullscreenChange MSFullscreenError".split(" ")];
|
||||
M=L[0];for(O=0;O<L.length;O++)if(L[O][1]in document){N=L[O];break}if(N){t.Va.Kb={};for(O=0;O<N.length;O++)t.Va.Kb[M[O]]=N[O]}
|
||||
t.Player=t.a.extend({i:function(a,c,d){this.I=a;a.id=a.id||"vjs_video_"+t.q++;this.se=a&&t.Ea(a);c=t.h.z(da(a),c);this.bb=c.language||t.options.language;this.Td=c.languages||t.options.languages;this.F={};this.Pc=c.poster||"";this.Db=!!c.controls;a.controls=l;c.Tc=l;P(this,"audio"===this.I.nodeName.toLowerCase());t.a.call(this,this,c,d);this.controls()?this.n("vjs-controls-enabled"):this.n("vjs-controls-disabled");P(this)&&this.n("vjs-audio");t.Ga[this.K]=this;c.plugins&&t.h.Y(c.plugins,function(a,
|
||||
c){this[a](c)},this);var e,g,h,j,p;e=t.bind(this,this.reportUserActivity);this.c("mousedown",function(){e();this.clearInterval(g);g=this.setInterval(e,250)});this.c("mousemove",function(a){if(a.screenX!=j||a.screenY!=p)j=a.screenX,p=a.screenY,e()});this.c("mouseup",function(){e();this.clearInterval(g)});this.c("keydown",e);this.c("keyup",e);this.setInterval(function(){if(this.ua){this.ua=l;this.userActive(f);this.clearTimeout(h);var a=this.options().inactivityTimeout;0<a&&(h=this.setTimeout(function(){this.ua||
|
||||
this.userActive(l)},a))}},250)}});s=t.Player.prototype;s.language=function(a){if(a===b)return this.bb;this.bb=a;return this};s.languages=n("Td");s.m=t.options;s.dispose=function(){this.l("dispose");this.k("dispose");t.Ga[this.K]=k;this.I&&this.I.player&&(this.I.player=k);this.b&&this.b.player&&(this.b.player=k);this.o&&this.o.dispose();t.a.prototype.dispose.call(this)};
|
||||
function da(a){var c,d,e={sources:[],tracks:[]};c=t.Ea(a);d=c["data-setup"];d!==k&&t.h.z(c,t.JSON.parse(d||"{}"));t.h.z(e,c);if(a.hasChildNodes()){var g,h;a=a.childNodes;g=0;for(h=a.length;g<h;g++)c=a[g],d=c.nodeName.toLowerCase(),"source"===d?e.sources.push(t.Ea(c)):"track"===d&&e.tracks.push(t.Ea(c))}return e}
|
||||
s.e=function(){var a=this.b=t.a.prototype.e.call(this,"div"),c=this.I,d;c.removeAttribute("width");c.removeAttribute("height");if(c.hasChildNodes()){var e,g,h,j,p;e=c.childNodes;g=e.length;for(p=[];g--;)h=e[g],j=h.nodeName.toLowerCase(),"track"===j&&p.push(h);for(e=0;e<p.length;e++)c.removeChild(p[e])}d=t.Ea(c);t.h.Y(d,function(c){"class"==c?a.className=d[c]:a.setAttribute(c,d[c])});c.id+="_html5_api";c.className="vjs-tech";c.player=a.player=this;this.n("vjs-paused");this.width(this.m.width,f);this.height(this.m.height,
|
||||
f);c.Md=c.networkState;c.parentNode&&c.parentNode.insertBefore(a,c);t.Nb(c,a);this.b=a;this.c("loadstart",this.Zd);this.c("waiting",this.ee);this.c(["canplay","canplaythrough","playing","ended"],this.de);this.c("seeking",this.be);this.c("seeked",this.ae);this.c("ended",this.Wd);this.c("play",this.Tb);this.c("firstplay",this.Xd);this.c("pause",this.Sb);this.c("progress",this.$d);this.c("durationchange",this.Mc);this.c("fullscreenchange",this.Yd);return a};
|
||||
function Q(a,c,d){a.o&&(a.oa=l,a.o.dispose(),a.o=l);"Html5"!==c&&a.I&&(t.g.Gb(a.I),a.I=k);a.La=c;a.oa=l;var e=t.h.z({source:d,parentEl:a.b},a.m[c.toLowerCase()]);d&&(a.xc=d.type,d.src==a.F.src&&0<a.F.currentTime&&(e.startTime=a.F.currentTime),a.F.src=d.src);a.o=new window.videojs[c](a,e);a.o.H(function(){this.d.Na()})}s.Zd=function(){this.error(k);this.paused()?(R(this,l),this.Q("play",function(){R(this,f)})):this.l("firstplay")};s.Fc=l;
|
||||
function R(a,c){c!==b&&a.Fc!==c&&((a.Fc=c)?(a.n("vjs-has-started"),a.l("firstplay")):a.r("vjs-has-started"))}s.Tb=function(){this.r("vjs-paused");this.n("vjs-playing")};s.ee=function(){this.n("vjs-waiting")};s.de=function(){this.r("vjs-waiting")};s.be=function(){this.n("vjs-seeking")};s.ae=function(){this.r("vjs-seeking")};s.Xd=function(){this.m.starttime&&this.currentTime(this.m.starttime);this.n("vjs-has-started")};s.Sb=function(){this.r("vjs-playing");this.n("vjs-paused")};
|
||||
s.$d=function(){1==this.bufferedPercent()&&this.l("loadedalldata")};s.Wd=function(){this.m.loop?(this.currentTime(0),this.play()):this.paused()||this.pause()};s.Mc=function(){var a=S(this,"duration");a&&(0>a&&(a=Infinity),this.duration(a),Infinity===a?this.n("vjs-live"):this.r("vjs-live"))};s.Yd=function(){this.isFullscreen()?this.n("vjs-fullscreen"):this.r("vjs-fullscreen")};function T(a,c,d){if(a.o&&!a.o.oa)a.o.H(function(){this[c](d)});else try{a.o[c](d)}catch(e){throw t.log(e),e;}}
|
||||
function S(a,c){if(a.o&&a.o.oa)try{return a.o[c]()}catch(d){throw a.o[c]===b?t.log("Video.js: "+c+" method not defined for "+a.La+" playback technology.",d):"TypeError"==d.name?(t.log("Video.js: "+c+" unavailable on "+a.La+" playback technology element.",d),a.o.oa=l):t.log(d),d;}}s.play=function(){T(this,"play");return this};s.pause=function(){T(this,"pause");return this};s.paused=function(){return S(this,"paused")===l?l:f};
|
||||
s.currentTime=function(a){return a!==b?(T(this,"setCurrentTime",a),this):this.F.currentTime=S(this,"currentTime")||0};s.duration=function(a){if(a!==b)return this.F.duration=parseFloat(a),this;this.F.duration===b&&this.Mc();return this.F.duration||0};s.remainingTime=function(){return this.duration()-this.currentTime()};s.buffered=function(){var a=S(this,"buffered");if(!a||!a.length)a=t.Eb(0,0);return a};
|
||||
s.bufferedPercent=function(){var a=this.duration(),c=this.buffered(),d=0,e,g;if(!a)return 0;for(var h=0;h<c.length;h++)e=c.start(h),g=c.end(h),g>a&&(g=a),d+=g-e;return d/a};s.volume=function(a){if(a!==b)return a=Math.max(0,Math.min(1,parseFloat(a))),this.F.volume=a,T(this,"setVolume",a),t.je(a),this;a=parseFloat(S(this,"volume"));return isNaN(a)?1:a};s.muted=function(a){return a!==b?(T(this,"setMuted",a),this):S(this,"muted")||l};s.Ka=function(){return S(this,"supportsFullScreen")||l};s.Ic=l;
|
||||
s.isFullscreen=function(a){return a!==b?(this.Ic=!!a,this):this.Ic};s.isFullScreen=function(a){t.log.warn('player.isFullScreen() has been deprecated, use player.isFullscreen() with a lowercase "s")');return this.isFullscreen(a)};
|
||||
s.requestFullscreen=function(){var a=t.Va.Kb;this.isFullscreen(f);a?(t.c(document,a.fullscreenchange,t.bind(this,function(c){this.isFullscreen(document[a.fullscreenElement]);this.isFullscreen()===l&&t.k(document,a.fullscreenchange,arguments.callee);this.l("fullscreenchange")})),this.b[a.requestFullscreen]()):this.o.Ka()?T(this,"enterFullScreen"):(this.Bc(),this.l("fullscreenchange"));return this};
|
||||
s.requestFullScreen=function(){t.log.warn('player.requestFullScreen() has been deprecated, use player.requestFullscreen() with a lowercase "s")');return this.requestFullscreen()};s.exitFullscreen=function(){var a=t.Va.Kb;this.isFullscreen(l);if(a)document[a.exitFullscreen]();else this.o.Ka()?T(this,"exitFullScreen"):(this.Hb(),this.l("fullscreenchange"));return this};s.cancelFullScreen=function(){t.log.warn("player.cancelFullScreen() has been deprecated, use player.exitFullscreen()");return this.exitFullscreen()};
|
||||
s.Bc=function(){this.Od=f;this.Ed=document.documentElement.style.overflow;t.c(document,"keydown",t.bind(this,this.Dc));document.documentElement.style.overflow="hidden";t.n(document.body,"vjs-full-window");this.l("enterFullWindow")};s.Dc=function(a){27===a.keyCode&&(this.isFullscreen()===f?this.exitFullscreen():this.Hb())};s.Hb=function(){this.Od=l;t.k(document,"keydown",this.Dc);document.documentElement.style.overflow=this.Ed;t.r(document.body,"vjs-full-window");this.l("exitFullWindow")};
|
||||
s.selectSource=function(a){for(var c=0,d=this.m.techOrder;c<d.length;c++){var e=t.ba(d[c]),g=window.videojs[e];if(g){if(g.isSupported())for(var h=0,j=a;h<j.length;h++){var p=j[h];if(g.canPlaySource(p))return{source:p,o:e}}}else t.log.error('The "'+e+'" tech is undefined. Skipped browser support check for that tech.')}return l};
|
||||
s.src=function(a){if(a===b)return S(this,"src");t.h.isArray(a)?U(this,a):"string"===typeof a?this.src({src:a}):a instanceof Object&&(a.type&&!window.videojs[this.La].canPlaySource(a)?U(this,[a]):(this.F.src=a.src,this.xc=a.type||"",this.H(function(){window.videojs[this.La].prototype.hasOwnProperty("setSource")?T(this,"setSource",a):T(this,"src",a.src);"auto"==this.m.preload&&this.load();this.m.autoplay&&this.play()})));return this};
|
||||
function U(a,c){var d=a.selectSource(c);d?d.o===a.La?a.src(d.source):Q(a,d.o,d.source):(a.setTimeout(function(){this.error({code:4,message:this.t(this.options().notSupportedMessage)})},0),a.Na())}s.load=function(){T(this,"load");return this};s.currentSrc=function(){return S(this,"currentSrc")||this.F.src||""};s.zd=function(){return this.xc||""};s.Ha=function(a){return a!==b?(T(this,"setPreload",a),this.m.preload=a,this):S(this,"preload")};
|
||||
s.autoplay=function(a){return a!==b?(T(this,"setAutoplay",a),this.m.autoplay=a,this):S(this,"autoplay")};s.loop=function(a){return a!==b?(T(this,"setLoop",a),this.m.loop=a,this):S(this,"loop")};s.poster=function(a){if(a===b)return this.Pc;a||(a="");this.Pc=a;T(this,"setPoster",a);this.l("posterchange");return this};
|
||||
s.controls=function(a){return a!==b?(a=!!a,this.Db!==a&&((this.Db=a)?(this.r("vjs-controls-disabled"),this.n("vjs-controls-enabled"),this.l("controlsenabled")):(this.r("vjs-controls-enabled"),this.n("vjs-controls-disabled"),this.l("controlsdisabled"))),this):this.Db};t.Player.prototype.Zb;s=t.Player.prototype;
|
||||
s.usingNativeControls=function(a){return a!==b?(a=!!a,this.Zb!==a&&((this.Zb=a)?(this.n("vjs-using-native-controls"),this.l("usingnativecontrols")):(this.r("vjs-using-native-controls"),this.l("usingcustomcontrols"))),this):this.Zb};s.da=k;s.error=function(a){if(a===b)return this.da;if(a===k)return this.da=a,this.r("vjs-error"),this;this.da=a instanceof t.D?a:new t.D(a);this.l("error");this.n("vjs-error");t.log.error("(CODE:"+this.da.code+" "+t.D.Za[this.da.code]+")",this.da.message,this.da);return this};
|
||||
s.ended=function(){return S(this,"ended")};s.seeking=function(){return S(this,"seeking")};s.ua=f;s.reportUserActivity=function(){this.ua=f};s.Yb=f;s.userActive=function(a){return a!==b?(a=!!a,a!==this.Yb&&((this.Yb=a)?(this.ua=f,this.r("vjs-user-inactive"),this.n("vjs-user-active"),this.l("useractive")):(this.ua=l,this.o&&this.o.Q("mousemove",function(a){a.stopPropagation();a.preventDefault()}),this.r("vjs-user-active"),this.n("vjs-user-inactive"),this.l("userinactive"))),this):this.Yb};
|
||||
s.playbackRate=function(a){return a!==b?(T(this,"setPlaybackRate",a),this):this.o&&this.o.featuresPlaybackRate?S(this,"playbackRate"):1};s.Hc=l;function P(a,c){return c!==b?(a.Hc=!!c,a):a.Hc}t.Qa=t.a.extend();t.Qa.prototype.m={Ie:"play",children:{playToggle:{},currentTimeDisplay:{},timeDivider:{},durationDisplay:{},remainingTimeDisplay:{},liveDisplay:{},progressControl:{},fullscreenToggle:{},volumeControl:{},muteToggle:{},playbackRateMenuButton:{}}};t.Qa.prototype.e=function(){return t.e("div",{className:"vjs-control-bar"})};
|
||||
t.ec=t.a.extend({i:function(a,c){t.a.call(this,a,c)}});t.ec.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-live-controls vjs-control"});this.v=t.e("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.t("Stream Type")+"</span>"+this.t("LIVE"),"aria-live":"off"});a.appendChild(this.v);return a};t.hc=t.u.extend({i:function(a,c){t.u.call(this,a,c);this.c(a,"play",this.Tb);this.c(a,"pause",this.Sb)}});s=t.hc.prototype;s.la="Play";
|
||||
s.S=function(){return"vjs-play-control "+t.u.prototype.S.call(this)};s.s=function(){this.d.paused()?this.d.play():this.d.pause()};s.Tb=function(){this.r("vjs-paused");this.n("vjs-playing");this.b.children[0].children[0].innerHTML=this.t("Pause")};s.Sb=function(){this.r("vjs-playing");this.n("vjs-paused");this.b.children[0].children[0].innerHTML=this.t("Play")};t.nb=t.a.extend({i:function(a,c){t.a.call(this,a,c);this.c(a,"timeupdate",this.ia)}});
|
||||
t.nb.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-current-time vjs-time-controls vjs-control"});this.v=t.e("div",{className:"vjs-current-time-display",innerHTML:'<span class="vjs-control-text">Current Time </span>0:00',"aria-live":"off"});a.appendChild(this.v);return a};t.nb.prototype.ia=function(){var a=this.d.ib?this.d.F.currentTime:this.d.currentTime();this.v.innerHTML='<span class="vjs-control-text">'+this.t("Current Time")+"</span> "+t.Da(a,this.d.duration())};
|
||||
t.ob=t.a.extend({i:function(a,c){t.a.call(this,a,c);this.c(a,"timeupdate",this.ia)}});t.ob.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-duration vjs-time-controls vjs-control"});this.v=t.e("div",{className:"vjs-duration-display",innerHTML:'<span class="vjs-control-text">'+this.t("Duration Time")+"</span> 0:00","aria-live":"off"});a.appendChild(this.v);return a};
|
||||
t.ob.prototype.ia=function(){var a=this.d.duration();a&&(this.v.innerHTML='<span class="vjs-control-text">'+this.t("Duration Time")+"</span> "+t.Da(a))};t.nc=t.a.extend({i:function(a,c){t.a.call(this,a,c)}});t.nc.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-time-divider",innerHTML:"<div><span>/</span></div>"})};t.vb=t.a.extend({i:function(a,c){t.a.call(this,a,c);this.c(a,"timeupdate",this.ia)}});
|
||||
t.vb.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-remaining-time vjs-time-controls vjs-control"});this.v=t.e("div",{className:"vjs-remaining-time-display",innerHTML:'<span class="vjs-control-text">'+this.t("Remaining Time")+"</span> -0:00","aria-live":"off"});a.appendChild(this.v);return a};t.vb.prototype.ia=function(){this.d.duration()&&(this.v.innerHTML='<span class="vjs-control-text">'+this.t("Remaining Time")+"</span> -"+t.Da(this.d.remainingTime()))};
|
||||
t.Ra=t.u.extend({i:function(a,c){t.u.call(this,a,c)}});t.Ra.prototype.la="Fullscreen";t.Ra.prototype.S=function(){return"vjs-fullscreen-control "+t.u.prototype.S.call(this)};t.Ra.prototype.s=function(){this.d.isFullscreen()?(this.d.exitFullscreen(),this.Cb.innerHTML=this.t("Fullscreen")):(this.d.requestFullscreen(),this.Cb.innerHTML=this.t("Non-Fullscreen"))};t.ub=t.a.extend({i:function(a,c){t.a.call(this,a,c)}});t.ub.prototype.m={children:{seekBar:{}}};
|
||||
t.ub.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-progress-control vjs-control"})};t.kc=t.R.extend({i:function(a,c){t.R.call(this,a,c);this.c(a,"timeupdate",this.ta);a.H(t.bind(this,this.ta))}});s=t.kc.prototype;s.m={children:{loadProgressBar:{},playProgressBar:{},seekHandle:{}},barName:"playProgressBar",handleName:"seekHandle"};s.Oc="timeupdate";s.e=function(){return t.R.prototype.e.call(this,"div",{className:"vjs-progress-holder","aria-label":"video progress bar"})};
|
||||
s.ta=function(){var a=this.d.ib?this.d.F.currentTime:this.d.currentTime();this.b.setAttribute("aria-valuenow",t.round(100*this.Lb(),2));this.b.setAttribute("aria-valuetext",t.Da(a,this.d.duration()))};s.Lb=function(){return this.d.currentTime()/this.d.duration()};s.gb=function(a){t.R.prototype.gb.call(this,a);this.d.ib=f;this.xe=!this.d.paused();this.d.pause()};s.fa=function(a){a=H(this,a)*this.d.duration();a==this.d.duration()&&(a-=0.1);this.d.currentTime(a)};
|
||||
s.ra=function(a){t.R.prototype.ra.call(this,a);this.d.ib=l;this.xe&&this.d.play()};s.Zc=function(){this.d.currentTime(this.d.currentTime()+5)};s.Yc=function(){this.d.currentTime(this.d.currentTime()-5)};t.rb=t.a.extend({i:function(a,c){t.a.call(this,a,c);this.c(a,"progress",this.update)}});t.rb.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.t("Loaded")+"</span>: 0%</span>"})};
|
||||
t.rb.prototype.update=function(){var a,c,d,e,g=this.d.buffered();a=this.d.duration();var h,j=this.d;h=j.buffered();j=j.duration();h=h.end(h.length-1);h>j&&(h=j);j=this.b.children;this.b.style.width=100*(h/a||0)+"%";for(a=0;a<g.length;a++)c=g.start(a),d=g.end(a),(e=j[a])||(e=this.b.appendChild(t.e())),e.style.left=100*(c/h||0)+"%",e.style.width=100*((d-c)/h||0)+"%";for(a=j.length;a>g.length;a--)this.b.removeChild(j[a-1])};t.gc=t.a.extend({i:function(a,c){t.a.call(this,a,c)}});
|
||||
t.gc.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-play-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.t("Progress")+"</span>: 0%</span>"})};t.Sa=t.$.extend({i:function(a,c){t.$.call(this,a,c);this.c(a,"timeupdate",this.ia)}});t.Sa.prototype.defaultValue="00:00";t.Sa.prototype.e=function(){return t.$.prototype.e.call(this,"div",{className:"vjs-seek-handle","aria-live":"off"})};
|
||||
t.Sa.prototype.ia=function(){var a=this.d.ib?this.d.F.currentTime:this.d.currentTime();this.b.innerHTML='<span class="vjs-control-text">'+t.Da(a,this.d.duration())+"</span>"};t.yb=t.a.extend({i:function(a,c){t.a.call(this,a,c);a.o&&a.o.featuresVolumeControl===l&&this.n("vjs-hidden");this.c(a,"loadstart",function(){a.o.featuresVolumeControl===l?this.n("vjs-hidden"):this.r("vjs-hidden")})}});t.yb.prototype.m={children:{volumeBar:{}}};
|
||||
t.yb.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-volume-control vjs-control"})};t.xb=t.R.extend({i:function(a,c){t.R.call(this,a,c);this.c(a,"volumechange",this.ta);a.H(t.bind(this,this.ta))}});s=t.xb.prototype;s.ta=function(){this.b.setAttribute("aria-valuenow",t.round(100*this.d.volume(),2));this.b.setAttribute("aria-valuetext",t.round(100*this.d.volume(),2)+"%")};s.m={children:{volumeLevel:{},volumeHandle:{}},barName:"volumeLevel",handleName:"volumeHandle"};
|
||||
s.Oc="volumechange";s.e=function(){return t.R.prototype.e.call(this,"div",{className:"vjs-volume-bar","aria-label":"volume level"})};s.fa=function(a){this.d.muted()&&this.d.muted(l);this.d.volume(H(this,a))};s.Lb=function(){return this.d.muted()?0:this.d.volume()};s.Zc=function(){this.d.volume(this.d.volume()+0.1)};s.Yc=function(){this.d.volume(this.d.volume()-0.1)};t.oc=t.a.extend({i:function(a,c){t.a.call(this,a,c)}});
|
||||
t.oc.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})};t.zb=t.$.extend();t.zb.prototype.defaultValue="00:00";t.zb.prototype.e=function(){return t.$.prototype.e.call(this,"div",{className:"vjs-volume-handle"})};
|
||||
t.ka=t.u.extend({i:function(a,c){t.u.call(this,a,c);this.c(a,"volumechange",this.update);a.o&&a.o.featuresVolumeControl===l&&this.n("vjs-hidden");this.c(a,"loadstart",function(){a.o.featuresVolumeControl===l?this.n("vjs-hidden"):this.r("vjs-hidden")})}});t.ka.prototype.e=function(){return t.u.prototype.e.call(this,"div",{className:"vjs-mute-control vjs-control",innerHTML:'<div><span class="vjs-control-text">'+this.t("Mute")+"</span></div>"})};
|
||||
t.ka.prototype.s=function(){this.d.muted(this.d.muted()?l:f)};t.ka.prototype.update=function(){var a=this.d.volume(),c=3;0===a||this.d.muted()?c=0:0.33>a?c=1:0.67>a&&(c=2);this.d.muted()?this.b.children[0].children[0].innerHTML!=this.t("Unmute")&&(this.b.children[0].children[0].innerHTML=this.t("Unmute")):this.b.children[0].children[0].innerHTML!=this.t("Mute")&&(this.b.children[0].children[0].innerHTML=this.t("Mute"));for(a=0;4>a;a++)t.r(this.b,"vjs-vol-"+a);t.n(this.b,"vjs-vol-"+c)};
|
||||
t.wa=t.L.extend({i:function(a,c){t.L.call(this,a,c);this.c(a,"volumechange",this.update);a.o&&a.o.featuresVolumeControl===l&&this.n("vjs-hidden");this.c(a,"loadstart",function(){a.o.featuresVolumeControl===l?this.n("vjs-hidden"):this.r("vjs-hidden")});this.n("vjs-menu-button")}});t.wa.prototype.Aa=function(){var a=new t.ja(this.d,{uc:"div"}),c=new t.xb(this.d,this.m.volumeBar);c.c("focus",function(){a.n("vjs-lock-showing")});c.c("blur",function(){E(a)});a.U(c);return a};
|
||||
t.wa.prototype.s=function(){t.ka.prototype.s.call(this);t.L.prototype.s.call(this)};t.wa.prototype.e=function(){return t.u.prototype.e.call(this,"div",{className:"vjs-volume-menu-button vjs-menu-button vjs-control",innerHTML:'<div><span class="vjs-control-text">'+this.t("Mute")+"</span></div>"})};t.wa.prototype.update=t.ka.prototype.update;t.ic=t.L.extend({i:function(a,c){t.L.call(this,a,c);this.cd();this.bd();this.c(a,"loadstart",this.cd);this.c(a,"ratechange",this.bd)}});s=t.ic.prototype;s.la="Playback Rate";
|
||||
s.className="vjs-playback-rate";s.e=function(){var a=t.L.prototype.e.call(this);this.Kc=t.e("div",{className:"vjs-playback-rate-value",innerHTML:1});a.appendChild(this.Kc);return a};s.Aa=function(){var a=new t.ja(this.j()),c=this.j().options().playbackRates;if(c)for(var d=c.length-1;0<=d;d--)a.U(new t.tb(this.j(),{rate:c[d]+"x"}));return a};s.ta=function(){this.w().setAttribute("aria-valuenow",this.j().playbackRate())};
|
||||
s.s=function(){for(var a=this.j().playbackRate(),c=this.j().options().playbackRates,d=c[0],e=0;e<c.length;e++)if(c[e]>a){d=c[e];break}this.j().playbackRate(d)};function ea(a){return a.j().o&&a.j().o.featuresPlaybackRate&&a.j().options().playbackRates&&0<a.j().options().playbackRates.length}s.cd=function(){ea(this)?this.r("vjs-hidden"):this.n("vjs-hidden")};s.bd=function(){ea(this)&&(this.Kc.innerHTML=this.j().playbackRate()+"x")};
|
||||
t.tb=t.J.extend({uc:"button",i:function(a,c){var d=this.label=c.rate,e=this.Rc=parseFloat(d,10);c.label=d;c.selected=1===e;t.J.call(this,a,c);this.c(a,"ratechange",this.update)}});t.tb.prototype.s=function(){t.J.prototype.s.call(this);this.j().playbackRate(this.Rc)};t.tb.prototype.update=function(){this.selected(this.j().playbackRate()==this.Rc)};t.jc=t.u.extend({i:function(a,c){t.u.call(this,a,c);this.update();a.c("posterchange",t.bind(this,this.update))}});s=t.jc.prototype;
|
||||
s.dispose=function(){this.j().k("posterchange",this.update);t.u.prototype.dispose.call(this)};s.e=function(){var a=t.e("div",{className:"vjs-poster",tabIndex:-1});t.fd||(this.Ib=t.e("img"),a.appendChild(this.Ib));return a};s.update=function(){var a=this.j().poster();this.ga(a);a?this.b.style.display="":this.Z()};s.ga=function(a){var c;this.Ib?this.Ib.src=a:(c="",a&&(c='url("'+a+'")'),this.b.style.backgroundImage=c)};s.s=function(){this.d.play()};t.fc=t.a.extend({i:function(a,c){t.a.call(this,a,c)}});
|
||||
t.fc.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-loading-spinner"})};t.lb=t.u.extend();t.lb.prototype.e=function(){return t.u.prototype.e.call(this,"div",{className:"vjs-big-play-button",innerHTML:'<span aria-hidden="true"></span>',"aria-label":"play video"})};t.lb.prototype.s=function(){this.d.play()};t.pb=t.a.extend({i:function(a,c){t.a.call(this,a,c);this.update();this.c(a,"error",this.update)}});
|
||||
t.pb.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-error-display"});this.v=t.e("div");a.appendChild(this.v);return a};t.pb.prototype.update=function(){this.j().error()&&(this.v.innerHTML=this.t(this.j().error().message))};
|
||||
t.p=t.a.extend({i:function(a,c,d){c=c||{};c.Tc=l;t.a.call(this,a,c,d);this.featuresProgressEvents||(this.Lc=f,this.Qc=this.setInterval(function(){var a=this.j().bufferedPercent();this.vd!=a&&this.j().l("progress");this.vd=a;1===a&&this.clearInterval(this.Qc)},500));this.featuresTimeupdateEvents||(a=this.d,this.Rb=f,this.c(a,"play",this.ad),this.c(a,"pause",this.kb),this.Q("timeupdate",function(){this.featuresTimeupdateEvents=f;fa(this)}));var e;e=this.j();a=function(){if(e.controls()&&!e.usingNativeControls()){var a;
|
||||
this.c("mousedown",this.s);this.c("touchstart",function(){a=this.d.userActive()});this.c("touchmove",function(){a&&this.j().reportUserActivity()});this.c("touchend",function(a){a.preventDefault()});G(this);this.c("tap",this.ce)}};this.H(a);this.c(e,"controlsenabled",a);this.c(e,"controlsdisabled",this.he);this.H(function(){this.networkState&&0<this.networkState()&&this.j().l("loadstart")})}});s=t.p.prototype;
|
||||
s.he=function(){this.k("tap");this.k("touchstart");this.k("touchmove");this.k("touchleave");this.k("touchcancel");this.k("touchend");this.k("click");this.k("mousedown")};s.s=function(a){0===a.button&&this.j().controls()&&(this.j().paused()?this.j().play():this.j().pause())};s.ce=function(){this.j().userActive(!this.j().userActive())};function fa(a){a.Rb=l;a.kb();a.k("play",a.ad);a.k("pause",a.kb)}s.ad=function(){this.wc&&this.kb();this.wc=this.setInterval(function(){this.j().l("timeupdate")},250)};
|
||||
s.kb=function(){this.clearInterval(this.wc);this.j().l("timeupdate")};s.dispose=function(){this.Lc&&(this.Lc=l,this.clearInterval(this.Qc));this.Rb&&fa(this);t.a.prototype.dispose.call(this)};s.Wb=function(){this.Rb&&this.j().l("timeupdate")};s.Vc=m();t.p.prototype.featuresVolumeControl=f;t.p.prototype.featuresFullscreenResize=l;t.p.prototype.featuresPlaybackRate=l;t.p.prototype.featuresProgressEvents=l;t.p.prototype.featuresTimeupdateEvents=l;
|
||||
t.p.$b=function(a){a.Ia=function(c,d){var e=a.Wc;e||(e=a.Wc=[]);d===b&&(d=e.length);e.splice(d,0,c)};a.jb=function(c){for(var d=a.Wc||[],e,g=0;g<d.length;g++)if(e=d[g].Wa(c))return d[g];return k};a.rc=function(c){var d=a.jb(c);return d?d.Wa(c):""};a.prototype.Ja=function(c){var d=a.jb(c);this.Ba();this.k("dispose",this.Ba);this.vc=c;this.Xb=d.Mb(c,this);this.c("dispose",this.Ba);return this};a.prototype.Ba=function(){this.Xb&&this.Xb.dispose&&this.Xb.dispose()}};
|
||||
t.g=t.p.extend({i:function(a,c,d){t.p.call(this,a,c,d);for(d=t.g.qb.length-1;0<=d;d--)this.c(t.g.qb[d],this.Fd);(c=c.source)&&(this.b.currentSrc!==c.src||a.I&&3===a.I.Md)&&this.Ja(c);if(t.wb&&a.options().nativeControlsForTouch===f){var e,g,h,j;e=this;g=this.j();c=g.controls();e.b.controls=!!c;h=function(){e.b.controls=f};j=function(){e.b.controls=l};g.c("controlsenabled",h);g.c("controlsdisabled",j);c=function(){g.k("controlsenabled",h);g.k("controlsdisabled",j)};e.c("dispose",c);g.c("usingcustomcontrols",
|
||||
c);g.usingNativeControls(f)}a.H(function(){this.I&&(this.m.autoplay&&this.paused())&&(delete this.I.poster,this.play())});this.Na()}});s=t.g.prototype;s.dispose=function(){t.g.Gb(this.b);t.p.prototype.dispose.call(this)};
|
||||
s.e=function(){var a=this.d,c=a.I,d;if(!c||this.movingMediaElementInDOM===l)c?(d=c.cloneNode(l),t.g.Gb(c),c=d,a.I=k):(c=t.e("video"),d=videojs.W.pa({},a.se),(!t.wb||a.options().nativeControlsForTouch!==f)&&delete d.controls,t.Uc(c,t.h.z(d,{id:a.id()+"_html5_api","class":"vjs-tech"}))),c.player=a,t.Nb(c,a.w());d=["autoplay","preload","loop","muted"];for(var e=d.length-1;0<=e;e--){var g=d[e],h={};"undefined"!==typeof a.m[g]&&(h[g]=a.m[g]);t.Uc(c,h)}return c};
|
||||
s.Fd=function(a){"error"==a.type&&this.error()?this.j().error(this.error().code):(a.bubbles=l,this.j().l(a))};s.play=function(){this.b.play()};s.pause=function(){this.b.pause()};s.paused=function(){return this.b.paused};s.currentTime=function(){return this.b.currentTime};s.Wb=function(a){try{this.b.currentTime=a}catch(c){t.log(c,"Video is not ready. (Video.js)")}};s.duration=function(){return this.b.duration||0};s.buffered=function(){return this.b.buffered};s.volume=function(){return this.b.volume};
|
||||
s.oe=function(a){this.b.volume=a};s.muted=function(){return this.b.muted};s.le=function(a){this.b.muted=a};s.width=function(){return this.b.offsetWidth};s.height=function(){return this.b.offsetHeight};s.Ka=function(){return"function"==typeof this.b.webkitEnterFullScreen&&(/Android/.test(t.N)||!/Chrome|Mac OS X 10.5/.test(t.N))?f:l};
|
||||
s.Ac=function(){var a=this.b;"webkitDisplayingFullscreen"in a&&this.Q("webkitbeginfullscreen",function(){this.d.isFullscreen(f);this.Q("webkitendfullscreen",function(){this.d.isFullscreen(l);this.d.l("fullscreenchange")});this.d.l("fullscreenchange")});a.paused&&a.networkState<=a.ze?(this.b.play(),this.setTimeout(function(){a.pause();a.webkitEnterFullScreen()},0)):a.webkitEnterFullScreen()};s.Gd=function(){this.b.webkitExitFullScreen()};s.src=function(a){if(a===b)return this.b.src;this.ga(a)};
|
||||
s.ga=function(a){this.b.src=a};s.load=function(){this.b.load()};s.currentSrc=function(){return this.b.currentSrc};s.poster=function(){return this.b.poster};s.Vc=function(a){this.b.poster=a};s.Ha=function(){return this.b.Ha};s.ne=function(a){this.b.Ha=a};s.autoplay=function(){return this.b.autoplay};s.ie=function(a){this.b.autoplay=a};s.controls=function(){return this.b.controls};s.loop=function(){return this.b.loop};s.ke=function(a){this.b.loop=a};s.error=function(){return this.b.error};
|
||||
s.seeking=function(){return this.b.seeking};s.ended=function(){return this.b.ended};s.playbackRate=function(){return this.b.playbackRate};s.me=function(a){this.b.playbackRate=a};s.networkState=function(){return this.b.networkState};t.g.isSupported=function(){try{t.A.volume=0.5}catch(a){return l}return!!t.A.canPlayType};t.p.$b(t.g);t.g.V={};
|
||||
t.g.V.Wa=function(a){function c(a){try{return t.A.canPlayType(a)}catch(c){return""}}return a.type?c(a.type):a.src?(a=(a=a.src.match(/\.([^.\/\?]+)(\?[^\/]+)?$/i))&&a[1],c("video/"+a)):""};t.g.V.Mb=function(a,c){c.ga(a.src)};t.g.V.dispose=m();t.g.Ia(t.g.V);t.g.xd=function(){var a=t.A.volume;t.A.volume=a/2+0.1;return a!==t.A.volume};t.g.wd=function(){var a=t.A.playbackRate;t.A.playbackRate=a/2+0.1;return a!==t.A.playbackRate};t.g.prototype.featuresVolumeControl=t.g.xd();
|
||||
t.g.prototype.featuresPlaybackRate=t.g.wd();t.g.prototype.movingMediaElementInDOM=!t.kd;t.g.prototype.featuresFullscreenResize=f;t.g.prototype.featuresProgressEvents=f;var V,ga=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,ha=/^video\/mp4/i;
|
||||
t.g.Nc=function(){4<=t.ac&&(V||(V=t.A.constructor.prototype.canPlayType),t.A.constructor.prototype.canPlayType=function(a){return a&&ga.test(a)?"maybe":V.call(this,a)});t.od&&(V||(V=t.A.constructor.prototype.canPlayType),t.A.constructor.prototype.canPlayType=function(a){return a&&ha.test(a)?"maybe":V.call(this,a)})};t.g.we=function(){var a=t.A.constructor.prototype.canPlayType;t.A.constructor.prototype.canPlayType=V;V=k;return a};t.g.Nc();t.g.qb="loadstart suspend abort error emptied stalled loadedmetadata loadeddata canplay canplaythrough playing waiting seeking seeked ended durationchange timeupdate progress play pause ratechange volumechange".split(" ");
|
||||
t.g.Gb=function(a){if(a){a.player=k;for(a.parentNode&&a.parentNode.removeChild(a);a.hasChildNodes();)a.removeChild(a.firstChild);a.removeAttribute("src");if("function"===typeof a.load)try{a.load()}catch(c){}}};
|
||||
t.f=t.p.extend({i:function(a,c,d){t.p.call(this,a,c,d);var e=c.source;d=c.parentEl;var g=this.b=t.e("div",{id:a.id()+"_temp_flash"}),h=a.id()+"_flash_api",j=a.m,j=t.h.z({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:j.autoplay,preload:j.Ha,loop:j.loop,muted:j.muted},c.flashVars),p=t.h.z({wmode:"opaque",bgcolor:"#000000"},c.params),h=t.h.z({id:h,name:h,"class":"vjs-tech"},c.attributes);e&&this.H(function(){this.Ja(e)});
|
||||
t.Nb(g,d);c.startTime&&this.H(function(){this.load();this.play();this.currentTime(c.startTime)});t.jd&&this.H(function(){this.c("mousemove",function(){this.j().l({type:"mousemove",bubbles:l})})});a.c("stageclick",a.reportUserActivity);this.b=t.f.zc(c.swf,g,j,p,h)}});s=t.f.prototype;s.dispose=function(){t.p.prototype.dispose.call(this)};s.play=function(){this.b.vjs_play()};s.pause=function(){this.b.vjs_pause()};s.src=function(a){return a===b?this.currentSrc():this.ga(a)};
|
||||
s.ga=function(a){a=t.Jd(a);this.b.vjs_src(a);if(this.d.autoplay()){var c=this;this.setTimeout(function(){c.play()},0)}};t.f.prototype.setCurrentTime=function(a){this.Ud=a;this.b.vjs_setProperty("currentTime",a);t.p.prototype.Wb.call(this)};t.f.prototype.currentTime=function(){return this.seeking()?this.Ud||0:this.b.vjs_getProperty("currentTime")};t.f.prototype.currentSrc=function(){return this.vc?this.vc.src:this.b.vjs_getProperty("currentSrc")};t.f.prototype.load=function(){this.b.vjs_load()};
|
||||
t.f.prototype.poster=function(){this.b.vjs_getProperty("poster")};t.f.prototype.setPoster=m();t.f.prototype.buffered=function(){return t.Eb(0,this.b.vjs_getProperty("buffered"))};t.f.prototype.Ka=r(l);t.f.prototype.Ac=r(l);function ia(){var a=W[X],c=a.charAt(0).toUpperCase()+a.slice(1);ka["set"+c]=function(c){return this.b.vjs_setProperty(a,c)}}function la(a){ka[a]=function(){return this.b.vjs_getProperty(a)}}
|
||||
var ka=t.f.prototype,W="rtmpConnection rtmpStream preload defaultPlaybackRate playbackRate autoplay loop mediaGroup controller controls volume muted defaultMuted".split(" "),ma="error networkState readyState seeking initialTime duration startOffsetTime paused played seekable ended videoTracks audioTracks videoWidth videoHeight textTracks".split(" "),X;for(X=0;X<W.length;X++)la(W[X]),ia();for(X=0;X<ma.length;X++)la(ma[X]);t.f.isSupported=function(){return 10<=t.f.version()[0]};t.p.$b(t.f);t.f.V={};
|
||||
t.f.V.Wa=function(a){return!a.type?"":a.type.replace(/;.*/,"").toLowerCase()in t.f.Id?"maybe":""};t.f.V.Mb=function(a,c){c.ga(a.src)};t.f.V.dispose=m();t.f.Ia(t.f.V);t.f.Id={"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"};t.f.onReady=function(a){var c;if(c=(a=t.w(a))&&a.parentNode&&a.parentNode.player)a.player=c,t.f.checkReady(c.o)};t.f.checkReady=function(a){a.w()&&(a.w().vjs_getProperty?a.Na():this.setTimeout(function(){t.f.checkReady(a)},50))};
|
||||
t.f.onEvent=function(a,c){t.w(a).player.l(c)};t.f.onError=function(a,c){var d=t.w(a).player,e="FLASH: "+c;"srcnotfound"==c?d.error({code:4,message:e}):d.error(e)};
|
||||
t.f.version=function(){var a="0,0,0";try{a=(new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(c){try{navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin&&(a=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1])}catch(d){}}return a.split(",")};
|
||||
t.f.zc=function(a,c,d,e,g){a=t.f.Ld(a,d,e,g);a=t.e("div",{innerHTML:a}).childNodes[0];d=c.parentNode;c.parentNode.replaceChild(a,c);var h=d.childNodes[0];setTimeout(function(){h.style.display="block"},1E3);return a};
|
||||
t.f.Ld=function(a,c,d,e){var g="",h="",j="";c&&t.h.Y(c,function(a,c){g+=a+"="+c+"&"});d=t.h.z({movie:a,flashvars:g,allowScriptAccess:"always",allowNetworking:"all"},d);t.h.Y(d,function(a,c){h+='<param name="'+a+'" value="'+c+'" />'});e=t.h.z({data:a,width:"100%",height:"100%"},e);t.h.Y(e,function(a,c){j+=a+'="'+c+'" '});return'<object type="application/x-shockwave-flash" '+j+">"+h+"</object>"};t.f.qe={"rtmp/mp4":"MP4","rtmp/flv":"FLV"};t.f.Je=function(a,c){return a+"&"+c};
|
||||
t.f.pe=function(a){var c={tc:"",$c:""};if(!a)return c;var d=a.indexOf("&"),e;-1!==d?e=d+1:(d=e=a.lastIndexOf("/")+1,0===d&&(d=e=a.length));c.tc=a.substring(0,d);c.$c=a.substring(e,a.length);return c};t.f.Rd=function(a){return a in t.f.qe};t.f.qd=/^rtmp[set]?:\/\//i;t.f.Qd=function(a){return t.f.qd.test(a)};t.f.Vb={};t.f.Vb.Wa=function(a){return t.f.Rd(a.type)||t.f.Qd(a.src)?"maybe":""};t.f.Vb.Mb=function(a,c){var d=t.f.pe(a.src);c.setRtmpConnection(d.tc);c.setRtmpStream(d.$c)};t.f.Ia(t.f.Vb);
|
||||
t.pd=t.a.extend({i:function(a,c,d){t.a.call(this,a,c,d);if(!a.m.sources||0===a.m.sources.length){c=0;for(d=a.m.techOrder;c<d.length;c++){var e=t.ba(d[c]),g=window.videojs[e];if(g&&g.isSupported()){Q(a,e);break}}}else a.src(a.m.sources)}});t.Player.prototype.textTracks=function(){return this.Ma=this.Ma||[]};
|
||||
function na(a,c,d,e,g){var h=a.Ma=a.Ma||[];g=g||{};g.kind=c;g.label=d;g.language=e;c=t.ba(c||"subtitles");var j=new window.videojs[c+"Track"](a,g);h.push(j);j.Fb()&&a.H(function(){this.setTimeout(function(){Y(j.j(),j.id())},0)})}function Y(a,c,d){for(var e=a.Ma,g=0,h=e.length,j,p;g<h;g++)j=e[g],j.id()===c?(j.show(),p=j):d&&(j.M()==d&&0<j.mode())&&j.disable();(c=p?p.M():d?d:l)&&a.l(c+"trackchange")}
|
||||
t.B=t.a.extend({i:function(a,c){t.a.call(this,a,c);this.K=c.id||"vjs_"+c.kind+"_"+c.language+"_"+t.q++;this.Xc=c.src;this.Cd=c["default"]||c.dflt;this.ue=c.title;this.bb=c.srclang;this.Sd=c.label;this.ca=[];this.Ab=[];this.qa=this.sa=0;a.c("dispose",t.bind(this,this.yc,this.K))}});s=t.B.prototype;s.M=n("G");s.src=n("Xc");s.Fb=n("Cd");s.title=n("ue");s.language=n("bb");s.label=n("Sd");s.yd=n("ca");s.rd=n("Ab");s.readyState=n("sa");s.mode=n("qa");
|
||||
s.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-"+this.G+" vjs-text-track"})};s.show=function(){oa(this);this.qa=2;t.a.prototype.show.call(this)};s.Z=function(){oa(this);this.qa=1;t.a.prototype.Z.call(this)};s.disable=function(){2==this.qa&&this.Z();this.yc();this.qa=0};function oa(a){0===a.sa&&a.load();0===a.qa&&(a.d.c("timeupdate",t.bind(a,a.update,a.K)),a.d.c("ended",t.bind(a,a.reset,a.K)),("captions"===a.G||"subtitles"===a.G)&&a.d.na("textTrackDisplay").U(a))}
|
||||
s.yc=function(){this.d.k("timeupdate",t.bind(this,this.update,this.K));this.d.k("ended",t.bind(this,this.reset,this.K));this.reset();this.d.na("textTrackDisplay").removeChild(this)};
|
||||
s.load=function(){0===this.sa&&(this.sa=1,t.ye(this.Xc,t.bind(this,function(a,c,d){if(a)this.error=a,this.sa=3,this.l("error");else{var e,g;a=d.split("\n");c="";d=1;for(var h=a.length;d<h;d++)if(c=t.trim(a[d])){-1==c.indexOf("--\x3e")?(e=c,c=t.trim(a[++d])):e=this.ca.length;e={id:e,index:this.ca.length};g=c.split(/[\t ]+/);e.startTime=pa(g[0]);e.Ca=pa(g[2]);for(g=[];a[++d]&&(c=t.trim(a[d]));)g.push(c);e.text=g.join("<br/>");this.ca.push(e)}this.sa=2;this.l("loaded")}})))};
|
||||
function pa(a){var c=a.split(":");a=0;var d,e,g;3==c.length?(d=c[0],e=c[1],c=c[2]):(d=0,e=c[0],c=c[1]);c=c.split(/\s+/);c=c.splice(0,1)[0];c=c.split(/\.|,/);g=parseFloat(c[1]);c=c[0];a+=3600*parseFloat(d);a+=60*parseFloat(e);a+=parseFloat(c);g&&(a+=g/1E3);return a}
|
||||
s.update=function(){if(0<this.ca.length){var a=this.d.options().trackTimeOffset||0,a=this.d.currentTime()+a;if(this.Ub===b||a<this.Ub||this.cb<=a){var c=this.ca,d=this.d.duration(),e=0,g=l,h=[],j,p,q,w;a>=this.cb||this.cb===b?w=this.Jb!==b?this.Jb:0:(g=f,w=this.Qb!==b?this.Qb:c.length-1);for(;;){q=c[w];if(q.Ca<=a)e=Math.max(e,q.Ca),q.Ua&&(q.Ua=l);else if(a<q.startTime){if(d=Math.min(d,q.startTime),q.Ua&&(q.Ua=l),!g)break}else g?(h.splice(0,0,q),p===b&&(p=w),j=w):(h.push(q),j===b&&(j=w),p=w),d=Math.min(d,
|
||||
q.Ca),e=Math.max(e,q.startTime),q.Ua=f;if(g)if(0===w)break;else w--;else if(w===c.length-1)break;else w++}this.Ab=h;this.cb=d;this.Ub=e;this.Jb=j;this.Qb=p;j=this.Ab;p="";a=0;for(c=j.length;a<c;a++)p+='<span class="vjs-tt-cue">'+j[a].text+"</span>";this.b.innerHTML=p;this.l("cuechange")}}};s.reset=function(){this.cb=0;this.Ub=this.d.duration();this.Qb=this.Jb=0};t.cc=t.B.extend();t.cc.prototype.G="captions";t.lc=t.B.extend();t.lc.prototype.G="subtitles";t.dc=t.B.extend();t.dc.prototype.G="chapters";
|
||||
t.mc=t.a.extend({i:function(a,c,d){t.a.call(this,a,c,d);if(a.m.tracks&&0<a.m.tracks.length){c=this.d;a=a.m.tracks;for(var e=0;e<a.length;e++)d=a[e],na(c,d.kind,d.label,d.language,d)}}});t.mc.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-text-track-display"})};t.aa=t.J.extend({i:function(a,c){var d=this.ha=c.track;c.label=d.label();c.selected=d.Fb();t.J.call(this,a,c);this.c(a,d.M()+"trackchange",this.update)}});
|
||||
t.aa.prototype.s=function(){t.J.prototype.s.call(this);Y(this.d,this.ha.K,this.ha.M())};t.aa.prototype.update=function(){this.selected(2==this.ha.mode())};t.sb=t.aa.extend({i:function(a,c){c.track={M:function(){return c.kind},j:a,label:function(){return c.kind+" off"},Fb:r(l),mode:r(l)};t.aa.call(this,a,c);this.selected(f)}});t.sb.prototype.s=function(){t.aa.prototype.s.call(this);Y(this.d,this.ha.K,this.ha.M())};
|
||||
t.sb.prototype.update=function(){for(var a=this.d.textTracks(),c=0,d=a.length,e,g=f;c<d;c++)e=a[c],e.M()==this.ha.M()&&2==e.mode()&&(g=l);this.selected(g)};t.T=t.L.extend({i:function(a,c){t.L.call(this,a,c);1>=this.P.length&&this.Z()}});t.T.prototype.za=function(){var a=[],c;a.push(new t.sb(this.d,{kind:this.G}));for(var d=0;d<this.d.textTracks().length;d++)c=this.d.textTracks()[d],c.M()===this.G&&a.push(new t.aa(this.d,{track:c}));return a};
|
||||
t.Oa=t.T.extend({i:function(a,c,d){t.T.call(this,a,c,d);this.b.setAttribute("aria-label","Captions Menu")}});t.Oa.prototype.G="captions";t.Oa.prototype.la="Captions";t.Oa.prototype.className="vjs-captions-button";t.Ta=t.T.extend({i:function(a,c,d){t.T.call(this,a,c,d);this.b.setAttribute("aria-label","Subtitles Menu")}});t.Ta.prototype.G="subtitles";t.Ta.prototype.la="Subtitles";t.Ta.prototype.className="vjs-subtitles-button";
|
||||
t.Pa=t.T.extend({i:function(a,c,d){t.T.call(this,a,c,d);this.b.setAttribute("aria-label","Chapters Menu")}});s=t.Pa.prototype;s.G="chapters";s.la="Chapters";s.className="vjs-chapters-button";s.za=function(){for(var a=[],c,d=0;d<this.d.textTracks().length;d++)c=this.d.textTracks()[d],c.M()===this.G&&a.push(new t.aa(this.d,{track:c}));return a};
|
||||
s.Aa=function(){for(var a=this.d.textTracks(),c=0,d=a.length,e,g,h=this.P=[];c<d;c++)if(e=a[c],e.M()==this.G)if(0===e.readyState())e.load(),e.c("loaded",t.bind(this,this.Aa));else{g=e;break}a=this.Fa;a===b&&(a=new t.ja(this.d),a.ma().appendChild(t.e("li",{className:"vjs-menu-title",innerHTML:t.ba(this.G),re:-1})));if(g){e=g.ca;for(var j,c=0,d=e.length;c<d;c++)j=e[c],j=new t.mb(this.d,{track:g,cue:j}),h.push(j),a.U(j);this.U(a)}0<this.P.length&&this.show();return a};
|
||||
t.mb=t.J.extend({i:function(a,c){var d=this.ha=c.track,e=this.cue=c.cue,g=a.currentTime();c.label=e.text;c.selected=e.startTime<=g&&g<e.Ca;t.J.call(this,a,c);d.c("cuechange",t.bind(this,this.update))}});t.mb.prototype.s=function(){t.J.prototype.s.call(this);this.d.currentTime(this.cue.startTime);this.update(this.cue.startTime)};t.mb.prototype.update=function(){var a=this.cue,c=this.d.currentTime();this.selected(a.startTime<=c&&c<a.Ca)};
|
||||
t.h.z(t.Qa.prototype.m.children,{subtitlesButton:{},captionsButton:{},chaptersButton:{}});
|
||||
if("undefined"!==typeof window.JSON&&"function"===typeof window.JSON.parse)t.JSON=window.JSON;else{t.JSON={};var Z=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;t.JSON.parse=function(a,c){function d(a,e){var j,p,q=a[e];if(q&&"object"===typeof q)for(j in q)Object.prototype.hasOwnProperty.call(q,j)&&(p=d(q,j),p!==b?q[j]=p:delete q[j]);return c.call(a,e,q)}var e;a=String(a);Z.lastIndex=0;Z.test(a)&&(a=a.replace(Z,function(a){return"\\u"+("0000"+
|
||||
a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof c?d({"":e},""):e;throw new SyntaxError("JSON.parse(): invalid or malformed JSON data");}}
|
||||
t.qc=function(){var a,c,d,e;a=document.getElementsByTagName("video");c=document.getElementsByTagName("audio");var g=[];if(a&&0<a.length){d=0;for(e=a.length;d<e;d++)g.push(a[d])}if(c&&0<c.length){d=0;for(e=c.length;d<e;d++)g.push(c[d])}if(g&&0<g.length){d=0;for(e=g.length;d<e;d++)if((c=g[d])&&c.getAttribute)c.player===b&&(a=c.getAttribute("data-setup"),a!==k&&videojs(c));else{t.Bb();break}}else t.dd||t.Bb()};t.Bb=function(){setTimeout(t.qc,1)};
|
||||
"complete"===document.readyState?t.dd=f:t.Q(window,"load",function(){t.dd=f});t.Bb();t.ge=function(a,c){t.Player.prototype[a]=c};var qa=this;function $(a,c){var d=a.split("."),e=qa;!(d[0]in e)&&e.execScript&&e.execScript("var "+d[0]);for(var g;d.length&&(g=d.shift());)!d.length&&c!==b?e[g]=c:e=e[g]?e[g]:e[g]={}};$("videojs",t);$("_V_",t);$("videojs.options",t.options);$("videojs.players",t.Ga);$("videojs.TOUCH_ENABLED",t.wb);$("videojs.cache",t.ya);$("videojs.Component",t.a);t.a.prototype.player=t.a.prototype.j;t.a.prototype.options=t.a.prototype.options;t.a.prototype.init=t.a.prototype.i;t.a.prototype.dispose=t.a.prototype.dispose;t.a.prototype.createEl=t.a.prototype.e;t.a.prototype.contentEl=t.a.prototype.ma;t.a.prototype.el=t.a.prototype.w;t.a.prototype.addChild=t.a.prototype.U;
|
||||
t.a.prototype.getChild=t.a.prototype.na;t.a.prototype.getChildById=t.a.prototype.Kd;t.a.prototype.children=t.a.prototype.children;t.a.prototype.initChildren=t.a.prototype.Gc;t.a.prototype.removeChild=t.a.prototype.removeChild;t.a.prototype.on=t.a.prototype.c;t.a.prototype.off=t.a.prototype.k;t.a.prototype.one=t.a.prototype.Q;t.a.prototype.trigger=t.a.prototype.l;t.a.prototype.triggerReady=t.a.prototype.Na;t.a.prototype.show=t.a.prototype.show;t.a.prototype.hide=t.a.prototype.Z;
|
||||
t.a.prototype.width=t.a.prototype.width;t.a.prototype.height=t.a.prototype.height;t.a.prototype.dimensions=t.a.prototype.Dd;t.a.prototype.ready=t.a.prototype.H;t.a.prototype.addClass=t.a.prototype.n;t.a.prototype.removeClass=t.a.prototype.r;t.a.prototype.buildCSSClass=t.a.prototype.S;t.a.prototype.localize=t.a.prototype.t;t.a.prototype.setInterval=t.a.prototype.setInterval;t.a.prototype.setTimeout=t.a.prototype.setTimeout;t.Player.prototype.ended=t.Player.prototype.ended;
|
||||
t.Player.prototype.enterFullWindow=t.Player.prototype.Bc;t.Player.prototype.exitFullWindow=t.Player.prototype.Hb;t.Player.prototype.preload=t.Player.prototype.Ha;t.Player.prototype.remainingTime=t.Player.prototype.remainingTime;t.Player.prototype.supportsFullScreen=t.Player.prototype.Ka;t.Player.prototype.currentType=t.Player.prototype.zd;t.Player.prototype.requestFullScreen=t.Player.prototype.requestFullScreen;t.Player.prototype.requestFullscreen=t.Player.prototype.requestFullscreen;
|
||||
t.Player.prototype.cancelFullScreen=t.Player.prototype.cancelFullScreen;t.Player.prototype.exitFullscreen=t.Player.prototype.exitFullscreen;t.Player.prototype.isFullScreen=t.Player.prototype.isFullScreen;t.Player.prototype.isFullscreen=t.Player.prototype.isFullscreen;$("videojs.MediaLoader",t.pd);$("videojs.TextTrackDisplay",t.mc);$("videojs.ControlBar",t.Qa);$("videojs.Button",t.u);$("videojs.PlayToggle",t.hc);$("videojs.FullscreenToggle",t.Ra);$("videojs.BigPlayButton",t.lb);
|
||||
$("videojs.LoadingSpinner",t.fc);$("videojs.CurrentTimeDisplay",t.nb);$("videojs.DurationDisplay",t.ob);$("videojs.TimeDivider",t.nc);$("videojs.RemainingTimeDisplay",t.vb);$("videojs.LiveDisplay",t.ec);$("videojs.ErrorDisplay",t.pb);$("videojs.Slider",t.R);$("videojs.ProgressControl",t.ub);$("videojs.SeekBar",t.kc);$("videojs.LoadProgressBar",t.rb);$("videojs.PlayProgressBar",t.gc);$("videojs.SeekHandle",t.Sa);$("videojs.VolumeControl",t.yb);$("videojs.VolumeBar",t.xb);$("videojs.VolumeLevel",t.oc);
|
||||
$("videojs.VolumeMenuButton",t.wa);$("videojs.VolumeHandle",t.zb);$("videojs.MuteToggle",t.ka);$("videojs.PosterImage",t.jc);$("videojs.Menu",t.ja);$("videojs.MenuItem",t.J);$("videojs.MenuButton",t.L);$("videojs.PlaybackRateMenuButton",t.ic);t.L.prototype.createItems=t.L.prototype.za;t.T.prototype.createItems=t.T.prototype.za;t.Pa.prototype.createItems=t.Pa.prototype.za;$("videojs.SubtitlesButton",t.Ta);$("videojs.CaptionsButton",t.Oa);$("videojs.ChaptersButton",t.Pa);
|
||||
$("videojs.MediaTechController",t.p);t.p.withSourceHandlers=t.p.$b;t.p.prototype.featuresVolumeControl=t.p.prototype.Ge;t.p.prototype.featuresFullscreenResize=t.p.prototype.Ce;t.p.prototype.featuresPlaybackRate=t.p.prototype.De;t.p.prototype.featuresProgressEvents=t.p.prototype.Ee;t.p.prototype.featuresTimeupdateEvents=t.p.prototype.Fe;t.p.prototype.setPoster=t.p.prototype.Vc;$("videojs.Html5",t.g);t.g.Events=t.g.qb;t.g.isSupported=t.g.isSupported;t.g.canPlaySource=t.g.rc;t.g.patchCanPlayType=t.g.Nc;
|
||||
t.g.unpatchCanPlayType=t.g.we;t.g.prototype.setCurrentTime=t.g.prototype.Wb;t.g.prototype.setVolume=t.g.prototype.oe;t.g.prototype.setMuted=t.g.prototype.le;t.g.prototype.setPreload=t.g.prototype.ne;t.g.prototype.setAutoplay=t.g.prototype.ie;t.g.prototype.setLoop=t.g.prototype.ke;t.g.prototype.enterFullScreen=t.g.prototype.Ac;t.g.prototype.exitFullScreen=t.g.prototype.Gd;t.g.prototype.playbackRate=t.g.prototype.playbackRate;t.g.prototype.setPlaybackRate=t.g.prototype.me;
|
||||
t.g.registerSourceHandler=t.g.Ia;t.g.selectSourceHandler=t.g.jb;t.g.prototype.setSource=t.g.prototype.Ja;t.g.prototype.disposeSourceHandler=t.g.prototype.Ba;$("videojs.Flash",t.f);t.f.isSupported=t.f.isSupported;t.f.canPlaySource=t.f.rc;t.f.onReady=t.f.onReady;t.f.embed=t.f.zc;t.f.version=t.f.version;t.f.prototype.setSource=t.f.prototype.Ja;t.f.registerSourceHandler=t.f.Ia;t.f.selectSourceHandler=t.f.jb;t.f.prototype.setSource=t.f.prototype.Ja;t.f.prototype.disposeSourceHandler=t.f.prototype.Ba;
|
||||
$("videojs.TextTrack",t.B);t.B.prototype.label=t.B.prototype.label;t.B.prototype.kind=t.B.prototype.M;t.B.prototype.mode=t.B.prototype.mode;t.B.prototype.cues=t.B.prototype.yd;t.B.prototype.activeCues=t.B.prototype.rd;$("videojs.CaptionsTrack",t.cc);$("videojs.SubtitlesTrack",t.lc);$("videojs.ChaptersTrack",t.dc);$("videojs.autoSetup",t.qc);$("videojs.plugin",t.ge);$("videojs.createTimeRange",t.Eb);$("videojs.util",t.W);t.W.mergeOptions=t.W.pa;t.addLanguage=t.sd;})();
|
|
@ -127,7 +127,10 @@ if ( canEdit( 'Events' ) ) {
|
|||
<div id="editEvent"><a href="#" onclick="editEvent()"><?php echo translate('Edit') ?></a></div>
|
||||
<div id="archiveEvent" class="hidden"><a href="#" onclick="archiveEvent()"><?php echo translate('Archive') ?></a></div>
|
||||
<div id="unarchiveEvent" class="hidden"><a href="#" onclick="unarchiveEvent()"><?php echo translate('Unarchive') ?></a></div>
|
||||
<?php if ( $Event->DefaultVideo() ) { ?>
|
||||
<div id="downloadEventFile"><a href="<?php echo $Event->getStreamSrc()?>">Download MP4</a></div>
|
||||
<?php
|
||||
} // end if Event->DefaultVideo
|
||||
} // end if can edit Events
|
||||
if ( canView( 'Events' ) ) {
|
||||
?>
|
||||
|
@ -139,8 +142,8 @@ if ( $Event->SaveJPEGs() & 3 ) { // Analysis or Jpegs
|
|||
<?php
|
||||
} // has frames or analysis
|
||||
?>
|
||||
<div id="videoEvent"<?php if ( $streamMode == 'video' ) { ?> class="hidden"<?php } ?>><a href="#" onclick="showVideo()"><?php echo translate('Video') ?></a></div>
|
||||
<div id="exportEvent"><a href="#" onclick="exportEvent()"><?php echo translate('Export') ?></a></div>
|
||||
<div id="videoEvent"><a href="#" onclick="videoEvent();"><?php echo translate('Video') ?></a></div>
|
||||
<div id="exportEvent"><a href="#" onclick="exportEvent();"><?php echo translate('Export') ?></a></div>
|
||||
</div>
|
||||
<div id="eventVideo" class="">
|
||||
<?php
|
||||
|
|
|
@ -18,16 +18,14 @@
|
|||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
//
|
||||
|
||||
if ( !canView( 'Events' ) || (!empty($_REQUEST['execute']) && !canEdit('Events')) )
|
||||
{
|
||||
$view = "error";
|
||||
if ( !canView( 'Events' ) || (!empty($_REQUEST['execute']) && !canEdit('Events')) ) {
|
||||
$view = 'error';
|
||||
return;
|
||||
}
|
||||
|
||||
require_once( 'includes/Event.php' );
|
||||
|
||||
if ( !empty($_REQUEST['execute']) )
|
||||
{
|
||||
if ( !empty($_REQUEST['execute']) ) {
|
||||
executeFilter( $tempFilterName );
|
||||
}
|
||||
|
||||
|
@ -38,16 +36,15 @@ if ( $user['MonitorIds'] ) {
|
|||
$countSql .= $user_monitor_ids;
|
||||
$eventsSql .= $user_monitor_ids;
|
||||
} else {
|
||||
$countSql .= " 1";
|
||||
$eventsSql .= " 1";
|
||||
$countSql .= " 1";
|
||||
$eventsSql .= " 1";
|
||||
}
|
||||
|
||||
parseSort();
|
||||
parseFilter( $_REQUEST['filter'] );
|
||||
$filterQuery = $_REQUEST['filter']['query'];
|
||||
|
||||
if ( $_REQUEST['filter']['sql'] )
|
||||
{
|
||||
if ( $_REQUEST['filter']['sql'] ) {
|
||||
$countSql .= $_REQUEST['filter']['sql'];
|
||||
$eventsSql .= $_REQUEST['filter']['sql'];
|
||||
}
|
||||
|
@ -63,31 +60,28 @@ else
|
|||
$limit = 0;
|
||||
|
||||
$nEvents = dbFetchOne( $countSql, 'EventCount' );
|
||||
if ( !empty($limit) && $nEvents > $limit )
|
||||
{
|
||||
if ( !empty($limit) && $nEvents > $limit ) {
|
||||
$nEvents = $limit;
|
||||
}
|
||||
$pages = (int)ceil($nEvents/ZM_WEB_EVENTS_PER_PAGE);
|
||||
if ( !empty($page) ) {
|
||||
if ( $page < 0 )
|
||||
$page = 1;
|
||||
if ( $page > $pages )
|
||||
$page = $pages;
|
||||
if ( $page < 0 )
|
||||
$page = 1;
|
||||
else if ( $page > $pages )
|
||||
$page = $pages;
|
||||
}
|
||||
|
||||
if ( !empty($page) ) {
|
||||
$limitStart = (($page-1)*ZM_WEB_EVENTS_PER_PAGE);
|
||||
if ( empty( $limit ) )
|
||||
{
|
||||
$limitAmount = ZM_WEB_EVENTS_PER_PAGE;
|
||||
}
|
||||
else
|
||||
{
|
||||
$limitLeft = $limit - $limitStart;
|
||||
$limitAmount = ($limitLeft>ZM_WEB_EVENTS_PER_PAGE)?ZM_WEB_EVENTS_PER_PAGE:$limitLeft;
|
||||
}
|
||||
$eventsSql .= " limit $limitStart, $limitAmount";
|
||||
$limitStart = (($page-1)*ZM_WEB_EVENTS_PER_PAGE);
|
||||
if ( empty( $limit ) ) {
|
||||
$limitAmount = ZM_WEB_EVENTS_PER_PAGE;
|
||||
} else {
|
||||
$limitLeft = $limit - $limitStart;
|
||||
$limitAmount = ($limitLeft>ZM_WEB_EVENTS_PER_PAGE)?ZM_WEB_EVENTS_PER_PAGE:$limitLeft;
|
||||
}
|
||||
$eventsSql .= " limit $limitStart, $limitAmount";
|
||||
} elseif ( !empty( $limit ) ) {
|
||||
$eventsSql .= " limit 0, ".$limit;
|
||||
$eventsSql .= " limit 0, ".$limit;
|
||||
}
|
||||
|
||||
$maxWidth = 0;
|
||||
|
@ -95,20 +89,19 @@ $maxHeight = 0;
|
|||
$archived = false;
|
||||
$unarchived = false;
|
||||
$events = array();
|
||||
foreach ( dbFetchAll( $eventsSql ) as $event_row )
|
||||
{
|
||||
$events[] = $event = new Event( $event_row );
|
||||
foreach ( dbFetchAll( $eventsSql ) as $event_row ) {
|
||||
$events[] = $event = new Event( $event_row );
|
||||
|
||||
# Doesn this code do anything?
|
||||
$scale = max( reScale( SCALE_BASE, $event->DefaultScale(), ZM_WEB_DEFAULT_SCALE ), SCALE_BASE );
|
||||
$eventWidth = reScale( $event_row['Width'], $scale );
|
||||
$eventHeight = reScale( $event_row['Height'], $scale );
|
||||
if ( $maxWidth < $eventWidth ) $maxWidth = $eventWidth;
|
||||
if ( $maxHeight < $eventHeight ) $maxHeight = $eventHeight;
|
||||
if ( $event_row['Archived'] )
|
||||
$archived = true;
|
||||
else
|
||||
$unarchived = true;
|
||||
# Doesn this code do anything?
|
||||
$scale = max( reScale( SCALE_BASE, $event->DefaultScale(), ZM_WEB_DEFAULT_SCALE ), SCALE_BASE );
|
||||
$eventWidth = reScale( $event_row['Width'], $scale );
|
||||
$eventHeight = reScale( $event_row['Height'], $scale );
|
||||
if ( $maxWidth < $eventWidth ) $maxWidth = $eventWidth;
|
||||
if ( $maxHeight < $eventHeight ) $maxHeight = $eventHeight;
|
||||
if ( $event_row['Archived'] )
|
||||
$archived = true;
|
||||
else
|
||||
$unarchived = true;
|
||||
}
|
||||
|
||||
$maxShortcuts = 5;
|
||||
|
@ -124,16 +117,12 @@ xhtmlHeaders(__FILE__, translate('Events') );
|
|||
<div id="header">
|
||||
<div id="headerButtons">
|
||||
<?php
|
||||
if ( $pages > 1 )
|
||||
{
|
||||
if ( !empty($page) )
|
||||
{
|
||||
if ( $pages > 1 ) {
|
||||
if ( !empty($page) ) {
|
||||
?>
|
||||
<a href="?view=<?php echo $view ?>&page=0<?php echo $filterQuery ?><?php echo $sortQuery ?>&limit=<?php echo $limit ?>"><?php echo translate('ViewAll') ?></a>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
?>
|
||||
<a href="?view=<?php echo $view ?>&page=1<?php echo $filterQuery ?><?php echo $sortQuery ?>&limit=<?php echo $limit ?>"><?php echo translate('ViewPaged') ?></a>
|
||||
<?php
|
||||
|
@ -154,8 +143,7 @@ if ( $pages > 1 )
|
|||
<input type="hidden" name="sort_asc" value="<?php echo validHtmlStr($_REQUEST['sort_asc']) ?>"/>
|
||||
<input type="hidden" name="limit" value="<?php echo $limit ?>"/>
|
||||
<?php
|
||||
if ( $pagination )
|
||||
{
|
||||
if ( $pagination ) {
|
||||
?>
|
||||
<h3 class="pagination"><?php echo $pagination ?></h3>
|
||||
<?php
|
||||
|
@ -170,10 +158,8 @@ if ( $pagination )
|
|||
<tbody>
|
||||
<?php
|
||||
$count = 0;
|
||||
foreach ( $events as $event )
|
||||
{
|
||||
if ( ($count++%ZM_WEB_EVENTS_PER_PAGE) == 0 )
|
||||
{
|
||||
foreach ( $events as $event ) {
|
||||
if ( ($count++%ZM_WEB_EVENTS_PER_PAGE) == 0 ) {
|
||||
?>
|
||||
<tr>
|
||||
<th class="colId"><a href="<?php echo sortHeader( 'Id' ) ?>"><?php echo translate('Id') ?><?php echo sortTag( 'Id' ) ?></a></th>
|
||||
|
@ -191,18 +177,17 @@ foreach ( $events as $event )
|
|||
<th class="colDiskSpace"><a href="<?php echo sortHeader( 'DiskSpace' ) ?>"><?php echo translate('DiskSpace') ?><?php echo sortTag( 'DiskSpace' ) ?></a></th>
|
||||
<?php
|
||||
}
|
||||
if ( ZM_WEB_LIST_THUMBS )
|
||||
{
|
||||
if ( ZM_WEB_LIST_THUMBS ) {
|
||||
?>
|
||||
<th class="colThumbnail"><?php echo translate('Thumbnail') ?></th>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
<th class="colMark"><input type="checkbox" name="toggleCheck" value="1" onclick="toggleCheckbox( this, 'markEids' );"<?php if ( !canEdit( 'Events' ) ) { ?> disabled="disabled"<?php } ?>/></th>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
$scale = max( reScale( SCALE_BASE, $event->DefaultScale(), ZM_WEB_DEFAULT_SCALE ), SCALE_BASE );
|
||||
$scale = max( reScale( SCALE_BASE, $event->DefaultScale(), ZM_WEB_DEFAULT_SCALE ), SCALE_BASE );
|
||||
?>
|
||||
<tr>
|
||||
<td class="colId"><?php echo makePopupLink( '?view=event&eid='.$event->Id().$filterQuery.$sortQuery.'&page=1', 'zmEvent', array( 'event', reScale( $event->Width(), $scale ), reScale( $event->Height(), $scale ) ), $event->Id().($event->Archived()?'*':'') ) ?></td>
|
||||
|
@ -220,16 +205,26 @@ foreach ( $events as $event )
|
|||
<td class="colDiskSpace"><?php echo human_filesize( $event->DiskSpace() ) ?></td>
|
||||
<?php
|
||||
}
|
||||
if ( ZM_WEB_LIST_THUMBS )
|
||||
{
|
||||
if ( $thumbData = $event->createListThumbnail() )
|
||||
{
|
||||
if ( ZM_WEB_LIST_THUMBS ) {
|
||||
if ( $thumbData = $event->createListThumbnail() ) {
|
||||
?>
|
||||
<td class="colThumbnail"><?php echo makePopupLink( '?view=frame&eid='.$event->Id().'&fid='.$thumbData['FrameId'], 'zmImage', array( 'image', reScale( $event->Width(), $scale ), reScale( $event->Height(), $scale ) ), '<img src="?view=image&eid='.$event->Id().'&fid='.$thumbData['FrameId'].'&width='.$thumbData['Width'].'&height='.$thumbData['Height'].'" width="'.$thumbData['Width'].'" height="'.$thumbData['Height'].'" alt="'.$thumbData['FrameId'].'/'.$event->MaxScore().'"/>' ) ?></td>
|
||||
<td class="colThumbnail">
|
||||
<?php
|
||||
|
||||
$imgSrc = '?view=image&eid='.$event->Id().'&fid='.$thumbData['FrameId'].'&width='.$thumbData['Width'].'&height='.$thumbData['Height'];
|
||||
$streamSrc = getStreamSrc( array( "source=event", "mode=jpeg", "event=".$event->Id(), "scale=".$scale, "maxfps=".ZM_WEB_VIDEO_MAXFPS, "replay=single") );
|
||||
|
||||
$imgHtml = '<img id="thumbnail'.$event->id().'" src="'.$imgSrc.'" alt="'. validHtmlStr('Event '.$event->Id()) .'" style="width:'. validInt($thumbData['Width']) .'px;height:'. validInt( $thumbData['Height'] ).'px;" onmouseover="this.src=\''.$streamSrc.'\';" onmouseout="this.src=\''.$imgSrc.'\';"/>';
|
||||
|
||||
echo makePopupLink(
|
||||
'?view=frame&eid='.$event->Id().'&fid='.$thumbData['FrameId'],
|
||||
'zmImage',
|
||||
array( 'image', reScale( $event->Width(), $scale ), reScale( $event->Height(), $scale ) ),
|
||||
$imgHtml
|
||||
);
|
||||
?></td>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
?>
|
||||
<td class="colThumbnail"> </td>
|
||||
<?php
|
||||
|
|