Merge branch 'master' of github.com:ZoneMinder/zoneminder

pull/2789/head
Isaac Connor 2019-12-29 16:46:45 -05:00
commit e039b136c0
8 changed files with 74 additions and 80 deletions

View File

@ -34,7 +34,6 @@ install:
env: env:
- SMPFLAGS=-j4 OS=el DIST=7 - SMPFLAGS=-j4 OS=el DIST=7
- SMPFLAGS=-j4 OS=el DIST=8 DOCKER_REPO=knnniggett/packpack - SMPFLAGS=-j4 OS=el DIST=8 DOCKER_REPO=knnniggett/packpack
- SMPFLAGS=-j4 OS=fedora DIST=29
- SMPFLAGS=-j4 OS=fedora DIST=30 - SMPFLAGS=-j4 OS=fedora DIST=30
- SMPFLAGS=-j4 OS=fedora DIST=31 - SMPFLAGS=-j4 OS=fedora DIST=31
- SMPFLAGS=-j4 OS=ubuntu DIST=trusty DOCKER_REPO=iconzm/packpack - SMPFLAGS=-j4 OS=ubuntu DIST=trusty DOCKER_REPO=iconzm/packpack

View File

@ -14,11 +14,16 @@
# This will tell zoneminder's cmake process we are building against a known distro # This will tell zoneminder's cmake process we are building against a known distro
%global zmtargetdistro %{?rhel:el%{rhel}}%{!?rhel:fc%{fedora}} %global zmtargetdistro %{?rhel:el%{rhel}}%{!?rhel:fc%{fedora}}
# Fedora >= 25 needs apcu backwards compatibility module # Fedora needs apcu backwards compatibility module
%if 0%{?fedora} >= 25 %if 0%{?fedora}
%global with_apcu_bc 1 %global with_apcu_bc 1
%endif %endif
# Newer php's keep json functions in a subpackage
%if 0%{?fedora} || 0%{?rhel} >= 8
%global with_php_json 1
%endif
# The default for everything but el7 these days # The default for everything but el7 these days
%global _hardened_build 1 %global _hardened_build 1
@ -105,7 +110,7 @@ Summary: Common files for ZoneMinder, not tied to a specific web server
Requires: php-mysqli Requires: php-mysqli
Requires: php-common Requires: php-common
Requires: php-gd Requires: php-gd
%{?fedora:Requires: php-json} %{?with_php_json:Requires: php-json}
Requires: php-pecl-apcu Requires: php-pecl-apcu
%{?with_apcu_bc:Requires: php-pecl-apcu-bc} %{?with_apcu_bc:Requires: php-pecl-apcu-bc}
Requires: cambozola Requires: cambozola

View File

