Merged in MPEG streaming.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@916 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
parent
de93828672
commit
3d245e1ab0
192
Makefile.in
192
Makefile.in
|
@ -1,4 +1,4 @@
|
|||
# Makefile.in generated by automake 1.7 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.6.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
|
@ -13,108 +13,81 @@
|
|||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = .
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
transform = @program_transform_name@
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
|
||||
EXEEXT = @EXEEXT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CGI_PREFIX = @CGI_PREFIX@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
FFMPEG_CFLAGS = @FFMPEG_CFLAGS@
|
||||
FFMPEG_LIBS = @FFMPEG_LIBS@
|
||||
FFMPEG_PREFIX = @FFMPEG_PREFIX@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
LAME_LIBS = @LAME_LIBS@
|
||||
LAME_PREFIX = @LAME_PREFIX@
|
||||
MYSQL_CFLAGS = @MYSQL_CFLAGS@
|
||||
MYSQL_LIBS = @MYSQL_LIBS@
|
||||
MYSQL_PREFIX = @MYSQL_PREFIX@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
WEB_GROUP = @WEB_GROUP@
|
||||
WEB_PREFIX = @WEB_PREFIX@
|
||||
WEB_USER = @WEB_USER@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
XLIBS = @XLIBS@
|
||||
am__include = @am__include@
|
||||
am__quote = @am__quote@
|
||||
bindir = @bindir@
|
||||
build_alias = @build_alias@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host_alias = @host_alias@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
AUTOMAKE_OPTIONS = gnu
|
||||
|
||||
SUBDIRS = \
|
||||
|
@ -138,11 +111,10 @@ CONFIG_HEADER = config.h
|
|||
CONFIG_CLEAN_FILES = zmconfig.pl
|
||||
DIST_SOURCES =
|
||||
|
||||
RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
|
||||
ps-recursive install-info-recursive uninstall-info-recursive \
|
||||
all-recursive install-data-recursive install-exec-recursive \
|
||||
installdirs-recursive install-recursive uninstall-recursive \
|
||||
check-recursive installcheck-recursive
|
||||
RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
|
||||
uninstall-info-recursive all-recursive install-data-recursive \
|
||||
install-exec-recursive installdirs-recursive install-recursive \
|
||||
uninstall-recursive check-recursive installcheck-recursive
|
||||
DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \
|
||||
Makefile.in NEWS TODO aclocal.m4 config.h.in configure \
|
||||
configure.in depcomp install-sh missing mkinstalldirs \
|
||||
|
@ -243,17 +215,10 @@ tags-recursive:
|
|||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ETAGS = etags
|
||||
ETAGSFLAGS =
|
||||
|
||||
CTAGS = ctags
|
||||
CTAGSFLAGS =
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
|
@ -284,28 +249,13 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
|||
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
top_distdir = .
|
||||
|
@ -317,18 +267,13 @@ am__remove_distdir = \
|
|||
&& rm -fr $(distdir); }; }
|
||||
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
mkdir $(distdir)
|
||||
$(mkinstalldirs) $(distdir)/.
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
esac; \
|
||||
@list='$(DISTFILES)'; for file in $$list; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
|
@ -385,10 +330,8 @@ distcheck: dist
|
|||
mkdir $(distdir)/=inst
|
||||
chmod a-w $(distdir)
|
||||
dc_install_base=`$(am__cd) $(distdir)/=inst && pwd` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& $(mkinstalldirs) $$dc_destdir \
|
||||
&& cd $(distdir)/=build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
|
@ -396,37 +339,23 @@ distcheck: dist
|
|||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& (test `find $$dc_install_base -type f -print | wc -l` -le 1 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
find $$dc_install_base -type f -print ; \
|
||||
exit 1; } >&2 ) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
|
||||
&& rm -f $(distdir).tar.gz \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
|
||||
$(am__remove_distdir)
|
||||
@echo "$(distdir).tar.gz is ready for distribution" | \
|
||||
sed 'h;s/./=/g;p;x;p;x'
|
||||
distuninstallcheck:
|
||||
cd $(distuninstallcheck_dir) \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
fi ; \
|
||||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean
|
||||
if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
|| { echo "ERROR: files left after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
|
@ -494,24 +423,15 @@ mostlyclean: mostlyclean-recursive
|
|||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
uninstall-info: uninstall-info-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
|
||||
clean-generic clean-recursive ctags ctags-recursive dist \
|
||||
dist-all dist-gzip distcheck distclean distclean-generic \
|
||||
distclean-hdr distclean-recursive distclean-tags distcleancheck \
|
||||
distdir distuninstallcheck dvi dvi-am dvi-recursive info \
|
||||
info-am info-recursive install install-am install-data \
|
||||
.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \
|
||||
clean-generic clean-recursive dist dist-all dist-gzip distcheck \
|
||||
distclean distclean-generic distclean-hdr distclean-recursive \
|
||||
distclean-tags distcleancheck distdir dvi dvi-am dvi-recursive \
|
||||
info info-am info-recursive install install-am install-data \
|
||||
install-data-am install-data-recursive install-exec \
|
||||
install-exec-am install-exec-recursive install-info \
|
||||
install-info-am install-info-recursive install-man \
|
||||
|
@ -519,9 +439,9 @@ uninstall-info: uninstall-info-recursive
|
|||
installdirs installdirs-am installdirs-recursive \
|
||||
maintainer-clean maintainer-clean-generic \
|
||||
maintainer-clean-recursive mostlyclean mostlyclean-generic \
|
||||
mostlyclean-recursive pdf pdf-am pdf-recursive ps ps-am \
|
||||
ps-recursive tags tags-recursive uninstall uninstall-am \
|
||||
uninstall-info-am uninstall-info-recursive uninstall-recursive
|
||||
mostlyclean-recursive tags tags-recursive uninstall \
|
||||
uninstall-am uninstall-info-am uninstall-info-recursive \
|
||||
uninstall-recursive
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# generated automatically by aclocal 1.7 -*- Autoconf -*-
|
||||
# aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
# Free Software Foundation, Inc.
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -43,7 +43,7 @@
|
|||
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
|
||||
|
||||
|
||||
AC_PREREQ([2.54])
|
||||
AC_PREREQ([2.52])
|
||||
|
||||
# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
|
||||
# the ones we care about.
|
||||
|
@ -69,16 +69,6 @@ if test "`cd $srcdir && pwd`" != "`pwd`" &&
|
|||
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
||||
fi
|
||||
|
||||
# test whether we have cygpath
|
||||
if test -z "$CYGPATH_W"; then
|
||||
if (cygpath --version) >/dev/null 2>/dev/null; then
|
||||
CYGPATH_W='cygpath -w'
|
||||
else
|
||||
CYGPATH_W=echo
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([CYGPATH_W])
|
||||
|
||||
# Define the identity of the package.
|
||||
dnl Distinguish between old-style and new-style calls.
|
||||
m4_ifval([$2],
|
||||
|
@ -110,29 +100,17 @@ AC_REQUIRE([AC_PROG_AWK])dnl
|
|||
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||
|
||||
_AM_IF_OPTION([no-dependencies],,
|
||||
[AC_PROVIDE_IFELSE([AC_PROG_CC],
|
||||
[AC_PROVIDE_IFELSE([AC_PROG_][CC],
|
||||
[_AM_DEPENDENCIES(CC)],
|
||||
[define([AC_PROG_CC],
|
||||
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
|
||||
AC_PROVIDE_IFELSE([AC_PROG_CXX],
|
||||
[define([AC_PROG_][CC],
|
||||
defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
|
||||
AC_PROVIDE_IFELSE([AC_PROG_][CXX],
|
||||
[_AM_DEPENDENCIES(CXX)],
|
||||
[define([AC_PROG_CXX],
|
||||
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
|
||||
[define([AC_PROG_][CXX],
|
||||
defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
# When config.status generates a header, we must update the stamp-h file.
|
||||
# This file resides in the same directory as the config header
|
||||
# that is generated. The stamp files are numbered to have different names.
|
||||
|
||||
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
|
||||
# loop where config.status creates the headers, so we can generate
|
||||
# our stamp files there.
|
||||
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
|
||||
[_am_stamp_count=`expr ${_am_stamp_count-0} + 1`
|
||||
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
|
||||
|
||||
# Copyright 2002 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
|
@ -153,14 +131,14 @@ echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
|
|||
# ----------------------------
|
||||
# Automake X.Y traces this macro to ensure aclocal.m4 has been
|
||||
# generated from the m4 files accompanying Automake X.Y.
|
||||
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
|
||||
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"])
|
||||
|
||||
# AM_SET_CURRENT_AUTOMAKE_VERSION
|
||||
# -------------------------------
|
||||
# Call AM_AUTOMAKE_VERSION so it can be traced.
|
||||
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
|
||||
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
||||
[AM_AUTOMAKE_VERSION([1.7])])
|
||||
[AM_AUTOMAKE_VERSION([1.6.3])])
|
||||
|
||||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
|
||||
|
@ -555,9 +533,6 @@ else
|
|||
fi
|
||||
])
|
||||
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
|
||||
AM_CONDITIONAL([am__fastdep$1], [
|
||||
test "x$enable_dependency_tracking" != xno \
|
||||
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
|
||||
])
|
||||
|
||||
|
||||
|
@ -677,9 +652,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
|||
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
|
||||
])
|
||||
|
||||
# Check to see how 'make' treats includes. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
||||
# Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*-
|
||||
|
||||
# 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
|
||||
|
@ -719,7 +692,7 @@ echo "include confinc" > confmf
|
|||
# In particular we don't look at `^make:' because GNU make might
|
||||
# be invoked under some other name (usually "gmake"), in which
|
||||
# case it prints its new name instead of `make'.
|
||||
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
|
||||
if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
|
||||
am__include=include
|
||||
am__quote=
|
||||
_am_result=GNU
|
||||
|
@ -779,7 +752,7 @@ else
|
|||
fi
|
||||
AC_CONFIG_COMMANDS_PRE(
|
||||
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
|
||||
AC_MSG_ERROR([conditional "$1" was never defined.
|
||||
AC_MSG_ERROR([conditional \"$1\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally.])
|
||||
fi])])
|
||||
|
||||
|
@ -806,6 +779,58 @@ AC_PREREQ([2.52])
|
|||
|
||||
# serial 6
|
||||
|
||||
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
|
||||
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
|
||||
# When config.status generates a header, we must update the stamp-h file.
|
||||
# This file resides in the same directory as the config header
|
||||
# that is generated. We must strip everything past the first ":",
|
||||
# and everything past the last "/".
|
||||
|
||||
# _AM_DIRNAME(PATH)
|
||||
# -----------------
|
||||
# Like AS_DIRNAME, only do it during macro expansion
|
||||
AC_DEFUN([_AM_DIRNAME],
|
||||
[m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
|
||||
m4_if(regexp([$1], [^//\([^/]\|$\)]), -1,
|
||||
m4_if(regexp([$1], [^/.*]), -1,
|
||||
[.],
|
||||
patsubst([$1], [^\(/\).*], [\1])),
|
||||
patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
|
||||
patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
|
||||
])# _AM_DIRNAME
|
||||
|
||||
|
||||
# The stamp files are numbered to have different names.
|
||||
# We could number them on a directory basis, but that's additional
|
||||
# complications, let's have a unique counter.
|
||||
m4_define([_AM_STAMP_Count], [0])
|
||||
|
||||
|
||||
# _AM_STAMP(HEADER)
|
||||
# -----------------
|
||||
# The name of the stamp file for HEADER.
|
||||
AC_DEFUN([_AM_STAMP],
|
||||
[m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl
|
||||
AS_ESCAPE(_AM_DIRNAME(patsubst([$1],
|
||||
[:.*])))/stamp-h[]_AM_STAMP_Count])
|
||||
|
||||
|
||||
# _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS)
|
||||
# ------------------------------------------------------------
|
||||
# We used to try to get a real timestamp in stamp-h. But the fear is that
|
||||
# that will cause unnecessary cvs conflicts.
|
||||
AC_DEFUN([_AM_CONFIG_HEADER],
|
||||
[# Add the stamp file to the list of files AC keeps track of,
|
||||
# along with our hook.
|
||||
AC_CONFIG_HEADERS([$1],
|
||||
[# update the timestamp
|
||||
echo 'timestamp for $1' >"_AM_STAMP([$1])"
|
||||
$2],
|
||||
[$3])
|
||||
])# _AM_CONFIG_HEADER
|
||||
|
||||
|
||||
# AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)
|
||||
# --------------------------------------------------------------
|
||||
AC_DEFUN([AM_CONFIG_HEADER],
|
||||
[AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])
|
||||
])# AM_CONFIG_HEADER
|
||||
|
||||
|
|
|
@ -8,12 +8,21 @@
|
|||
don't. */
|
||||
#undef HAVE_DECL_STRSIGNAL
|
||||
|
||||
/* Define to 1 if you have the `avcodec' library (-lavcodec). */
|
||||
#undef HAVE_LIBAVCODEC
|
||||
|
||||
/* Define to 1 if you have the `avformat' library (-lavformat). */
|
||||
#undef HAVE_LIBAVFORMAT
|
||||
|
||||
/* Define to 1 if you have the `dl' library (-ldl). */
|
||||
#undef HAVE_LIBDL
|
||||
|
||||
/* Define to 1 if you have the `jpeg' library (-ljpeg). */
|
||||
#undef HAVE_LIBJPEG
|
||||
|
||||
/* Define to 1 if you have the `mp3lame' library (-lmp3lame). */
|
||||
#undef HAVE_LIBMP3LAME
|
||||
|
||||
/* Define to 1 if you have the `mysqlclient' library (-lmysqlclient). */
|
||||
#undef HAVE_LIBMYSQLCLIENT
|
||||
|
||||
|
|
|
@ -271,7 +271,7 @@ PACKAGE_STRING=
|
|||
PACKAGE_BUGREPORT=
|
||||
|
||||
ac_unique_file="src/zm.h"
|
||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE MYSQL_PREFIX MYSQL_LIBS MYSQL_CFLAGS WEB_PREFIX CGI_PREFIX WEB_USER WEB_GROUP CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CPP EGREP LIBOBJS LTLIBOBJS'
|
||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE MYSQL_PREFIX MYSQL_LIBS MYSQL_CFLAGS WEB_PREFIX CGI_PREFIX WEB_USER WEB_GROUP FFMPEG_PREFIX FFMPEG_LIBS FFMPEG_CFLAGS LAME_PREFIX LAME_LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE CPP EGREP XLIBS LIBOBJS LTLIBOBJS'
|
||||
ac_subst_files=''
|
||||
|
||||
# Initialize some variables set by options.
|
||||
|
@ -826,6 +826,8 @@ Optional Packages:
|
|||
--with-cgidir=<path> prefix of cgi directory. e.g. /var/www/cgi-bin or /www/vhtdocs/<site>/cgi-bin
|
||||
--with-webuser=<user> username of web user. e.g. apache or web
|
||||
--with-webgroup=<group> groupname of web group. e.g. apache or web
|
||||
--with-ffmpeg=<directory> location of ffmpeg build directory for libavcodec etc
|
||||
--with-lame=<directory> location of lame library directory for libmp3lame
|
||||
|
||||
Some influential environment variables:
|
||||
CC C compiler command
|
||||
|
@ -1244,7 +1246,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
|||
|
||||
|
||||
|
||||
am__api_version="1.7"
|
||||
am__api_version="1.6"
|
||||
ac_aux_dir=
|
||||
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
|
||||
if test -f $ac_dir/install-sh; then
|
||||
|
@ -1496,19 +1498,9 @@ echo "$as_me: error: source directory already configured; run \"make distclean\"
|
|||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
|
||||
# test whether we have cygpath
|
||||
if test -z "$CYGPATH_W"; then
|
||||
if (cygpath --version) >/dev/null 2>/dev/null; then
|
||||
CYGPATH_W='cygpath -w'
|
||||
else
|
||||
CYGPATH_W=echo
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE=zm
|
||||
VERSION=1.18.1
|
||||
VERSION=1.18.1-ms
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
|
@ -1634,10 +1626,14 @@ INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
|
|||
|
||||
|
||||
|
||||
# Add the stamp file to the list of files AC keeps track of,
|
||||
# along with our hook.
|
||||
ac_config_headers="$ac_config_headers config.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Check whether --with-mysql or --without-mysql was given.
|
||||
if test "${with_mysql+set}" = set; then
|
||||
withval="$with_mysql"
|
||||
|
@ -1732,6 +1728,60 @@ echo "$as_me: WARNING: You can call configure with the --with-webgroup option.
|
|||
fi;
|
||||
|
||||
|
||||
FFMPEG_PREFIX=
|
||||
# Ask group for web group name:.
|
||||
|
||||
# Check whether --with-ffmpeg or --without-ffmpeg was given.
|
||||
if test "${with_ffmpeg+set}" = set; then
|
||||
withval="$with_ffmpeg"
|
||||
FFMPEG_PREFIX=$with_ffmpeg
|
||||
else
|
||||
{ echo "$as_me:$LINENO: WARNING: You can call configure with the --with-ffmpeg option.
|
||||
This tells configure where to find the ffmpeg build directory within which are the libavcodec
|
||||
files that can be used to build true MPEG streaming into ZoneMinder.
|
||||
e.g. --with-ffmpeg=/home/ffmpeg-0.4.18" >&5
|
||||
echo "$as_me: WARNING: You can call configure with the --with-ffmpeg option.
|
||||
This tells configure where to find the ffmpeg build directory within which are the libavcodec
|
||||
files that can be used to build true MPEG streaming into ZoneMinder.
|
||||
e.g. --with-ffmpeg=/home/ffmpeg-0.4.18" >&2;}
|
||||
|
||||
fi;
|
||||
|
||||
FFMPEG_LIBS="-L${FFMPEG_PREFIX}/libavcodec -L${FFMPEG_PREFIX}/libavformat"
|
||||
FFMPEG_CFLAGS="-I${FFMPEG_PREFIX}/libavcodec -I${FFMPEG_PREFIX}/libavformat"
|
||||
|
||||
|
||||
|
||||
LDFLAGS="${FFMPEG_LIBS} $LDFLAGS"
|
||||
|
||||
LAME_PREFIX=
|
||||
# Ask group for web group name:.
|
||||
|
||||
# Check whether --with-lame or --without-lame was given.
|
||||
if test "${with_lame+set}" = set; then
|
||||
withval="$with_lame"
|
||||
LAME_PREFIX=$with_lame
|
||||
else
|
||||
{ echo "$as_me:$LINENO: WARNING: You can call configure with the --with-lame option.
|
||||
This tells configure where to find the Lame library which is used by the ffmpeg libraries
|
||||
to generate IE compatible MPEG streams. This option is only necessary if you have built the
|
||||
ffmpeg package with the --enable-mp3lame option and if the normal link cannot find the library.
|
||||
e.g. --with-lame=/use/local/lib" >&5
|
||||
echo "$as_me: WARNING: You can call configure with the --with-lame option.
|
||||
This tells configure where to find the Lame library which is used by the ffmpeg libraries
|
||||
to generate IE compatible MPEG streams. This option is only necessary if you have built the
|
||||
ffmpeg package with the --enable-mp3lame option and if the normal link cannot find the library.
|
||||
e.g. --with-lame=/use/local/lib" >&2;}
|
||||
|
||||
fi;
|
||||
|
||||
LAME_LIBS="-L${LAME_PREFIX}"
|
||||
#LAME_CFLAGS="-I${LAME_PREFIX}/libavcodec -I${LAME_PREFIX}/libavformat"
|
||||
|
||||
#AC_SUBST(LAME_CFLAGS)
|
||||
|
||||
LDFLAGS="${LAME_LIBS} $LDFLAGS"
|
||||
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
|
@ -2631,7 +2681,7 @@ echo "include confinc" > confmf
|
|||
# In particular we don't look at `^make:' because GNU make might
|
||||
# be invoked under some other name (usually "gmake"), in which
|
||||
# case it prints its new name instead of `make'.
|
||||
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
|
||||
if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
|
||||
am__include=include
|
||||
am__quote=
|
||||
_am_result=GNU
|
||||
|
@ -2742,18 +2792,6 @@ echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
|
|||
CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
|
||||
|
||||
|
||||
|
||||
if
|
||||
test "x$enable_dependency_tracking" != xno \
|
||||
&& test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
|
||||
am__fastdepCC_TRUE=
|
||||
am__fastdepCC_FALSE='#'
|
||||
else
|
||||
am__fastdepCC_TRUE='#'
|
||||
am__fastdepCC_FALSE=
|
||||
fi
|
||||
|
||||
|
||||
ac_ext=cc
|
||||
ac_cpp='$CXXCPP $CPPFLAGS'
|
||||
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
|
@ -3143,18 +3181,6 @@ echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6
|
|||
CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
|
||||
|
||||
|
||||
|
||||
if
|
||||
test "x$enable_dependency_tracking" != xno \
|
||||
&& test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
|
||||
am__fastdepCXX_TRUE=
|
||||
am__fastdepCXX_FALSE='#'
|
||||
else
|
||||
am__fastdepCXX_TRUE='#'
|
||||
am__fastdepCXX_FALSE=
|
||||
fi
|
||||
|
||||
|
||||
# Find a good install program. We prefer a C program (faster),
|
||||
# so one script is as good as another. But avoid the broken or
|
||||
# incompatible versions:
|
||||
|
@ -3681,6 +3707,8 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex
|
|||
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||
|
||||
|
||||
XLIBS=""
|
||||
|
||||
|
||||
echo "$as_me:$LINENO: checking whether round is declared" >&5
|
||||
echo $ECHO_N "checking whether round is declared... $ECHO_C" >&6
|
||||
|
@ -4082,6 +4110,211 @@ echo "$as_me: error: zm requires libmysqlclient.a" >&2;}
|
|||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
|
||||
#AC_CHECK_LIB(avcodec,avcodec_init,XLIBS="$XLIBS -lavcodec",AC_MSG_WARN(libavcodec.a is required for MPEG streaming))
|
||||
#AC_CHECK_LIB(avformat,av_new_stream,XLIBS="$XLIBS -lavformat",AC_MSG_WARN(libavformat.a is required for MPEG streaming),-lavcodec)
|
||||
|
||||
echo "$as_me:$LINENO: checking for avcodec_init in -lavcodec" >&5
|
||||
echo $ECHO_N "checking for avcodec_init in -lavcodec... $ECHO_C" >&6
|
||||
if test "${ac_cv_lib_avcodec_avcodec_init+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lavcodec $LIBS"
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
#line $LINENO "configure"
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
builtin and then its argument prototype would still apply. */
|
||||
char avcodec_init ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
avcodec_init ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||
(eval $ac_link) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -s conftest$ac_exeext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_cv_lib_avcodec_avcodec_init=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_lib_avcodec_avcodec_init=no
|
||||
fi
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_lib_avcodec_avcodec_init" >&5
|
||||
echo "${ECHO_T}$ac_cv_lib_avcodec_avcodec_init" >&6
|
||||
if test $ac_cv_lib_avcodec_avcodec_init = yes; then
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LIBAVCODEC 1
|
||||
_ACEOF
|
||||
|
||||
LIBS="-lavcodec $LIBS"
|
||||
|
||||
else
|
||||
{ echo "$as_me:$LINENO: WARNING: libavcodec.a is required for MPEG streaming" >&5
|
||||
echo "$as_me: WARNING: libavcodec.a is required for MPEG streaming" >&2;}
|
||||
fi
|
||||
|
||||
|
||||
echo "$as_me:$LINENO: checking for av_new_stream in -lavformat" >&5
|
||||
echo $ECHO_N "checking for av_new_stream in -lavformat... $ECHO_C" >&6
|
||||
if test "${ac_cv_lib_avformat_av_new_stream+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lavformat -lavcodec $LIBS"
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
#line $LINENO "configure"
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
builtin and then its argument prototype would still apply. */
|
||||
char av_new_stream ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
av_new_stream ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||
(eval $ac_link) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -s conftest$ac_exeext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_cv_lib_avformat_av_new_stream=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_lib_avformat_av_new_stream=no
|
||||
fi
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_lib_avformat_av_new_stream" >&5
|
||||
echo "${ECHO_T}$ac_cv_lib_avformat_av_new_stream" >&6
|
||||
if test $ac_cv_lib_avformat_av_new_stream = yes; then
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LIBAVFORMAT 1
|
||||
_ACEOF
|
||||
|
||||
LIBS="-lavformat $LIBS"
|
||||
|
||||
else
|
||||
{ echo "$as_me:$LINENO: WARNING: libavformat.a is required for MPEG streaming" >&5
|
||||
echo "$as_me: WARNING: libavformat.a is required for MPEG streaming" >&2;}
|
||||
fi
|
||||
|
||||
|
||||
echo "$as_me:$LINENO: checking for lame_init in -lmp3lame" >&5
|
||||
echo $ECHO_N "checking for lame_init in -lmp3lame... $ECHO_C" >&6
|
||||
if test "${ac_cv_lib_mp3lame_lame_init+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lmp3lame $LIBS"
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
#line $LINENO "configure"
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
builtin and then its argument prototype would still apply. */
|
||||
char lame_init ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
lame_init ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||
(eval $ac_link) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -s conftest$ac_exeext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_cv_lib_mp3lame_lame_init=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_lib_mp3lame_lame_init=no
|
||||
fi
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_lib_mp3lame_lame_init" >&5
|
||||
echo "${ECHO_T}$ac_cv_lib_mp3lame_lame_init" >&6
|
||||
if test $ac_cv_lib_mp3lame_lame_init = yes; then
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LIBMP3LAME 1
|
||||
_ACEOF
|
||||
|
||||
LIBS="-lmp3lame $LIBS"
|
||||
|
||||
else
|
||||
{ echo "$as_me:$LINENO: WARNING: libmp3lame.a may be required for IE compatible MPEG streaming" >&5
|
||||
echo "$as_me: WARNING: libmp3lame.a may be required for IE compatible MPEG streaming" >&2;}
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -4184,20 +4417,6 @@ echo "$as_me: error: conditional \"AMDEP\" was never defined.
|
|||
Usually this means the macro was only invoked conditionally." >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
|
||||
{ { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." >&5
|
||||
echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
|
||||
{ { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." >&5
|
||||
echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
|
||||
: ${CONFIG_STATUS=./config.status}
|
||||
ac_clean_files_save=$ac_clean_files
|
||||
|
@ -4737,7 +4956,6 @@ s,@LIBS@,$LIBS,;t t
|
|||
s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
|
||||
s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
|
||||
s,@INSTALL_DATA@,$INSTALL_DATA,;t t
|
||||
s,@CYGPATH_W@,$CYGPATH_W,;t t
|
||||
s,@PACKAGE@,$PACKAGE,;t t
|
||||
s,@VERSION@,$VERSION,;t t
|
||||
s,@ACLOCAL@,$ACLOCAL,;t t
|
||||
|
@ -4759,6 +4977,11 @@ s,@WEB_PREFIX@,$WEB_PREFIX,;t t
|
|||
s,@CGI_PREFIX@,$CGI_PREFIX,;t t
|
||||
s,@WEB_USER@,$WEB_USER,;t t
|
||||
s,@WEB_GROUP@,$WEB_GROUP,;t t
|
||||
s,@FFMPEG_PREFIX@,$FFMPEG_PREFIX,;t t
|
||||
s,@FFMPEG_LIBS@,$FFMPEG_LIBS,;t t
|
||||
s,@FFMPEG_CFLAGS@,$FFMPEG_CFLAGS,;t t
|
||||
s,@LAME_PREFIX@,$LAME_PREFIX,;t t
|
||||
s,@LAME_LIBS@,$LAME_LIBS,;t t
|
||||
s,@CC@,$CC,;t t
|
||||
s,@CFLAGS@,$CFLAGS,;t t
|
||||
s,@LDFLAGS@,$LDFLAGS,;t t
|
||||
|
@ -4773,16 +4996,13 @@ s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
|
|||
s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
|
||||
s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
|
||||
s,@CCDEPMODE@,$CCDEPMODE,;t t
|
||||
s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
|
||||
s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
|
||||
s,@CXX@,$CXX,;t t
|
||||
s,@CXXFLAGS@,$CXXFLAGS,;t t
|
||||
s,@ac_ct_CXX@,$ac_ct_CXX,;t t
|
||||
s,@CXXDEPMODE@,$CXXDEPMODE,;t t
|
||||
s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t
|
||||
s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t
|
||||
s,@CPP@,$CPP,;t t
|
||||
s,@EGREP@,$EGREP,;t t
|
||||
s,@XLIBS@,$XLIBS,;t t
|
||||
s,@LIBOBJS@,$LIBOBJS,;t t
|
||||
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
|
||||
CEOF
|
||||
|
@ -5210,19 +5430,12 @@ echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
|
|||
cat $tmp/config.h
|
||||
rm -f $tmp/config.h
|
||||
fi
|
||||
_am_stamp_count=`expr ${_am_stamp_count-0} + 1`
|
||||
echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
|
||||
$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X$ac_file : 'X\(//\)[^/]' \| \
|
||||
X$ac_file : 'X\(//\)$' \| \
|
||||
X$ac_file : 'X\(/\)' \| \
|
||||
. : '\(.\)' 2>/dev/null ||
|
||||
echo X$ac_file |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
|
||||
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
|
||||
/^X\(\/\/\)$/{ s//\1/; q; }
|
||||
/^X\(\/\).*/{ s//\1/; q; }
|
||||
s/.*/./; q'`/stamp-h$_am_stamp_count
|
||||
# Run the commands associated with the file.
|
||||
case $ac_file in
|
||||
config.h ) # update the timestamp
|
||||
echo 'timestamp for config.h' >"./stamp-h1"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
_ACEOF
|
||||
cat >>$CONFIG_STATUS <<\_ACEOF
|
||||
|
|
48
configure.in
48
configure.in
|
@ -1,5 +1,5 @@
|
|||
AC_INIT(src/zm.h)
|
||||
AM_INIT_AUTOMAKE(zm,1.18.1)
|
||||
AM_INIT_AUTOMAKE(zm,1.18.1-ms)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
AC_ARG_WITH(mysql,
|
||||
|
@ -59,6 +59,43 @@ AC_ARG_WITH(webgroup,
|
|||
)
|
||||
AC_SUBST(WEB_GROUP)
|
||||
|
||||
FFMPEG_PREFIX=
|
||||
# Ask group for web group name:.
|
||||
AC_ARG_WITH(ffmpeg,
|
||||
[ --with-ffmpeg=<directory> location of ffmpeg build directory for libavcodec etc],
|
||||
[FFMPEG_PREFIX=$with_ffmpeg],
|
||||
AC_MSG_WARN([You can call configure with the --with-ffmpeg option.
|
||||
This tells configure where to find the ffmpeg build directory within which are the libavcodec
|
||||
files that can be used to build true MPEG streaming into ZoneMinder.
|
||||
e.g. --with-ffmpeg=/home/ffmpeg-0.4.18])
|
||||
)
|
||||
AC_SUBST(FFMPEG_PREFIX)
|
||||
FFMPEG_LIBS="-L${FFMPEG_PREFIX}/libavcodec -L${FFMPEG_PREFIX}/libavformat"
|
||||
FFMPEG_CFLAGS="-I${FFMPEG_PREFIX}/libavcodec -I${FFMPEG_PREFIX}/libavformat"
|
||||
AC_SUBST(FFMPEG_LIBS)
|
||||
AC_SUBST(FFMPEG_CFLAGS)
|
||||
|
||||
LDFLAGS="${FFMPEG_LIBS} $LDFLAGS"
|
||||
|
||||
LAME_PREFIX=
|
||||
# Ask group for web group name:.
|
||||
AC_ARG_WITH(lame,
|
||||
[ --with-lame=<directory> location of lame library directory for libmp3lame],
|
||||
[LAME_PREFIX=$with_lame],
|
||||
AC_MSG_WARN([You can call configure with the --with-lame option.
|
||||
This tells configure where to find the Lame library which is used by the ffmpeg libraries
|
||||
to generate IE compatible MPEG streams. This option is only necessary if you have built the
|
||||
ffmpeg package with the --enable-mp3lame option and if the normal link cannot find the library.
|
||||
e.g. --with-lame=/use/local/lib])
|
||||
)
|
||||
AC_SUBST(LAME_PREFIX)
|
||||
LAME_LIBS="-L${LAME_PREFIX}"
|
||||
#LAME_CFLAGS="-I${LAME_PREFIX}/libavcodec -I${LAME_PREFIX}/libavformat"
|
||||
AC_SUBST(LAME_LIBS)
|
||||
#AC_SUBST(LAME_CFLAGS)
|
||||
|
||||
LDFLAGS="${LAME_LIBS} $LDFLAGS"
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
AC_PROG_INSTALL
|
||||
|
@ -68,12 +105,21 @@ AC_HEADER_STDC
|
|||
|
||||
AC_LANG_CPLUSPLUS
|
||||
|
||||
XLIBS=""
|
||||
|
||||
AC_CHECK_DECLS(round,,,[#include <math.h>])
|
||||
AC_CHECK_DECLS(strsignal,,,[#include <string.h>])
|
||||
AC_CHECK_LIB(jpeg,jpeg_start_compress,,AC_MSG_ERROR(zm requires libjpeg.a))
|
||||
AC_CHECK_LIB(z,compress,,AC_MSG_ERROR(zm requires libz.a))
|
||||
AC_CHECK_LIB(dl,dlsym,,AC_MSG_ERROR(zm requires libdl.a))
|
||||
AC_CHECK_LIB(mysqlclient,mysql_init,,AC_MSG_ERROR(zm requires libmysqlclient.a))
|
||||
#AC_CHECK_LIB(avcodec,avcodec_init,XLIBS="$XLIBS -lavcodec",AC_MSG_WARN(libavcodec.a is required for MPEG streaming))
|
||||
#AC_CHECK_LIB(avformat,av_new_stream,XLIBS="$XLIBS -lavformat",AC_MSG_WARN(libavformat.a is required for MPEG streaming),-lavcodec)
|
||||
AC_CHECK_LIB(avcodec,avcodec_init,,AC_MSG_WARN(libavcodec.a is required for MPEG streaming))
|
||||
AC_CHECK_LIB(avformat,av_new_stream,,AC_MSG_WARN(libavformat.a is required for MPEG streaming),-lavcodec)
|
||||
AC_CHECK_LIB(mp3lame,lame_init,,AC_MSG_WARN(libmp3lame.a may be required for IE compatible MPEG streaming))
|
||||
|
||||
AC_SUBST(XLIBS)
|
||||
|
||||
AC_SUBST(bindir)
|
||||
|
||||
|
|
119
db/Makefile.in
119
db/Makefile.in
|
@ -1,4 +1,4 @@
|
|||
# Makefile.in generated by automake 1.7 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.6.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
|
@ -13,108 +13,81 @@
|
|||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
transform = @program_transform_name@
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
|
||||
EXEEXT = @EXEEXT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CGI_PREFIX = @CGI_PREFIX@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
FFMPEG_CFLAGS = @FFMPEG_CFLAGS@
|
||||
FFMPEG_LIBS = @FFMPEG_LIBS@
|
||||
FFMPEG_PREFIX = @FFMPEG_PREFIX@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
LAME_LIBS = @LAME_LIBS@
|
||||
LAME_PREFIX = @LAME_PREFIX@
|
||||
MYSQL_CFLAGS = @MYSQL_CFLAGS@
|
||||
MYSQL_LIBS = @MYSQL_LIBS@
|
||||
MYSQL_PREFIX = @MYSQL_PREFIX@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
WEB_GROUP = @WEB_GROUP@
|
||||
WEB_PREFIX = @WEB_PREFIX@
|
||||
WEB_USER = @WEB_USER@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
XLIBS = @XLIBS@
|
||||
am__include = @am__include@
|
||||
am__quote = @am__quote@
|
||||
bindir = @bindir@
|
||||
build_alias = @build_alias@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host_alias = @host_alias@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
AUTOMAKE_OPTIONS = gnu
|
||||
|
||||
EXTRA_DIST = \
|
||||
|
@ -151,20 +124,13 @@ uninstall-info-am:
|
|||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
top_distdir = ..
|
||||
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
esac; \
|
||||
@list='$(DISTFILES)'; for file in $$list; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
|
@ -248,14 +214,6 @@ mostlyclean: mostlyclean-am
|
|||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic distclean \
|
||||
|
@ -264,8 +222,7 @@ uninstall-am: uninstall-info-am
|
|||
install-exec-am install-info install-info-am install-man \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \
|
||||
uninstall-info-am
|
||||
mostlyclean-generic uninstall uninstall-am uninstall-info-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Makefile.in generated by automake 1.7 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.6.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
|
@ -13,108 +13,81 @@
|
|||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
transform = @program_transform_name@
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
|
||||
EXEEXT = @EXEEXT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CGI_PREFIX = @CGI_PREFIX@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
FFMPEG_CFLAGS = @FFMPEG_CFLAGS@
|
||||
FFMPEG_LIBS = @FFMPEG_LIBS@
|
||||
FFMPEG_PREFIX = @FFMPEG_PREFIX@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
LAME_LIBS = @LAME_LIBS@
|
||||
LAME_PREFIX = @LAME_PREFIX@
|
||||
MYSQL_CFLAGS = @MYSQL_CFLAGS@
|
||||
MYSQL_LIBS = @MYSQL_LIBS@
|
||||
MYSQL_PREFIX = @MYSQL_PREFIX@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
WEB_GROUP = @WEB_GROUP@
|
||||
WEB_PREFIX = @WEB_PREFIX@
|
||||
WEB_USER = @WEB_USER@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
XLIBS = @XLIBS@
|
||||
am__include = @am__include@
|
||||
am__quote = @am__quote@
|
||||
bindir = @bindir@
|
||||
build_alias = @build_alias@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host_alias = @host_alias@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
AUTOMAKE_OPTIONS = gnu
|
||||
|
||||
bin_SCRIPTS = \
|
||||
|
@ -179,20 +152,13 @@ uninstall-info-am:
|
|||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
top_distdir = ..
|
||||
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
esac; \
|
||||
@list='$(DISTFILES)'; for file in $$list; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
|
@ -277,14 +243,6 @@ mostlyclean: mostlyclean-am
|
|||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-binSCRIPTS uninstall-info-am
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic distclean \
|
||||
|
@ -293,8 +251,8 @@ uninstall-am: uninstall-binSCRIPTS uninstall-info-am
|
|||
install-exec install-exec-am install-info install-info-am \
|
||||
install-man install-strip installcheck installcheck-am \
|
||||
installdirs maintainer-clean maintainer-clean-generic \
|
||||
mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \
|
||||
uninstall-am uninstall-binSCRIPTS uninstall-info-am
|
||||
mostlyclean mostlyclean-generic uninstall uninstall-am \
|
||||
uninstall-binSCRIPTS uninstall-info-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
AUTOMAKE_OPTIONS = gnu
|
||||
|
||||
LDADD = @MYSQL_LIBS@
|
||||
AM_CPPFLAGS = @MYSQL_CFLAGS@
|
||||
LDADD = @MYSQL_LIBS@
|
||||
AM_CPPFLAGS = @MYSQL_CFLAGS@ @FFMPEG_CFLAGS@
|
||||
|
||||
# This should be set to your CGI directory
|
||||
cgidir = @CGI_PREFIX@
|
||||
|
@ -30,6 +30,7 @@ zm_SOURCES = \
|
|||
zm_local_camera.cpp \
|
||||
zm_remote_camera.cpp \
|
||||
zm_monitor.cpp \
|
||||
zm_mpeg.cpp \
|
||||
zm_debug.c \
|
||||
zm_jpeg.c
|
||||
|
||||
|
@ -60,7 +61,8 @@ noinst_HEADERS = \
|
|||
zm_font.h \
|
||||
jinclude.h \
|
||||
zmf.h \
|
||||
zm_jpeg.h
|
||||
zm_jpeg.h \
|
||||
zm_mpeg.h
|
||||
|
||||
EXTRA_DIST = zm_config.h.z
|
||||
|
||||
|
|
227
src/Makefile.in
227
src/Makefile.in
|
@ -1,4 +1,4 @@
|
|||
# Makefile.in generated by automake 1.7 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.6.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
|
@ -13,112 +13,85 @@
|
|||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
transform = @program_transform_name@
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
|
||||
EXEEXT = @EXEEXT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CGI_PREFIX = @CGI_PREFIX@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
FFMPEG_CFLAGS = @FFMPEG_CFLAGS@
|
||||
FFMPEG_LIBS = @FFMPEG_LIBS@
|
||||
FFMPEG_PREFIX = @FFMPEG_PREFIX@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
LAME_LIBS = @LAME_LIBS@
|
||||
LAME_PREFIX = @LAME_PREFIX@
|
||||
MYSQL_CFLAGS = @MYSQL_CFLAGS@
|
||||
MYSQL_LIBS = @MYSQL_LIBS@
|
||||
MYSQL_PREFIX = @MYSQL_PREFIX@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
WEB_GROUP = @WEB_GROUP@
|
||||
WEB_PREFIX = @WEB_PREFIX@
|
||||
WEB_USER = @WEB_USER@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
XLIBS = @XLIBS@
|
||||
am__include = @am__include@
|
||||
am__quote = @am__quote@
|
||||
bindir = @bindir@
|
||||
build_alias = @build_alias@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host_alias = @host_alias@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
AUTOMAKE_OPTIONS = gnu
|
||||
|
||||
LDADD = @MYSQL_LIBS@
|
||||
AM_CPPFLAGS = @MYSQL_CFLAGS@
|
||||
AM_CPPFLAGS = @MYSQL_CFLAGS@ @FFMPEG_CFLAGS@
|
||||
|
||||
# This should be set to your CGI directory
|
||||
cgidir = @CGI_PREFIX@
|
||||
|
@ -148,6 +121,7 @@ zm_SOURCES = \
|
|||
zm_local_camera.cpp \
|
||||
zm_remote_camera.cpp \
|
||||
zm_monitor.cpp \
|
||||
zm_mpeg.cpp \
|
||||
zm_debug.c \
|
||||
zm_jpeg.c
|
||||
|
||||
|
@ -179,7 +153,8 @@ noinst_HEADERS = \
|
|||
zm_font.h \
|
||||
jinclude.h \
|
||||
zmf.h \
|
||||
zm_jpeg.h
|
||||
zm_jpeg.h \
|
||||
zm_mpeg.h
|
||||
|
||||
|
||||
EXTRA_DIST = zm_config.h.z
|
||||
|
@ -195,7 +170,8 @@ am__objects_1 = zm.$(OBJEXT) zm_db.$(OBJEXT) zm_config.$(OBJEXT) \
|
|||
zm_coord.$(OBJEXT) zm_box.$(OBJEXT) zm_image.$(OBJEXT) \
|
||||
zm_event.$(OBJEXT) zm_zone.$(OBJEXT) zm_camera.$(OBJEXT) \
|
||||
zm_local_camera.$(OBJEXT) zm_remote_camera.$(OBJEXT) \
|
||||
zm_monitor.$(OBJEXT) zm_debug.$(OBJEXT) zm_jpeg.$(OBJEXT)
|
||||
zm_monitor.$(OBJEXT) zm_mpeg.$(OBJEXT) zm_debug.$(OBJEXT) \
|
||||
zm_jpeg.$(OBJEXT)
|
||||
am_zma_OBJECTS = zma.$(OBJEXT) $(am__objects_1)
|
||||
zma_OBJECTS = $(am_zma_OBJECTS)
|
||||
zma_LDADD = $(LDADD)
|
||||
|
@ -228,7 +204,11 @@ zmu_LDADD = $(LDADD)
|
|||
zmu_DEPENDENCIES =
|
||||
zmu_LDFLAGS =
|
||||
|
||||
DEFS = @DEFS@
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/zm.Po ./$(DEPDIR)/zm_box.Po \
|
||||
|
@ -237,7 +217,7 @@ am__depfiles_maybe = depfiles
|
|||
@AMDEP_TRUE@ ./$(DEPDIR)/zm_debug.Po ./$(DEPDIR)/zm_event.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/zm_image.Po ./$(DEPDIR)/zm_jpeg.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/zm_local_camera.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/zm_monitor.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/zm_monitor.Po ./$(DEPDIR)/zm_mpeg.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/zm_remote_camera.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/zm_zone.Po ./$(DEPDIR)/zma.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/zmc.Po ./$(DEPDIR)/zmf.Po \
|
||||
|
@ -247,11 +227,13 @@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
|||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
CFLAGS = @CFLAGS@
|
||||
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
CXXLD = $(CXX)
|
||||
CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
|
||||
-o $@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
DIST_SOURCES = $(zma_SOURCES) $(zmc_SOURCES) $(zmf_SOURCES) \
|
||||
$(zmfix_SOURCES) $(zms_SOURCES) $(zmu_SOURCES)
|
||||
HEADERS = $(noinst_HEADERS)
|
||||
|
@ -278,7 +260,7 @@ install-binPROGRAMS: $(bin_PROGRAMS)
|
|||
; then \
|
||||
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
|
||||
$(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
|
||||
$(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
|
@ -329,6 +311,7 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zm_jpeg.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zm_local_camera.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zm_monitor.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zm_mpeg.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zm_remote_camera.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zm_zone.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zma.Po@am__quote@
|
||||
|
@ -342,56 +325,35 @@ distclean-depend:
|
|||
-rm -rf ./$(DEPDIR)
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||
@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
|
||||
@am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
|
||||
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||
@am__fastdepCC_TRUE@ fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
|
||||
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
$(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||
@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'`; \
|
||||
@am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
|
||||
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||
@am__fastdepCC_TRUE@ fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'`
|
||||
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
$(COMPILE) -c `cygpath -w $<`
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
|
||||
.cpp.o:
|
||||
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||
@am__fastdepCXX_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
|
||||
@am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
|
||||
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||
@am__fastdepCXX_TRUE@ fi
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
|
||||
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
$(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
|
||||
|
||||
.cpp.obj:
|
||||
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||
@am__fastdepCXX_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'`; \
|
||||
@am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
|
||||
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||
@am__fastdepCXX_TRUE@ fi
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'`
|
||||
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
$(CXXCOMPILE) -c -o $@ `cygpath -w $<`
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
uninstall-info-am:
|
||||
|
||||
ETAGS = etags
|
||||
ETAGSFLAGS =
|
||||
|
||||
CTAGS = ctags
|
||||
CTAGSFLAGS =
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
|
@ -417,39 +379,20 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
|||
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
top_distdir = ..
|
||||
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
esac; \
|
||||
@list='$(DISTFILES)'; for file in $$list; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
|
@ -470,7 +413,7 @@ distdir: $(DISTFILES)
|
|||
fi; \
|
||||
done
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$(top_distdir)" distdir="$(distdir)" \
|
||||
top_distdir="${top_distdir}" distdir="$(distdir)" \
|
||||
dist-hook
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
|
@ -540,26 +483,18 @@ mostlyclean: mostlyclean-am
|
|||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-binPROGRAMS uninstall-info-am
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
|
||||
clean-generic ctags distclean distclean-compile \
|
||||
distclean-depend distclean-generic distclean-tags distdir dvi \
|
||||
dvi-am info info-am install install-am install-binPROGRAMS \
|
||||
install-data install-data-am install-exec install-exec-am \
|
||||
install-info install-info-am install-man install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
.PHONY: GTAGS all all-am check check-am clean clean-binPROGRAMS \
|
||||
clean-generic distclean distclean-compile distclean-depend \
|
||||
distclean-generic distclean-tags distdir dvi dvi-am info \
|
||||
info-am install install-am install-binPROGRAMS install-data \
|
||||
install-data-am install-exec install-exec-am install-info \
|
||||
install-info-am install-man install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
|
||||
uninstall-am uninstall-binPROGRAMS uninstall-info-am
|
||||
mostlyclean-generic tags uninstall uninstall-am \
|
||||
uninstall-binPROGRAMS uninstall-info-am
|
||||
|
||||
|
||||
dist-hook:
|
||||
|
|
128
src/zm_event.cpp
128
src/zm_event.cpp
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include "zm.h"
|
||||
#include "zm_db.h"
|
||||
#include "zm_mpeg.h"
|
||||
#include "zm_event.h"
|
||||
#include "zm_monitor.h"
|
||||
|
||||
|
@ -349,7 +350,7 @@ void Event::AddFrame( Image *image, struct timeval timestamp, unsigned int score
|
|||
}
|
||||
}
|
||||
|
||||
void Event::StreamEvent( int event_id, int rate, int scale, FILE *fd )
|
||||
void Event::StreamEvent( int event_id, int rate, int scale )
|
||||
{
|
||||
static char sql[BUFSIZ];
|
||||
static char eventpath[PATH_MAX];
|
||||
|
@ -393,22 +394,8 @@ void Event::StreamEvent( int event_id, int rate, int scale, FILE *fd )
|
|||
exit( mysql_errno( &dbconn ) );
|
||||
}
|
||||
|
||||
setbuf( fd, 0 );
|
||||
|
||||
time_t cache_now = time( 0 );
|
||||
char date_string[64];
|
||||
strftime( date_string, sizeof(date_string)-1, "%a, %d %b %Y %H:%M:%S GMT", gmtime( &cache_now ) );
|
||||
|
||||
fprintf( fd, "Server: ZoneMinder Stream Server\r\n" );
|
||||
|
||||
fprintf( fd, "Expires: Mon, 26 Jul 1997 05:00:00 GMT\r\n" );
|
||||
fprintf( fd, "Last-Modified: %s\r\n", date_string );
|
||||
fprintf( fd, "Cache-Control: no-store, no-cache, must-revalidate\r\n" );
|
||||
fprintf( fd, "Cache-Control: post-check=0, pre-check=0\r\n" );
|
||||
fprintf( fd, "Pragma: no-cache\r\n");
|
||||
|
||||
fprintf( fd, "Content-Type: multipart/x-mixed-replace;boundary=ZoneMinderFrame\r\n\r\n" );
|
||||
fprintf( fd, "--ZoneMinderFrame\n" );
|
||||
fprintf( stdout, "Content-Type: multipart/x-mixed-replace;boundary=ZoneMinderFrame\r\n\r\n" );
|
||||
fprintf( stdout, "--ZoneMinderFrame\n" );
|
||||
|
||||
//int n_frames = mysql_num_rows( result );
|
||||
//Info(( "Got %d frames, at rate %d, scale %d", n_frames, rate, scale ));
|
||||
|
@ -446,15 +433,14 @@ void Event::StreamEvent( int event_id, int rate, int scale, FILE *fd )
|
|||
static char filepath[PATH_MAX];
|
||||
sprintf( filepath, "%s/%03d-capture.jpg", eventpath, atoi(dbrow[0]) );
|
||||
|
||||
fprintf( fd, "Content-type: image/jpeg\n\n" );
|
||||
if ( scale == 1 )
|
||||
fprintf( stdout, "Content-type: image/jpeg\n\n" );
|
||||
if ( scale == 100 )
|
||||
{
|
||||
if ( (fdj = fopen( filepath, "r" )) )
|
||||
{
|
||||
while ( (n_bytes = fread( buffer, 1, sizeof(buffer), fdj )) )
|
||||
{
|
||||
//fwrite( buffer, 1, n_bytes, fd );
|
||||
write( fileno(fd), buffer, n_bytes );
|
||||
write( fileno(stdout), buffer, n_bytes );
|
||||
}
|
||||
fclose( fdj );
|
||||
}
|
||||
|
@ -471,10 +457,10 @@ void Event::StreamEvent( int event_id, int rate, int scale, FILE *fd )
|
|||
|
||||
image.EncodeJpeg( buffer, &n_bytes );
|
||||
|
||||
write( fileno(fd), buffer, n_bytes );
|
||||
write( fileno(stdout), buffer, n_bytes );
|
||||
}
|
||||
fprintf( fd, "\n--ZoneMinderFrame\n" );
|
||||
fflush( fd );
|
||||
fprintf( stdout, "\n--ZoneMinderFrame\n" );
|
||||
fflush( stdout );
|
||||
}
|
||||
if ( mysql_errno( &dbconn ) )
|
||||
{
|
||||
|
@ -484,3 +470,97 @@ void Event::StreamEvent( int event_id, int rate, int scale, FILE *fd )
|
|||
// Yadda yadda
|
||||
mysql_free_result( result );
|
||||
}
|
||||
|
||||
#if HAVE_LIBAVCODEC
|
||||
|
||||
void Event::StreamMpeg( int event_id, const char *format, int bit_rate, int rate, int scale )
|
||||
{
|
||||
static char sql[BUFSIZ];
|
||||
static char eventpath[PATH_MAX];
|
||||
|
||||
sprintf( sql, "select M.Id, M.Name,max(F.Delta)-min(F.Delta) as Duration, count(F.Id) as Frames from Events as E inner join Monitors as M on E.MonitorId = M.Id inner join Frames as F on F.EventId = E.Id where E.Id = %d group by F.EventId", event_id );
|
||||
if ( mysql_query( &dbconn, sql ) )
|
||||
{
|
||||
Error(( "Can't run query: %s", mysql_error( &dbconn ) ));
|
||||
exit( mysql_errno( &dbconn ) );
|
||||
}
|
||||
|
||||
MYSQL_RES *result = mysql_store_result( &dbconn );
|
||||
if ( !result )
|
||||
{
|
||||
Error(( "Can't use query result: %s", mysql_error( &dbconn ) ));
|
||||
exit( mysql_errno( &dbconn ) );
|
||||
}
|
||||
MYSQL_ROW dbrow = mysql_fetch_row( result );
|
||||
|
||||
if ( mysql_errno( &dbconn ) )
|
||||
{
|
||||
Error(( "Can't fetch row: %s", mysql_error( &dbconn ) ));
|
||||
exit( mysql_errno( &dbconn ) );
|
||||
}
|
||||
|
||||
sprintf( eventpath, "%s/%s/%s/%d", ZM_PATH_WEB, (const char *)config.Item( ZM_DIR_EVENTS ), dbrow[1], event_id );
|
||||
int fps = ((atoi(dbrow[3])/atoi(dbrow[2]))*rate)/ZM_RATE_SCALE;
|
||||
if ( rate )
|
||||
{
|
||||
if ( fps <= 0 )
|
||||
fps = 1;
|
||||
else if ( fps > 30 )
|
||||
fps = 30;
|
||||
}
|
||||
else
|
||||
{
|
||||
fps = 30;
|
||||
}
|
||||
Info(( "Duration:%d, Frames:%d, FPS:%d", atoi(dbrow[2]), atoi(dbrow[3]), fps ));
|
||||
|
||||
mysql_free_result( result );
|
||||
|
||||
sprintf( sql, "select FrameId, EventId, Delta from Frames where EventId = %d order by FrameId", event_id );
|
||||
if ( mysql_query( &dbconn, sql ) )
|
||||
{
|
||||
Error(( "Can't run query: %s", mysql_error( &dbconn ) ));
|
||||
exit( mysql_errno( &dbconn ) );
|
||||
}
|
||||
|
||||
result = mysql_store_result( &dbconn );
|
||||
if ( !result )
|
||||
{
|
||||
Error(( "Can't use query result: %s", mysql_error( &dbconn ) ));
|
||||
exit( mysql_errno( &dbconn ) );
|
||||
}
|
||||
|
||||
fprintf( stdout, "Content-type: video/x-ms-asf\r\n\r\n");
|
||||
|
||||
VideoStream *vid_stream = 0;
|
||||
for( int i = 0; dbrow = mysql_fetch_row( result ); i++ )
|
||||
{
|
||||
static char filepath[PATH_MAX];
|
||||
sprintf( filepath, "%s/%03d-capture.jpg", eventpath, atoi(dbrow[0]) );
|
||||
|
||||
Image image( filepath );
|
||||
|
||||
if ( !vid_stream )
|
||||
{
|
||||
vid_stream = new VideoStream( "pipe:", format, bit_rate, fps, image.Colours(), (image.Width()*scale)/ZM_SCALE_SCALE, (image.Height()*scale)/ZM_SCALE_SCALE );
|
||||
}
|
||||
|
||||
if ( scale != 100 )
|
||||
{
|
||||
image.Scale( scale );
|
||||
}
|
||||
double pts = vid_stream->EncodeFrame( image.Buffer(), image.Size() );
|
||||
}
|
||||
if ( mysql_errno( &dbconn ) )
|
||||
{
|
||||
Error(( "Can't fetch row: %s", mysql_error( &dbconn ) ));
|
||||
exit( mysql_errno( &dbconn ) );
|
||||
}
|
||||
// Yadda yadda
|
||||
mysql_free_result( result );
|
||||
|
||||
delete vid_stream;
|
||||
}
|
||||
|
||||
#endif // HAVE_LIBAVCODEC
|
||||
|
||||
|
|
|
@ -89,7 +89,10 @@ public:
|
|||
void AddFrames( int n_frames, Image **images, struct timeval **timestamps );
|
||||
void AddFrame( Image *image, struct timeval timestamp, unsigned int score=0, Image *alarm_frame=NULL );
|
||||
|
||||
static void StreamEvent( int event_id, int rate=1, int scale=1, FILE *fd=stdout );
|
||||
static void StreamEvent( int event_id, int rate=100, int scale=100 );
|
||||
#if HAVE_LIBAVCODEC
|
||||
static void StreamMpeg( int event_id, const char *format, int bit_rate=100000, int rate=100, int scale=100 );
|
||||
#endif // HAVE_LIBAVCODEC
|
||||
};
|
||||
|
||||
#endif // ZM_EVENT_H
|
||||
|
|
|
@ -79,6 +79,18 @@ protected:
|
|||
static BlendTablePtr GetBlendTable( int );
|
||||
|
||||
public:
|
||||
Image()
|
||||
{
|
||||
if ( !initialised )
|
||||
Initialise();
|
||||
width = 0;
|
||||
height = 0;
|
||||
colours = 0;
|
||||
size = 0;
|
||||
our_buffer = true;
|
||||
buffer = 0;
|
||||
blend_buffer = 0;
|
||||
}
|
||||
Image( const char *filename )
|
||||
{
|
||||
if ( !initialised )
|
||||
|
@ -131,9 +143,12 @@ public:
|
|||
delete[] blend_buffer;
|
||||
}
|
||||
|
||||
inline int Width() { return( width ); }
|
||||
inline int Height() { return( height ); }
|
||||
inline JSAMPLE *Buffer( unsigned int x=0, unsigned int y= 0 ) { return( &buffer[colours*((y*width)+x)] ); }
|
||||
inline int Width() const { return( width ); }
|
||||
inline int Height() const { return( height ); }
|
||||
inline int Size() const { return( size ); }
|
||||
inline int Colours() const { return( colours ); }
|
||||
inline JSAMPLE *Buffer() const { return( buffer ); }
|
||||
inline JSAMPLE *Buffer( unsigned int x, unsigned int y= 0 ) const { return( &buffer[colours*((y*width)+x)] ); }
|
||||
|
||||
inline void Assign( int p_width, int p_height, int p_colours, unsigned char *new_buffer )
|
||||
{
|
||||
|
@ -153,6 +168,24 @@ public:
|
|||
}
|
||||
memcpy( buffer, new_buffer, size );
|
||||
}
|
||||
inline void Assign( const Image &image )
|
||||
{
|
||||
if ( image.width != width || image.height != height || image.colours != colours )
|
||||
{
|
||||
width = image.width;
|
||||
height = image.height;
|
||||
colours = image.colours;
|
||||
int new_size = width*height*colours;
|
||||
if ( size != new_size )
|
||||
{
|
||||
size = new_size;
|
||||
delete[] buffer;
|
||||
buffer = new JSAMPLE[size];
|
||||
memset( buffer, 0, size );
|
||||
}
|
||||
}
|
||||
memcpy( buffer, image.buffer, size );
|
||||
}
|
||||
|
||||
inline void CopyBuffer( const Image &image )
|
||||
{
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include "zm.h"
|
||||
#include "zm_db.h"
|
||||
#include "zm_mpeg.h"
|
||||
#include "zm_monitor.h"
|
||||
#include "zm_local_camera.h"
|
||||
#include "zm_remote_camera.h"
|
||||
|
@ -360,16 +361,29 @@ unsigned int Monitor::GetLastEvent() const
|
|||
double Monitor::GetFPS() const
|
||||
{
|
||||
int index1 = shared_data->last_write_index;
|
||||
Snapshot *snap1 = &image_buffer[index1];
|
||||
if ( !snap1->timestamp || !snap1->timestamp->tv_sec )
|
||||
{
|
||||
return( 0.0 );
|
||||
}
|
||||
time_t time1 = snap1->timestamp->tv_sec;
|
||||
|
||||
int image_count = image_buffer_count;
|
||||
int index2 = (index1+1)%image_buffer_count;
|
||||
|
||||
//Snapshot *snap1 = &image_buffer[index1];
|
||||
//time_t time1 = snap1->timestamp->tv_sec;
|
||||
time_t time1 = time( 0 );
|
||||
|
||||
Snapshot *snap2 = &image_buffer[index2];
|
||||
while ( !snap2->timestamp || !snap2->timestamp->tv_sec || time1 == snap2->timestamp->tv_sec )
|
||||
{
|
||||
if ( index1 == index2 )
|
||||
{
|
||||
return( 0.0 );
|
||||
}
|
||||
index2 = (index2+1)%image_buffer_count;
|
||||
snap2 = &image_buffer[index2];
|
||||
image_count--;
|
||||
}
|
||||
time_t time2 = snap2->timestamp->tv_sec;
|
||||
|
||||
double curr_fps = double(image_buffer_count)/(time1-time2);
|
||||
double curr_fps = double(image_count)/(time1-time2);
|
||||
|
||||
return( curr_fps );
|
||||
}
|
||||
|
@ -1040,24 +1054,10 @@ Monitor *Monitor::Load( int id, bool load_zones, Purpose purpose )
|
|||
return( monitor );
|
||||
}
|
||||
|
||||
void Monitor::StreamImages( unsigned long idle, unsigned long refresh, time_t ttl, int scale, FILE *fd )
|
||||
void Monitor::StreamImages( unsigned long idle, unsigned long refresh, time_t ttl, int scale )
|
||||
{
|
||||
setbuf( fd, 0 );
|
||||
|
||||
fprintf( fd, "Server: ZoneMinder Stream Server\r\n" );
|
||||
|
||||
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( fd, "Expires: Mon, 26 Jul 1997 05:00:00 GMT\r\n" );
|
||||
fprintf( fd, "Last-Modified: %s\r\n", date_string );
|
||||
fprintf( fd, "Cache-Control: no-store, no-cache, must-revalidate\r\n" );
|
||||
fprintf( fd, "Cache-Control: post-check=0, pre-check=0\r\n" );
|
||||
fprintf( fd, "Pragma: no-cache\r\n");
|
||||
|
||||
fprintf( fd, "Content-Type: multipart/x-mixed-replace;boundary=ZoneMinderFrame\r\n\r\n" );
|
||||
fprintf( fd, "--ZoneMinderFrame\n" );
|
||||
fprintf( stdout, "Content-Type: multipart/x-mixed-replace;boundary=ZoneMinderFrame\r\n\r\n" );
|
||||
fprintf( stdout, "--ZoneMinderFrame\n" );
|
||||
|
||||
int last_read_index = image_buffer_count;
|
||||
static JOCTET img_buffer[ZM_MAX_IMAGE_SIZE];
|
||||
|
@ -1069,7 +1069,7 @@ void Monitor::StreamImages( unsigned long idle, unsigned long refresh, time_t tt
|
|||
|
||||
while ( true )
|
||||
{
|
||||
if ( feof( fd ) || ferror( fd ) )
|
||||
if ( feof( stdout ) || ferror( stdout ) )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
@ -1082,7 +1082,7 @@ void Monitor::StreamImages( unsigned long idle, unsigned long refresh, time_t tt
|
|||
Snapshot *snap = &image_buffer[index];
|
||||
Image *snap_image = snap->image;
|
||||
|
||||
if ( scale == 1 )
|
||||
if ( scale == 100 )
|
||||
{
|
||||
if ( !timestamp_on_capture )
|
||||
{
|
||||
|
@ -1105,11 +1105,9 @@ void Monitor::StreamImages( unsigned long idle, unsigned long refresh, time_t tt
|
|||
scaled_image.EncodeJpeg( img_buffer, &img_buffer_size );
|
||||
}
|
||||
|
||||
fprintf( fd, "Content-type: image/jpeg\n\n" );
|
||||
fwrite( img_buffer, img_buffer_size, 1, fd );
|
||||
//fwrite( img_buffer, 1, img_buffer_size, fd );
|
||||
//write( fileno(fd), img_buffer, img_buffer_size );
|
||||
fprintf( fd, "\n--ZoneMinderFrame\n" );
|
||||
fprintf( stdout, "Content-type: image/jpeg\n\n" );
|
||||
fwrite( img_buffer, img_buffer_size, 1, stdout );
|
||||
fprintf( stdout, "\n--ZoneMinderFrame\n" );
|
||||
}
|
||||
usleep( refresh*1000 );
|
||||
for ( int i = 0; shared_data->state == IDLE && i < loop_count; i++ )
|
||||
|
@ -1118,6 +1116,7 @@ void Monitor::StreamImages( unsigned long idle, unsigned long refresh, time_t tt
|
|||
}
|
||||
if ( ttl )
|
||||
{
|
||||
time_t now;
|
||||
time( &now );
|
||||
if ( (now - stream_start_time) > ttl )
|
||||
{
|
||||
|
@ -1127,6 +1126,118 @@ void Monitor::StreamImages( unsigned long idle, unsigned long refresh, time_t tt
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
#if HAVE_LIBAVCODEC
|
||||
|
||||
void Monitor::StreamMpeg( const char *format, int bit_rate, int scale, int buffer )
|
||||
{
|
||||
fprintf( stdout, "Content-type: video/x-ms-asf\r\n\r\n");
|
||||
|
||||
int fps = int(GetFPS());
|
||||
if ( !fps )
|
||||
fps = 5;
|
||||
|
||||
VideoStream vid_stream( "pipe:", format, bit_rate, fps, camera->Colours(), (width*scale)/ZM_SCALE_SCALE, (height*scale)/ZM_SCALE_SCALE );
|
||||
|
||||
int last_read_index = image_buffer_count;
|
||||
|
||||
time_t stream_start_time;
|
||||
time( &stream_start_time );
|
||||
|
||||
Image scaled_image;
|
||||
|
||||
// Do any catching up
|
||||
if ( buffer )
|
||||
{
|
||||
int index = shared_data->last_write_index;
|
||||
int offset = buffer*fps;
|
||||
if ( offset > image_buffer_count )
|
||||
{
|
||||
last_read_index = (index+1)%image_buffer_count;
|
||||
}
|
||||
else
|
||||
{
|
||||
last_read_index = (index-offset+image_buffer_count)%image_buffer_count;
|
||||
}
|
||||
Info(( "LWI:%d", shared_data->last_write_index ));
|
||||
Info(( "LRI:%d", last_read_index ));
|
||||
|
||||
while ( last_read_index != shared_data->last_write_index )
|
||||
{
|
||||
Info(( "LRI+:%d", last_read_index ));
|
||||
|
||||
Snapshot *snap = &image_buffer[last_read_index];
|
||||
Image *snap_image = snap->image;
|
||||
|
||||
if ( scale == 100 )
|
||||
{
|
||||
if ( !timestamp_on_capture )
|
||||
{
|
||||
TimestampImage( snap_image, snap->timestamp->tv_sec );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
scaled_image.Assign( *snap_image );
|
||||
|
||||
scaled_image.Scale( scale );
|
||||
|
||||
if ( !timestamp_on_capture )
|
||||
{
|
||||
TimestampImage( &scaled_image, snap->timestamp->tv_sec );
|
||||
}
|
||||
snap_image = &scaled_image;
|
||||
}
|
||||
|
||||
double pts = vid_stream.EncodeFrame( snap_image->Buffer(), snap_image->Size() );
|
||||
|
||||
last_read_index = (last_read_index+1)%image_buffer_count;
|
||||
}
|
||||
}
|
||||
|
||||
int frame_count;
|
||||
while ( true )
|
||||
{
|
||||
if ( feof( stdout ) || ferror( stdout ) )
|
||||
{
|
||||
break;
|
||||
}
|
||||
if ( last_read_index != shared_data->last_write_index )
|
||||
{
|
||||
// Send the next frame
|
||||
last_read_index = shared_data->last_write_index;
|
||||
int index = shared_data->last_write_index%image_buffer_count;
|
||||
//Info(( "%d: %x - %x", index, image_buffer[index].image, image_buffer[index].image->buffer ));
|
||||
Snapshot *snap = &image_buffer[index];
|
||||
Image *snap_image = snap->image;
|
||||
|
||||
if ( scale == 100 )
|
||||
{
|
||||
if ( !timestamp_on_capture )
|
||||
{
|
||||
TimestampImage( snap_image, snap->timestamp->tv_sec );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
scaled_image.Assign( *snap_image );
|
||||
|
||||
scaled_image.Scale( scale );
|
||||
|
||||
if ( !timestamp_on_capture )
|
||||
{
|
||||
TimestampImage( &scaled_image, snap->timestamp->tv_sec );
|
||||
}
|
||||
snap_image = &scaled_image;
|
||||
}
|
||||
|
||||
double pts = vid_stream.EncodeFrame( snap_image->Buffer(), snap_image->Size() );
|
||||
}
|
||||
usleep( 10000 );
|
||||
}
|
||||
}
|
||||
#endif // HAVE_LIBAVCODEC
|
||||
|
||||
bool Monitor::DumpSettings( char *output, bool verbose )
|
||||
{
|
||||
output[0] = 0;
|
||||
|
|
|
@ -285,7 +285,10 @@ public:
|
|||
static int Load( int device, Monitor **&monitors, Purpose purpose=QUERY );
|
||||
static int Load( const char *host, const char*port, const char*path, Monitor **&monitors, Purpose purpose=QUERY );
|
||||
static Monitor *Load( int id, bool load_zones=false, Purpose purpose=QUERY );
|
||||
void StreamImages( unsigned long idle=5000, unsigned long refresh=50, time_t ttl=0, int scale=1, FILE *fd=stdout );
|
||||
void StreamImages( unsigned long idle=5000, unsigned long refresh=50, time_t ttl=0, int scale=100 );
|
||||
#if HAVE_LIBAVCODEC
|
||||
void StreamMpeg( const char *format, int bit_rate=100000, int scale=100, int buffer=0 );
|
||||
#endif // HAVE_LIBAVCODEC
|
||||
};
|
||||
|
||||
#endif // ZM_MONITOR_H
|
||||
|
|
|
@ -0,0 +1,296 @@
|
|||
/*
|
||||
* ZoneMinder MPEG class implementation, $Date$, $Revision$
|
||||
* Copyright (C) 2003 Philip Coombes
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "zm.h"
|
||||
#include "zm_mpeg.h"
|
||||
|
||||
#if HAVE_LIBAVCODEC
|
||||
|
||||
bool VideoStream::initialised = false;
|
||||
|
||||
void VideoStream::Initialise()
|
||||
{
|
||||
av_register_all();
|
||||
initialised = true;
|
||||
}
|
||||
|
||||
void VideoStream::SetupFormat( const char *p_filename, const char *format )
|
||||
{
|
||||
filename = p_filename;
|
||||
|
||||
/* auto detect the output format from the name. default is mpeg. */
|
||||
of = guess_format( format, NULL, NULL);
|
||||
if ( !of )
|
||||
{
|
||||
Warning(( "Could not deduce output format from file extension: using MPEG." ));
|
||||
of = guess_format("mpeg", NULL, NULL);
|
||||
}
|
||||
if ( !of )
|
||||
{
|
||||
Fatal(( "Could not find suitable output format" ));
|
||||
}
|
||||
|
||||
/* allocate the output media context */
|
||||
ofc = (AVFormatContext *)av_mallocz(sizeof(AVFormatContext));
|
||||
if ( !ofc )
|
||||
{
|
||||
Fatal(( "Memory error" ));
|
||||
}
|
||||
ofc->oformat = of;
|
||||
snprintf(ofc->filename, sizeof(ofc->filename), "%s", filename);
|
||||
}
|
||||
|
||||
void VideoStream::SetupCodec( int colours, int width, int height, int bit_rate, int frame_rate )
|
||||
{
|
||||
pf = (colours==1?PIX_FMT_GRAY8:PIX_FMT_RGB24);
|
||||
|
||||
/* add the video streams using the default format codecs
|
||||
and initialize the codecs */
|
||||
ost = NULL;
|
||||
if (of->video_codec != CODEC_ID_NONE)
|
||||
{
|
||||
ost = av_new_stream(ofc, 0);
|
||||
if (!ost)
|
||||
{
|
||||
Fatal(( "Could not alloc stream" ));
|
||||
}
|
||||
|
||||
AVCodecContext *c = &ost->codec;
|
||||
c->codec_id = of->video_codec;
|
||||
c->codec_type = CODEC_TYPE_VIDEO;
|
||||
|
||||
/* put sample parameters */
|
||||
c->bit_rate = bit_rate;
|
||||
/* resolution must be a multiple of two */
|
||||
c->width = width;
|
||||
c->height = height;
|
||||
/* frames per second */
|
||||
c->frame_rate = frame_rate;
|
||||
c->frame_rate_base = 1;
|
||||
c->gop_size = frame_rate/2; /* emit one intra frame every half second or so */
|
||||
c->gop_size = 30;
|
||||
if ( c->gop_size < 3 )
|
||||
c->gop_size = 3;
|
||||
if (c->codec_id == CODEC_ID_MPEG1VIDEO ||
|
||||
c->codec_id == CODEC_ID_MPEG2VIDEO)
|
||||
{
|
||||
/* just for testing, we also add B frames */
|
||||
c->max_b_frames = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void VideoStream::SetParameters()
|
||||
{
|
||||
/* set the output parameters (must be done even if no
|
||||
parameters). */
|
||||
if (av_set_parameters(ofc, NULL) < 0)
|
||||
{
|
||||
Fatal(( "Invalid output format parameters" ));
|
||||
}
|
||||
//dump_format(ofc, 0, filename, 1);
|
||||
}
|
||||
|
||||
void VideoStream::OpenStream()
|
||||
{
|
||||
/* now that all the parameters are set, we can open the
|
||||
video codecs and allocate the necessary encode buffers */
|
||||
if (ost)
|
||||
{
|
||||
AVCodecContext *c = &ost->codec;
|
||||
|
||||
/* find the video encoder */
|
||||
AVCodec *codec = avcodec_find_encoder(c->codec_id);
|
||||
if (!codec)
|
||||
{
|
||||
Fatal(( "codec not found" ));
|
||||
}
|
||||
|
||||
/* open the codec */
|
||||
if (avcodec_open(c, codec) < 0)
|
||||
{
|
||||
Fatal(( "could not open codec" ));
|
||||
}
|
||||
|
||||
/* allocate the encoded raw picture */
|
||||
opicture = avcodec_alloc_frame();
|
||||
if (!opicture)
|
||||
{
|
||||
Fatal(( "Could not allocate opicture" ));
|
||||
}
|
||||
int size = avpicture_get_size( c->pix_fmt, c->width, c->height);
|
||||
uint8_t *opicture_buf = (uint8_t *)malloc(size);
|
||||
if (!opicture_buf)
|
||||
{
|
||||
av_free(opicture);
|
||||
Fatal(( "Could not allocate opicture" ));
|
||||
}
|
||||
avpicture_fill((AVPicture *)opicture, opicture_buf, c->pix_fmt, c->width, c->height);
|
||||
|
||||
/* if the output format is not RGB24, then a temporary RGB24
|
||||
picture is needed too. It is then converted to the required
|
||||
output format */
|
||||
tmp_opicture = NULL;
|
||||
if (c->pix_fmt != pf)
|
||||
{
|
||||
tmp_opicture = avcodec_alloc_frame();
|
||||
if (!tmp_opicture)
|
||||
{
|
||||
Fatal(( "Could not allocate temporary opicture" ));
|
||||
}
|
||||
int size = avpicture_get_size( pf, c->width, c->height);
|
||||
uint8_t *tmp_opicture_buf = (uint8_t *)malloc(size);
|
||||
if (!tmp_opicture_buf)
|
||||
{
|
||||
av_free(tmp_opicture);
|
||||
Fatal(( "Could not allocate temporary opicture" ));
|
||||
}
|
||||
avpicture_fill((AVPicture *)tmp_opicture, tmp_opicture_buf, pf, c->width, c->height);
|
||||
}
|
||||
}
|
||||
|
||||
/* open the output file, if needed */
|
||||
if (!(of->flags & AVFMT_NOFILE))
|
||||
{
|
||||
if (url_fopen(&ofc->pb, filename, URL_WRONLY) < 0)
|
||||
{
|
||||
Fatal(( "Could not open '%s'", filename ));
|
||||
}
|
||||
}
|
||||
|
||||
video_outbuf = NULL;
|
||||
if (!(ofc->oformat->flags & AVFMT_RAWPICTURE))
|
||||
{
|
||||
/* allocate output buffer */
|
||||
/* XXX: API change will be done */
|
||||
video_outbuf_size = 200000;
|
||||
video_outbuf = (uint8_t *)malloc(video_outbuf_size);
|
||||
}
|
||||
|
||||
/* write the stream header, if any */
|
||||
av_write_header(ofc);
|
||||
}
|
||||
|
||||
VideoStream::VideoStream( const char *filename, const char *format, int bit_rate, int frame_rate, int colours, int width, int height )
|
||||
{
|
||||
if ( !initialised )
|
||||
{
|
||||
Initialise();
|
||||
}
|
||||
|
||||
SetupFormat( filename, format );
|
||||
SetupCodec( colours, width, height, bit_rate, frame_rate );
|
||||
SetParameters();
|
||||
OpenStream();
|
||||
}
|
||||
|
||||
VideoStream::~VideoStream()
|
||||
{
|
||||
/* close each codec */
|
||||
if (ost)
|
||||
{
|
||||
avcodec_close(&ost->codec);
|
||||
av_free(opicture->data[0]);
|
||||
av_free(opicture);
|
||||
if (tmp_opicture)
|
||||
{
|
||||
av_free(tmp_opicture->data[0]);
|
||||
av_free(tmp_opicture);
|
||||
}
|
||||
av_free(video_outbuf);
|
||||
}
|
||||
|
||||
/* write the trailer, if any */
|
||||
av_write_trailer(ofc);
|
||||
|
||||
/* free the streams */
|
||||
for( int i = 0; i < ofc->nb_streams; i++)
|
||||
{
|
||||
av_freep(&ofc->streams[i]);
|
||||
}
|
||||
|
||||
if (!(of->flags & AVFMT_NOFILE))
|
||||
{
|
||||
/* close the output file */
|
||||
url_fclose(&ofc->pb);
|
||||
}
|
||||
|
||||
/* free the stream */
|
||||
av_free(ofc);
|
||||
}
|
||||
|
||||
double VideoStream::EncodeFrame( uint8_t *buffer, int buffer_size )
|
||||
{
|
||||
double pts = 0.0;
|
||||
|
||||
/* compute current video time */
|
||||
if (ost)
|
||||
pts = (double)ost->pts.val * ofc->pts_num / ofc->pts_den;
|
||||
|
||||
//if (!ost || pts >= STREAM_DURATION)
|
||||
//break;
|
||||
|
||||
/* write video frames */
|
||||
AVCodecContext *c = &ost->codec;
|
||||
if (c->pix_fmt != pf)
|
||||
{
|
||||
/* as we only access a RGB24 picture, we must convert it
|
||||
to the codec pixel format if needed */
|
||||
//tmp_opicture->data[0] = snap_image->Buffer();
|
||||
memcpy( tmp_opicture->data[0], buffer, buffer_size );
|
||||
img_convert((AVPicture *)opicture, c->pix_fmt,
|
||||
(AVPicture *)tmp_opicture, pf,
|
||||
c->width, c->height);
|
||||
}
|
||||
else
|
||||
{
|
||||
//opicture->data[0] = snap_image->Buffer();
|
||||
memcpy( opicture->data[0], buffer, buffer_size );
|
||||
}
|
||||
AVFrame *opicture_ptr = opicture;
|
||||
|
||||
int ret = 0;
|
||||
if (ofc->oformat->flags & AVFMT_RAWPICTURE)
|
||||
{
|
||||
/* raw video case. The API will change slightly in the near
|
||||
futur for that */
|
||||
ret = av_write_frame(ofc, ost->index, (uint8_t *)opicture_ptr, sizeof(AVPicture));
|
||||
}
|
||||
else
|
||||
{
|
||||
/* encode the image */
|
||||
int out_size = avcodec_encode_video(c, video_outbuf, video_outbuf_size, opicture_ptr);
|
||||
/* if zero size, it means the image was buffered */
|
||||
if (out_size != 0)
|
||||
{
|
||||
/* write the compressed frame in the media file */
|
||||
/* XXX: in case of B frames, the pts is not yet valid */
|
||||
ret = av_write_frame(ofc, ost->index, video_outbuf, out_size);
|
||||
}
|
||||
}
|
||||
if (ret != 0)
|
||||
{
|
||||
Fatal(( "Error while writing video frame" ));
|
||||
}
|
||||
}
|
||||
|
||||
#endif // HAVE_LIBAVCODEC
|
|
@ -0,0 +1,62 @@
|
|||
/*
|
||||
* ZoneMinder MPEG Interface, $Date$, $Revision$
|
||||
* Copyright (C) 2003 Philip Coombes
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "zm.h"
|
||||
|
||||
#if HAVE_LIBAVCODEC
|
||||
|
||||
#ifndef ZM_MPEG_H
|
||||
#define ZM_MPEG_H
|
||||
|
||||
#include "avformat.h"
|
||||
|
||||
class VideoStream
|
||||
{
|
||||
protected:
|
||||
static bool initialised;
|
||||
|
||||
protected:
|
||||
const char *filename;
|
||||
enum PixelFormat pf;
|
||||
AVOutputFormat *of;
|
||||
AVFormatContext *ofc;
|
||||
AVStream *ost;
|
||||
AVFrame *opicture;
|
||||
AVFrame *tmp_opicture;
|
||||
uint8_t *video_outbuf;
|
||||
int video_outbuf_size;
|
||||
double pts;
|
||||
|
||||
protected:
|
||||
static void Initialise();
|
||||
|
||||
void SetupFormat( const char *p_filename, const char *format );
|
||||
void SetupCodec( int colours, int width, int height, int bit_rate, int frame_rate );
|
||||
void SetParameters();
|
||||
void OpenStream();
|
||||
|
||||
public:
|
||||
VideoStream( const char *filename, const char *format, int bit_rate, int frame_rate, int colours, int width, int height );
|
||||
~VideoStream();
|
||||
double EncodeFrame( uint8_t *buffer, int buffer_size );
|
||||
};
|
||||
|
||||
#endif // ZM_MPEG_H
|
||||
|
||||
#endif // HAVE_LIBAVCODEC
|
87
src/zms.cpp
87
src/zms.cpp
|
@ -23,25 +23,27 @@
|
|||
|
||||
int main(void )
|
||||
{
|
||||
enum { ZMS_JPEG, ZMS_MPEG } mode = ZMS_JPEG;
|
||||
char format[32] = "";
|
||||
int id = 1;
|
||||
unsigned long idle = 5000;
|
||||
unsigned long refresh = 50;
|
||||
int event = 0;
|
||||
unsigned int bit_rate = 100000;
|
||||
unsigned int rate = 100;
|
||||
unsigned int scale = 100;
|
||||
int event = 0;
|
||||
unsigned int buffer = 0;
|
||||
unsigned int ttl = 0;
|
||||
|
||||
//setbuf( fd, 0 );
|
||||
//char streambuf[0x40000];
|
||||
//setbuffer( stdout, streambuf, sizeof(streambuf) );
|
||||
unsigned long idle = 5000;
|
||||
unsigned long refresh = 50;
|
||||
|
||||
const char *query = getenv( "QUERY_STRING" );
|
||||
if ( query )
|
||||
{
|
||||
char temp_query[256];
|
||||
Info(( "Query: %s", query ));
|
||||
|
||||
char temp_query[1024];
|
||||
strcpy( temp_query, query );
|
||||
char *q_ptr = temp_query;
|
||||
char *parms[8]; // Shouldn't be more than this
|
||||
char *parms[16]; // Shouldn't be more than this
|
||||
int parm_no = 0;
|
||||
while( (parms[parm_no] = strtok( q_ptr, "&" )) )
|
||||
{
|
||||
|
@ -53,20 +55,28 @@ int main(void )
|
|||
{
|
||||
char *name = strtok( parms[p], "=" );
|
||||
char *value = strtok( NULL, "=" );
|
||||
if ( !strcmp( name, "rate" ) )
|
||||
rate = atoi( value );
|
||||
else if ( !strcmp( name, "scale" ) )
|
||||
scale = atoi( value );
|
||||
else if ( !strcmp( name, "refresh" ) )
|
||||
refresh = atol( value );
|
||||
else if ( !strcmp( name, "idle" ) )
|
||||
idle = atol( value );
|
||||
if ( !strcmp( name, "mode" ) )
|
||||
mode = !strcmp( value, "jpeg" )?ZMS_JPEG:ZMS_MPEG;
|
||||
else if ( !strcmp( name, "monitor" ) )
|
||||
id = atoi( value );
|
||||
else if ( !strcmp( name, "event" ) )
|
||||
event = strtoull( value, (char **)NULL, 10 );
|
||||
else if ( !strcmp( name, "format" ) )
|
||||
strncpy( format, value, sizeof(format) );
|
||||
else if ( !strcmp( name, "bit_rate" ) )
|
||||
bit_rate = atoi( value );
|
||||
else if ( !strcmp( name, "rate" ) )
|
||||
rate = atoi( value );
|
||||
else if ( !strcmp( name, "scale" ) )
|
||||
scale = atoi( value );
|
||||
else if ( !strcmp( name, "buffer" ) )
|
||||
buffer = atol( value );
|
||||
else if ( !strcmp( name, "ttl" ) )
|
||||
ttl = atoi(value);
|
||||
else if ( !strcmp( name, "refresh" ) )
|
||||
refresh = atol( value );
|
||||
else if ( !strcmp( name, "idle" ) )
|
||||
idle = atol( value );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -76,18 +86,57 @@ int main(void )
|
|||
|
||||
zmDbConnect( ZM_DB_USERA, ZM_DB_PASSA );
|
||||
|
||||
setbuf( stdout, 0 );
|
||||
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");
|
||||
|
||||
if ( !event )
|
||||
{
|
||||
Monitor *monitor = Monitor::Load( id );
|
||||
|
||||
if ( monitor )
|
||||
{
|
||||
monitor->StreamImages( idle, refresh, ttl, scale, stdout );
|
||||
if ( mode == ZMS_JPEG )
|
||||
{
|
||||
monitor->StreamImages( idle, refresh, ttl, scale );
|
||||
}
|
||||
else
|
||||
{
|
||||
#if HAVE_LIBAVCODEC
|
||||
monitor->StreamMpeg( format, bit_rate, scale, buffer );
|
||||
#else // HAVE_LIBAVCODEC
|
||||
Error(( "MPEG streaming of '%s' attempted while disabled", query ));
|
||||
fprintf( stderr, "MPEG streaming is disabled.\nYou should configure with the --with-ffmpeg option and rebuild to use this functionality.\n" );
|
||||
return( -1 );
|
||||
#endif // HAVE_LIBAVCODEC
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Event::StreamEvent( event, rate, scale, stdout );
|
||||
if ( mode == ZMS_JPEG )
|
||||
{
|
||||
Event::StreamEvent( event, rate, scale );
|
||||
}
|
||||
else
|
||||
{
|
||||
#if HAVE_LIBAVCODEC
|
||||
Event::StreamMpeg( event, format, bit_rate, rate, scale );
|
||||
#else // HAVE_LIBAVCODEC
|
||||
Error(( "MPEG streaming of '%s' attempted while disabled", query ));
|
||||
fprintf( stderr, "MPEG streaming is disabled.\nYou should configure with the --with-ffmpeg option and rebuild to use this functionality.\n" );
|
||||
return( -1 );
|
||||
#endif // HAVE_LIBAVCODEC
|
||||
}
|
||||
}
|
||||
return( 0 );
|
||||
}
|
||||
|
|
120
web/Makefile.in
120
web/Makefile.in
|
@ -1,4 +1,4 @@
|
|||
# Makefile.in generated by automake 1.7 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.6.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
|
@ -13,108 +13,81 @@
|
|||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
transform = @program_transform_name@
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
|
||||
EXEEXT = @EXEEXT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CGI_PREFIX = @CGI_PREFIX@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
FFMPEG_CFLAGS = @FFMPEG_CFLAGS@
|
||||
FFMPEG_LIBS = @FFMPEG_LIBS@
|
||||
FFMPEG_PREFIX = @FFMPEG_PREFIX@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
LAME_LIBS = @LAME_LIBS@
|
||||
LAME_PREFIX = @LAME_PREFIX@
|
||||
MYSQL_CFLAGS = @MYSQL_CFLAGS@
|
||||
MYSQL_LIBS = @MYSQL_LIBS@
|
||||
MYSQL_PREFIX = @MYSQL_PREFIX@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
WEB_GROUP = @WEB_GROUP@
|
||||
WEB_PREFIX = @WEB_PREFIX@
|
||||
WEB_USER = @WEB_USER@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
XLIBS = @XLIBS@
|
||||
am__include = @am__include@
|
||||
am__quote = @am__quote@
|
||||
bindir = @bindir@
|
||||
build_alias = @build_alias@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host_alias = @host_alias@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
AUTOMAKE_OPTIONS = gnu
|
||||
|
||||
# This should be set to your CGI directory
|
||||
|
@ -280,20 +253,13 @@ uninstall-webDATA:
|
|||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
top_distdir = ..
|
||||
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
esac; \
|
||||
@list='$(DISTFILES)'; for file in $$list; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
|
@ -380,14 +346,6 @@ mostlyclean: mostlyclean-am
|
|||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am uninstall-webDATA
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic distclean \
|
||||
|
@ -396,8 +354,8 @@ uninstall-am: uninstall-info-am uninstall-webDATA
|
|||
install-exec-am install-info install-info-am install-man \
|
||||
install-strip install-webDATA installcheck installcheck-am \
|
||||
installdirs maintainer-clean maintainer-clean-generic \
|
||||
mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \
|
||||
uninstall-am uninstall-info-am uninstall-webDATA
|
||||
mostlyclean mostlyclean-generic uninstall uninstall-am \
|
||||
uninstall-info-am uninstall-webDATA
|
||||
|
||||
|
||||
# Yes, you are correct. This is a HACK!
|
||||
|
|
|
@ -57,6 +57,7 @@ switch ( $bandwidth )
|
|||
define( "REFRESH_IMAGE", ZM_WEB_H_REFRESH_IMAGE ); // How often the watched image is refreshed (if not streaming)
|
||||
define( "REFRESH_STATUS", ZM_WEB_H_REFRESH_STATUS ); // How often the little status frame refreshes itself in the watch window
|
||||
define( "REFRESH_EVENTS", ZM_WEB_H_REFRESH_EVENTS ); // How often the event listing is refreshed in the watch window, only for recent events
|
||||
define( "VIDEO_BITRATE", ZM_WEB_H_VIDEO_BITRATE ); // What the bitrate of any generated video should be
|
||||
define( "STREAM_IDLE_DELAY", ZM_WEB_H_STREAM_IDLE_DELAY ); // How long (in milliseconds) between streamed frames in the watch window
|
||||
define( "STREAM_FRAME_DELAY", ZM_WEB_H_STREAM_FRAME_DELAY ); // How long (in milliseconds) to wait before looking for the next streamed frame
|
||||
define( "IMAGE_SCALING", ZM_WEB_H_IMAGE_SCALING ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling
|
||||
|
@ -69,6 +70,7 @@ switch ( $bandwidth )
|
|||
define( "REFRESH_IMAGE", ZM_WEB_M_REFRESH_IMAGE ); // How often the watched image is refreshed (if not streaming)
|
||||
define( "REFRESH_STATUS", ZM_WEB_M_REFRESH_STATUS ); // How often the little status frame refreshes itself in the watch window
|
||||
define( "REFRESH_EVENTS", ZM_WEB_M_REFRESH_EVENTS ); // How often the event listing is refreshed in the watch window, only for recent events
|
||||
define( "VIDEO_BITRATE", ZM_WEB_M_VIDEO_BITRATE ); // What the bitrate of any generated video should be
|
||||
define( "STREAM_IDLE_DELAY", ZM_WEB_M_STREAM_IDLE_DELAY ); // How long (in milliseconds) between streamed frames in the watch window
|
||||
define( "STREAM_FRAME_DELAY", ZM_WEB_M_STREAM_FRAME_DELAY ); // How long (in milliseconds) to wait before looking for the next streamed frame
|
||||
define( "IMAGE_SCALING", ZM_WEB_M_IMAGE_SCALING ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling
|
||||
|
@ -81,6 +83,7 @@ switch ( $bandwidth )
|
|||
define( "REFRESH_IMAGE", ZM_WEB_L_REFRESH_IMAGE ); // How often the watched image is refreshed (if not streaming)
|
||||
define( "REFRESH_STATUS", ZM_WEB_L_REFRESH_STATUS ); // How often the little status frame refreshes itself in the watch window
|
||||
define( "REFRESH_EVENTS", ZM_WEB_L_REFRESH_EVENTS ); // How often the event listing is refreshed in the watch window, only for recent events
|
||||
define( "VIDEO_BITRATE", ZM_WEB_L_VIDEO_BITRATE ); // What the bitrate of any generated video should be
|
||||
define( "STREAM_IDLE_DELAY", ZM_WEB_L_STREAM_IDLE_DELAY ); // How long (in milliseconds) between streamed frames in the watch window
|
||||
define( "STREAM_FRAME_DELAY", ZM_WEB_L_STREAM_FRAME_DELAY ); // How long (in milliseconds) to wait before looking for the next streamed frame
|
||||
define( "IMAGE_SCALING", ZM_WEB_L_IMAGE_SCALING ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling
|
||||
|
|
|
@ -216,6 +216,20 @@ function isNetscape()
|
|||
return( $browser == "mozilla" );
|
||||
}
|
||||
|
||||
function isInternetExplorer()
|
||||
{
|
||||
getBrowser( $browser, $version );
|
||||
|
||||
return( $browser == "ie" );
|
||||
}
|
||||
|
||||
function isWindows()
|
||||
{
|
||||
global $HTTP_SERVER_VARS;
|
||||
|
||||
return ( preg_match( '/Win/', $HTTP_SERVER_VARS['HTTP_USER_AGENT'] ) );
|
||||
}
|
||||
|
||||
function canStreamNative()
|
||||
{
|
||||
return( ZM_CAN_STREAM == "yes" || ( ZM_CAN_STREAM == "auto" && isNetscape() ) );
|
||||
|
|
|
@ -111,7 +111,7 @@ window.setTimeout( "window.location.replace( '<?= "$PHP_SELF?view=cycle&mid=$nex
|
|||
<?php
|
||||
if ( $mode == "stream" )
|
||||
{
|
||||
$stream_src = ZM_PATH_ZMS."?monitor=".$monitor['Id']."&idle=".STREAM_IDLE_DELAY."&refresh=".STREAM_FRAME_DELAY."&ttl=".REFRESH_CYCLE."&scale=".$scale;
|
||||
$stream_src = ZM_PATH_ZMS."?mode=jpeg&monitor=".$monitor['Id']."&idle=".STREAM_IDLE_DELAY."&refresh=".STREAM_FRAME_DELAY."&ttl=".REFRESH_CYCLE."&scale=".$scale;
|
||||
if ( canStreamNative() )
|
||||
{
|
||||
?>
|
||||
|
|
|
@ -242,19 +242,75 @@ if ( $mode == "still" && $paged && !empty($page) )
|
|||
<?php
|
||||
if ( $mode == "stream" )
|
||||
{
|
||||
$stream_src = ZM_PATH_ZMS."?event=$eid&rate=$rate&scale=$scale";
|
||||
if ( canStreamNative() )
|
||||
{
|
||||
?>
|
||||
<tr><td colspan="6" align="center" valign="middle"><img src="<?= $stream_src ?>" border="0" width="<?= reScale( $event['Width'], $scale ) ?>" height="<?= reScale( $event['Height'], $scale ) ?>"></td></tr>
|
||||
<tr><td colspan="6" align="center" valign="middle">
|
||||
<?php
|
||||
if ( ZM_WEB_VIDEO_STREAM_METHOD == 'mpeg' )
|
||||
{
|
||||
$stream_src = ZM_PATH_ZMS."?mode=mpeg&event=$eid&rate=$rate&scale=$scale&bit_rate=".VIDEO_BITRATE;
|
||||
if ( isWindows() )
|
||||
{
|
||||
if ( isInternetExplorer() )
|
||||
{
|
||||
?>
|
||||
<OBJECT ID="MediaPlayer1" width=<?= reScale( $event['Width'], $scale ) ?> height=<?= reScale( $event['Height'], $scale ) ?>
|
||||
classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
|
||||
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902"
|
||||
standby="Loading Microsoft Windows Media Player components..."
|
||||
type="application/x-oleobject">
|
||||
<PARAM NAME="FileName" VALUE="<?= $stream_src."&format=asf" ?>"
|
||||
<PARAM NAME="animationatStart" VALUE="true">
|
||||
<PARAM NAME="transparentatStart" VALUE="true">
|
||||
<PARAM NAME="autoStart" VALUE="true">
|
||||
<PARAM NAME="showControls" VALUE="false">
|
||||
</OBJECT>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<EMBED type="application/x-mplayer2"
|
||||
pluginspage = "http://www.microsoft.com/Windows/MediaPlayer/"
|
||||
SRC="<?= $stream_src."&format=asf" ?>"
|
||||
name="MediaPlayer1"
|
||||
width=<?= reScale( $event['Width'], $scale ) ?>
|
||||
height=<?= reScale( $event['Height'], $scale ) ?>
|
||||
AutoStart=true>
|
||||
</EMBED>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<EMBED type="video/mpeg"
|
||||
src="<?= $stream_src."&format=mpeg" ?>"
|
||||
width=<?= reScale( $event['Width'], $scale ) ?>
|
||||
height=<?= reScale( $event['Height'], $scale ) ?>
|
||||
AutoStart=true>
|
||||
</EMBED>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$stream_src = ZM_PATH_ZMS."?mode=jpeg&event=$eid&rate=$rate&scale=$scale";
|
||||
if ( canStreamNative() )
|
||||
{
|
||||
?>
|
||||
<tr><td colspan="6" align="center" valign="middle"><applet code="com.charliemouse.cambozola.Viewer" archive="<?= ZM_PATH_CAMBOZOLA ?>" align="middle" width="<?= reScale( $event['Width'], $scale ) ?>" height="<?= reScale( $event['Height'], $scale ) ?>"><param name="url" value="<?= $stream_src ?>"></applet></td></tr>
|
||||
<img src="<?= $stream_src ?>" border="0" width="<?= reScale( $event['Width'], $scale ) ?>" height="<?= reScale( $event['Height'], $scale ) ?>">
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<applet code="com.charliemouse.cambozola.Viewer" archive="<?= ZM_PATH_CAMBOZOLA ?>" align="middle" width="<?= reScale( $event['Width'], $scale ) ?>" height="<?= reScale( $event['Height'], $scale ) ?>"><param name="url" value="<?= $stream_src ?>"></applet>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td></tr>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -98,30 +98,82 @@ window.setTimeout( "window.location.reload(true)", <?= REFRESH_IMAGE*1000 ?> );
|
|||
</head>
|
||||
<body>
|
||||
<table width="96%" align="center" border="0" cellspacing="0" cellpadding="2">
|
||||
<tr><td align="center">
|
||||
<?php
|
||||
if ( $mode == "stream" )
|
||||
{
|
||||
$stream_src = ZM_PATH_ZMS."?monitor=".$monitor['Id']."&idle=".STREAM_IDLE_DELAY."&refresh=".STREAM_FRAME_DELAY."&scale=$scale";
|
||||
if ( canStreamNative() )
|
||||
if ( ZM_WEB_VIDEO_STREAM_METHOD == 'mpeg' )
|
||||
{
|
||||
$stream_src = ZM_PATH_ZMS."?mode=mpeg&monitor=".$monitor['Id']."&scale=$scale&bit_rate=".VIDEO_BITRATE."&buffer=0";
|
||||
if ( isWindows() )
|
||||
{
|
||||
if ( isInternetExplorer() )
|
||||
{
|
||||
?>
|
||||
<tr><td colspan="5" align="center"><img src="<?= $stream_src ?>" border="0" width="<?= reScale( $monitor['Width'], $scale ) ?>" height="<?= reScale( $monitor['Height'], $scale ) ?>"></td></tr>
|
||||
<OBJECT ID="MediaPlayer1" width=<?= reScale( $monitor['Width'], $scale ) ?> height=<?= reScale( $monitor['Height'], $scale ) ?>
|
||||
classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
|
||||
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902"
|
||||
standby="Loading Microsoft Windows Media Player components..."
|
||||
type="application/x-oleobject">
|
||||
<PARAM NAME="FileName" VALUE="<?= $stream_src."&format=asf" ?>"
|
||||
<PARAM NAME="animationatStart" VALUE="true">
|
||||
<PARAM NAME="transparentatStart" VALUE="true">
|
||||
<PARAM NAME="autoStart" VALUE="true">
|
||||
<PARAM NAME="showControls" VALUE="false">
|
||||
</OBJECT>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<EMBED type="application/x-mplayer2"
|
||||
pluginspage = "http://www.microsoft.com/Windows/MediaPlayer/"
|
||||
SRC="<?= $stream_src."&format=asf" ?>"
|
||||
name="MediaPlayer1"
|
||||
width=<?= reScale( $monitor['Width'], $scale ) ?>
|
||||
height=<?= reScale( $monitor['Height'], $scale ) ?>
|
||||
AutoStart=true>
|
||||
</EMBED>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<EMBED type="video/mpeg"
|
||||
src="<?= $stream_src."&format=mpeg" ?>"
|
||||
width=<?= reScale( $monitor['Width'], $scale ) ?>
|
||||
height=<?= reScale( $monitor['Height'], $scale ) ?>
|
||||
AutoStart=true>
|
||||
</EMBED>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$stream_src = ZM_PATH_ZMS."?mode=jpeg&monitor=".$monitor['Id']."&idle=".STREAM_IDLE_DELAY."&refresh=".STREAM_FRAME_DELAY."&scale=$scale";
|
||||
if ( canStreamNative() )
|
||||
{
|
||||
?>
|
||||
<tr><td colspan="5" align="center"><applet code="com.charliemouse.cambozola.Viewer" archive="<?= ZM_PATH_CAMBOZOLA ?>" align="middle" width="<?= reScale( $monitor['Width'], $scale ) ?>" height="<?= reScale( $monitor['Height'], $scale ) ?>"><param name="url" value="<?= $stream_src ?>"></applet></td></tr>
|
||||
<img src="<?= $stream_src ?>" border="0" width="<?= reScale( $monitor['Width'], $scale ) ?>" height="<?= reScale( $monitor['Height'], $scale ) ?>">
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<applet code="com.charliemouse.cambozola.Viewer" archive="<?= ZM_PATH_CAMBOZOLA ?>" align="middle" width="<?= reScale( $monitor['Width'], $scale ) ?>" height="<?= reScale( $monitor['Height'], $scale ) ?>"><param name="url" value="<?= $stream_src ?>"></applet>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<tr><td colspan="5" align="center"><img name="zmImage" src="<?= ZM_DIR_IMAGES.'/'.$monitor['Name'] ?>.jpg" border="0" width="<?= reScale( $monitor['Width'], $scale ) ?>" height="<?= reScale( $monitor['Height'], $scale ) ?>"></td></tr>
|
||||
<img name="zmImage" src="<?= ZM_DIR_IMAGES.'/'.$monitor['Name'] ?>.jpg" border="0" width="<?= reScale( $monitor['Width'], $scale ) ?>" height="<?= reScale( $monitor['Height'], $scale ) ?>">
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</td></tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -95,30 +95,82 @@ window.setTimeout( "window.location.reload(true)", <?= REFRESH_IMAGE*1000 ?> );
|
|||
</head>
|
||||
<body>
|
||||
<table width="96%" align="center" border="0" cellspacing="0" cellpadding="2">
|
||||
<tr><td colspan="5" align="center">
|
||||
<?php
|
||||
if ( $mode == "stream" )
|
||||
{
|
||||
$stream_src = ZM_PATH_ZMS."?monitor=".$monitor['Id']."&idle=".STREAM_IDLE_DELAY."&refresh=".STREAM_FRAME_DELAY."&scale=$scale";
|
||||
if ( canStreamNative() )
|
||||
if ( ZM_WEB_VIDEO_STREAM_METHOD == 'mpeg' )
|
||||
{
|
||||
$stream_src = ZM_PATH_ZMS."?mode=mpeg&monitor=".$monitor['Id']."&scale=$scale&bit_rate=".VIDEO_BITRATE."&buffer=0";
|
||||
if ( isWindows() )
|
||||
{
|
||||
if ( isInternetExplorer() )
|
||||
{
|
||||
?>
|
||||
<tr><td colspan="5" align="center"><img src="<?= $stream_src ?>" border="0" width="<?= reScale( $monitor['Width'], $scale ) ?>" height="<?= reScale( $monitor['Height'], $scale ) ?>"></td></tr>
|
||||
<OBJECT ID="MediaPlayer1" width=<?= reScale( $monitor['Width'], $scale ) ?> height=<?= reScale( $monitor['Height'], $scale ) ?>
|
||||
classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
|
||||
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902"
|
||||
standby="Loading Microsoft Windows Media Player components..."
|
||||
type="application/x-oleobject">
|
||||
<PARAM NAME="FileName" VALUE="<?= $stream_src."&format=asf" ?>"
|
||||
<PARAM NAME="animationatStart" VALUE="true">
|
||||
<PARAM NAME="transparentatStart" VALUE="true">
|
||||
<PARAM NAME="autoStart" VALUE="true">
|
||||
<PARAM NAME="showControls" VALUE="false">
|
||||
</OBJECT>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<EMBED type="application/x-mplayer2"
|
||||
pluginspage = "http://www.microsoft.com/Windows/MediaPlayer/"
|
||||
SRC="<?= $stream_src."&format=asf" ?>"
|
||||
name="MediaPlayer1"
|
||||
width=<?= reScale( $monitor['Width'], $scale ) ?>
|
||||
height=<?= reScale( $monitor['Height'], $scale ) ?>
|
||||
AutoStart=true>
|
||||
</EMBED>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<EMBED type="video/mpeg"
|
||||
src="<?= $stream_src."&format=mpeg" ?>"
|
||||
width=<?= reScale( $monitor['Width'], $scale ) ?>
|
||||
height=<?= reScale( $monitor['Height'], $scale ) ?>
|
||||
AutoStart=true>
|
||||
</EMBED>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$stream_src = ZM_PATH_ZMS."?mode=jpeg&monitor=".$monitor['Id']."&idle=".STREAM_IDLE_DELAY."&refresh=".STREAM_FRAME_DELAY."&scale=$scale";
|
||||
if ( canStreamNative() )
|
||||
{
|
||||
?>
|
||||
<tr><td colspan="5" align="center"><applet code="com.charliemouse.cambozola.Viewer" archive="<?= ZM_PATH_CAMBOZOLA ?>" align="middle" width="<?= reScale( $monitor['Width'], $scale ) ?>" height="<?= reScale( $monitor['Height'], $scale ) ?>"><param name="url" value="<?= $stream_src ?>"></applet></td></tr>
|
||||
<img src="<?= $stream_src ?>" border="0" width="<?= reScale( $monitor['Width'], $scale ) ?>" height="<?= reScale( $monitor['Height'], $scale ) ?>">
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<applet code="com.charliemouse.cambozola.Viewer" archive="<?= ZM_PATH_CAMBOZOLA ?>" align="middle" width="<?= reScale( $monitor['Width'], $scale ) ?>" height="<?= reScale( $monitor['Height'], $scale ) ?>"><param name="url" value="<?= $stream_src ?>"></applet>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<tr><td colspan="5" align="center"><img name="zmImage" src="<?= ZM_DIR_IMAGES.'/'.$monitor['Name'] ?>.jpg" border="0" width="<?= reScale( $monitor['Width'], $scale ) ?>" height="<?= reScale( $monitor['Height'], $scale ) ?>"></td></tr>
|
||||
<img name="zmImage" src="<?= ZM_DIR_IMAGES.'/'.$monitor['Name'] ?>.jpg" border="0" width="<?= reScale( $monitor['Width'], $scale ) ?>" height="<?= reScale( $monitor['Height'], $scale ) ?>">
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</td></tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -452,6 +452,14 @@ my @options =
|
|||
type => $types{abs_path},
|
||||
category => 'paths',
|
||||
},
|
||||
{
|
||||
name => "ZM_WEB_VIDEO_STREAM_METHOD",
|
||||
default => "jpeg",
|
||||
description => "Which method should be used to send video streams to your browser, choose 'mpeg' or 'jpeg'",
|
||||
help => "ZoneMinder can be configured to use either mpeg encoded video or a series or still jpeg images when sending video streams. This option defines which is used. If you choose mpeg you should ensure that you have the appropriate plugins available on your browser whereas choosing jpeg will work natively on Mozilla and related browsers and with a Java applet on Internet Explorer",
|
||||
type => { db_type=>'string', hint=>'mpeg|jpeg', pattern=>qr|^([mj])|i, format=>q( $1 =~ /^m/ ? 'mpeg' : 'jpeg' ) },
|
||||
category => 'web',
|
||||
},
|
||||
{
|
||||
name => "ZM_WEB_POPUP_ON_ALARM",
|
||||
default => "yes",
|
||||
|
@ -918,6 +926,14 @@ my @options =
|
|||
type => $types{integer},
|
||||
category => 'highband',
|
||||
},
|
||||
{
|
||||
name => "ZM_WEB_H_VIDEO_BITRATE",
|
||||
default => "500000",
|
||||
description => "How long (in milliseconds) between streamed frames in the watch window",
|
||||
help => "The top frame of the monitor window when monitoring a live feed in streaming mode contains a continuous stream of images. This option controls how often a new frame is sent to the browser when the monitor is idle, ie. not in alarm state. It makes little sense to set this too small as if it results in frames being sent much faster than they are being captured you will just get the same ones over and over. It should be set to be less or equal to the capture rate of the cameras you are using which will normally be between 2 and 25 Frames Per Second which maps to values between 500 and 40 being used here though your bandwidth may well limit how much can actually be sent. Note also that this is the update rate when no alarms are being generated, if an alarm situation occurs then the rate speeds up as per the next option so this can be set to a longer delay without you missing anything.",
|
||||
type => $types{integer},
|
||||
category => 'highband',
|
||||
},
|
||||
{
|
||||
name => "ZM_WEB_H_STREAM_IDLE_DELAY",
|
||||
default => "250",
|
||||
|
@ -984,6 +1000,14 @@ my @options =
|
|||
type => $types{integer},
|
||||
category => 'medband',
|
||||
},
|
||||
{
|
||||
name => "ZM_WEB_M_VIDEO_BITRATE",
|
||||
default => "200000",
|
||||
description => "How long (in milliseconds) between streamed frames in the watch window",
|
||||
help => "The top frame of the monitor window when monitoring a live feed in streaming mode contains a continuous stream of images. This option controls how often a new frame is sent to the browser when the monitor is idle, ie. not in alarm state. It makes little sense to set this too small as if it results in frames being sent much faster than they are being captured you will just get the same ones over and over. It should be set to be less or equal to the capture rate of the cameras you are using which will normally be between 2 and 25 Frames Per Second which maps to values between 500 and 40 being used here though your bandwidth may well limit how much can actually be sent. Note also that this is the update rate when no alarms are being generated, if an alarm situation occurs then the rate speeds up as per the next option so this can be set to a longer delay without you missing anything.",
|
||||
type => $types{integer},
|
||||
category => 'highband',
|
||||
},
|
||||
{
|
||||
name => "ZM_WEB_M_STREAM_IDLE_DELAY",
|
||||
default => "2500",
|
||||
|
@ -1050,6 +1074,14 @@ my @options =
|
|||
type => $types{integer},
|
||||
category => 'lowband',
|
||||
},
|
||||
{
|
||||
name => "ZM_WEB_L_VIDEO_BITRATE",
|
||||
default => "50000",
|
||||
description => "How long (in milliseconds) between streamed frames in the watch window",
|
||||
help => "The top frame of the monitor window when monitoring a live feed in streaming mode contains a continuous stream of images. This option controls how often a new frame is sent to the browser when the monitor is idle, ie. not in alarm state. It makes little sense to set this too small as if it results in frames being sent much faster than they are being captured you will just get the same ones over and over. It should be set to be less or equal to the capture rate of the cameras you are using which will normally be between 2 and 25 Frames Per Second which maps to values between 500 and 40 being used here though your bandwidth may well limit how much can actually be sent. Note also that this is the update rate when no alarms are being generated, if an alarm situation occurs then the rate speeds up as per the next option so this can be set to a longer delay without you missing anything.",
|
||||
type => $types{integer},
|
||||
category => 'highband',
|
||||
},
|
||||
{
|
||||
name => "ZM_WEB_L_STREAM_IDLE_DELAY",
|
||||
default => "10000",
|
||||
|
|
Loading…
Reference in New Issue