@ -81,7 +81,7 @@ void FFMPEGInit() {
av_log_set_callback(log_libav_callback); av_log_set_callback(log_libav_callback);
Info("Enabling ffmpeg logs, as LOG_DEBUG+LOG_FFMPEG are enabled in options"); Info("Enabling ffmpeg logs, as LOG_DEBUG+LOG_FFMPEG are enabled in options");
} else { } else {
Info("Not enabling ffmpeg logs, as LOG_FFMPEG and/or LOG_DEBUG is disabled in options, or this monitor not part of your debug targets"); Info("Not enabling ffmpeg logs, as LOG_FFMPEG and/or LOG_DEBUG is disabled in options, or this monitor is not part of your debug targets");
av_log_set_level(AV_LOG_QUIET); av_log_set_level(AV_LOG_QUIET);
} }
#if !LIBAVFORMAT_VERSION_CHECK(58, 9, 0, 64, 0) #if !LIBAVFORMAT_VERSION_CHECK(58, 9, 0, 64, 0)
@ -291,8 +291,9 @@ static void zm_log_fps(double d, const char *postfix) {
#if LIBAVCODEC_VERSION_CHECK(57, 64, 0, 64, 0) #if LIBAVCODEC_VERSION_CHECK(57, 64, 0, 64, 0)
void zm_dump_codecpar ( const AVCodecParameters *par ) { void zm_dump_codecpar ( const AVCodecParameters *par ) {
Debug(1, "Dumping codecpar codec_type(%d) codec_id(%d %s) codec_tag(%d) width(%d) height(%d) bit_rate(%d) format(%d = %s)", Debug(1, "Dumping codecpar codec_type(%d %s) codec_id(%d %s) codec_tag(%" PRIu32 ") width(%d) height(%d) bit_rate(%" PRIu64 ") format(%d %s)",
par->codec_type, par->codec_type,
av_get_media_type_string(par->codec_type),
par->codec_id, par->codec_id,
avcodec_get_name(par->codec_id), avcodec_get_name(par->codec_id),
par->codec_tag, par->codec_tag,
@ -300,8 +301,8 @@ void zm_dump_codecpar ( const AVCodecParameters *par ) {
par->height, par->height,
par->bit_rate, par->bit_rate,
par->format, par->format,
((AVPixelFormat)par->format == AV_PIX_FMT_NONE ? "none" : av_get_pix_fmt_name((AVPixelFormat)par->format)) (((AVPixelFormat)par->format == AV_PIX_FMT_NONE) ? "none" : av_get_pix_fmt_name((AVPixelFormat)par->format))
); );
} }
#endif #endif

View File

@ -1087,6 +1087,7 @@ int FfmpegCamera::transfer_to_image(
return -1; return -1;
} }
#if LIBAVUTIL_VERSION_CHECK(54, 6, 0, 6, 0) #if LIBAVUTIL_VERSION_CHECK(54, 6, 0, 6, 0)
// From what I've read, we should align the linesizes to 32bit so that ffmpeg can use SIMD instructions too.
int size = av_image_fill_arrays( int size = av_image_fill_arrays(
output_frame->data, output_frame->linesize, output_frame->data, output_frame->linesize,
directbuffer, imagePixFormat, width, height, 32); directbuffer, imagePixFormat, width, height, 32);
@ -1128,8 +1129,8 @@ int FfmpegCamera::transfer_to_image(
mConvertContext, input_frame->data, input_frame->linesize, mConvertContext, input_frame->data, input_frame->linesize,
0, mVideoCodecContext->height, 0, mVideoCodecContext->height,
output_frame->data, output_frame->linesize); output_frame->data, output_frame->linesize);
if ( ret <= 0 ) { if ( ret < 0 ) {
Error("Unable to convert format %u %s linesize %d height %d to format %u %s linesize %d at frame %d codec %u %s : code: %d", Error("Unable to convert format %u %s linesize %d height %d to format %u %s linesize %d at frame %d codec %u %s lines %d: code: %d",
input_frame->format, av_get_pix_fmt_name((AVPixelFormat)input_frame->format), input_frame->format, av_get_pix_fmt_name((AVPixelFormat)input_frame->format),
input_frame->linesize, mVideoCodecContext->height, input_frame->linesize, mVideoCodecContext->height,
imagePixFormat, imagePixFormat,
@ -1137,6 +1138,7 @@ int FfmpegCamera::transfer_to_image(
output_frame->linesize, output_frame->linesize,
frameCount, frameCount,
mVideoCodecContext->pix_fmt, av_get_pix_fmt_name(mVideoCodecContext->pix_fmt), mVideoCodecContext->pix_fmt, av_get_pix_fmt_name(mVideoCodecContext->pix_fmt),
mVideoCodecContext->height,
ret ret
); );
return -1; return -1;

View File

@ -175,7 +175,7 @@ cd ../
VERSION=`cat ${GITHUB_FORK}_zoneminder_release/version` VERSION=`cat ${GITHUB_FORK}_zoneminder_release/version`
if [ $VERSION == "" ]; then if [ -z "$VERSION" ]; then
exit 1; exit 1;
fi; fi;
if [ "$SNAPSHOT" != "stable" ] && [ "$SNAPSHOT" != "" ]; then if [ "$SNAPSHOT" != "stable" ] && [ "$SNAPSHOT" != "" ]; then

View File

@ -17,33 +17,26 @@ for CMD in sshfs rsync find fusermount mkdir; do
fi fi
done done
# See https://docs.travis-ci.com/user/cron-jobs/ if [ "${OS}" == "debian" ] || [ "${OS}" == "ubuntu" ] || [ "${OS}" == "raspbian" ]; then
#
# TO-DO: Deploy after ever commit for rpm builds after pacakge signing & repo creation is containerized
#
if [ "${TRAVIS_EVENT_TYPE}" == "cron" ] || [ "${OS}" == "debian" ] || [ "${OS}" == "ubuntu" ]; then
if [ "${OS}" == "debian" ] || [ "${OS}" == "ubuntu" ]; then
targetfolder="debian/master/mini-dinstall/incoming" targetfolder="debian/master/mini-dinstall/incoming"
else else
targetfolder="travis" targetfolder="travis"
fi fi
echo echo
echo "Target subfolder set to $targetfolder" echo "Target subfolder set to $targetfolder"
echo echo
echo "Running \$(rsync -v -e 'ssh -vvv' build/*.{rpm,deb,dsc,tar.xz,changes} zmrepo@zmrepo.zoneminder.com:${targetfolder}/ 2>&1)" echo "Running \$(rsync -v -e 'ssh -vvv' build/*.{rpm,deb,dsc,tar.xz,changes} zmrepo@zmrepo.zoneminder.com:${targetfolder}/ 2>&1)"
rsync -v --ignore-missing-args -e 'ssh -vvv' build/*.{rpm,deb,dsc,tar.xz,changes} zmrepo@zmrepo.zoneminder.com:${targetfolder}/ 2>&1 rsync -v --ignore-missing-args --exclude 'external-repo.noarch.rpm' -e 'ssh -vvv' build/*.{rpm,deb,dsc,tar.xz,changes} zmrepo@zmrepo.zoneminder.com:${targetfolder}/ 2>&1
if [ "$?" -eq 0 ]; then if [ "$?" -eq 0 ]; then
echo echo
echo "Files copied successfully." echo "Files copied successfully."
echo echo
else else
echo echo
echo "ERROR: Attempt to rsync to zmrepo.zoneminder.com failed!" echo "ERROR: Attempt to rsync to zmrepo.zoneminder.com failed!"
echo "See log output for details." echo "See log output for details."
echo echo
exit 99 exit 99
fi
fi fi

View File

@ -293,13 +293,8 @@ if [ "${TRAVIS}" == "true" ]; then
fi fi
checksanity checksanity
# We don't want to build packages for all supported distros after every commit
# Only build all packages when executed via cron
# See https://docs.travis-ci.com/user/cron-jobs/
# Steps common to Redhat distros # Steps common to Redhat distros
if [ "${OS}" == "el" ] || [ "${OS}" == "fedora" ]; then if [ "${OS}" == "el" ] || [ "${OS}" == "fedora" ]; then
if [ "${TRAVIS_EVENT_TYPE}" == "cron" ] || [ "${TRAVIS}" != "true" ]; then
commonprep commonprep
echo "Begin Redhat build..." echo "Begin Redhat build..."
@ -328,7 +323,6 @@ if [ "${OS}" == "el" ] || [ "${OS}" == "fedora" ]; then
echo "Starting packpack..." echo "Starting packpack..."
execpackpack execpackpack
fi
# Steps common to Debian based distros # Steps common to Debian based distros
elif [ "${OS}" == "debian" ] || [ "${OS}" == "ubuntu" ] || [ "${OS}" == "raspbian" ]; then elif [ "${OS}" == "debian" ] || [ "${OS}" == "ubuntu" ] || [ "${OS}" == "raspbian" ]; then

View File

@ -59,10 +59,10 @@ class Monitor extends ZM_Object {
'LabelX' => 0, 'LabelX' => 0,
'LabelY' => 0, 'LabelY' => 0,
'LabelSize' => 1, 'LabelSize' => 1,
'ImageBufferCount' => 100, 'ImageBufferCount' => 20,
'WarmupCount' => 0, 'WarmupCount' => 0,
'PreEventCount' => 0, 'PreEventCount' => 5,
'PostEventCount' => 0, 'PostEventCount' => 5,
'StreamReplayBuffer' => 0, 'StreamReplayBuffer' => 0,
'AlarmFrameCount' => 1, 'AlarmFrameCount' => 1,
'SectionLength' => 600, 'SectionLength' => 600,