Merge branch 'master' into storageareas
This commit is contained in:
commit
e0dc8a5f6b
|
@ -28,7 +28,7 @@ override_dh_auto_configure:
|
|||
-DZM_CACHEDIR="/var/cache/zoneminder/cache" \
|
||||
-DZM_DIR_EVENTS="/var/cache/zoneminder/events" \
|
||||
-DZM_DIR_IMAGES="/var/cache/zoneminder/images" \
|
||||
-DZM_PATH_ZMS="/zm/cgi-bin/nph-zms" \
|
||||
-DZM_PATH_ZMS="/zm/cgi-bin/nph-zms"
|
||||
|
||||
override_dh_clean:
|
||||
dh_clean $(MANPAGES1)
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
# This configuration is only needed for compatibility with zmninja on iOS
|
||||
# This configuration is only needed for compatibility with zmninja
|
||||
|
||||
# If not using VirtualHosts, copy or symlink this file into the Apache config folder
|
||||
# If using VirtualHosts, then this config must be placed inside the appropriate
|
||||
# <VirtualHost> directive.
|
||||
|
||||
# Make sure you have enabled/loaded header manipulation modules
|
||||
# For example, in Debian based distros the command is "sudo a2enmod headers"
|
||||
|
||||
# zmNinja header permissions. Tweak to your needs
|
||||
|
||||
Header always set Access-Control-Allow-Credentials true
|
||||
#zmNinja's WKWebView will set the origin header as localhost:8080
|
||||
Header always set Access-Control-Allow-Origin "http://localhost:8080"
|
||||
|
|
|
@ -485,7 +485,7 @@ sub start {
|
|||
logTerm();
|
||||
zmDbDisconnect();
|
||||
|
||||
my $fd = 0;
|
||||
my $fd = 3; # leave stdin,stdout,stderr open. Closing them causes problems with libx264
|
||||
while( $fd < POSIX::sysconf(&POSIX::_SC_OPEN_MAX) ) {
|
||||
POSIX::close($fd++);
|
||||
}
|
||||
|
|
|
@ -225,9 +225,10 @@ static void zm_log_fps(double d, const char *postfix) {
|
|||
Debug(1, "%3.2f %s", d, postfix);
|
||||
} else if (v % (100 * 1000)) {
|
||||
Debug(1, "%1.0f %s", d, postfix);
|
||||
} else
|
||||
} else {
|
||||
Debug(1, "%1.0fk %s", d / 1000, postfix);
|
||||
}
|
||||
}
|
||||
|
||||
#if LIBAVCODEC_VERSION_CHECK(57, 64, 0, 64, 0)
|
||||
void zm_dump_codecpar ( const AVCodecParameters *par ) {
|
||||
|
@ -355,8 +356,7 @@ int check_sample_fmt(AVCodec *codec, enum AVSampleFormat sample_fmt) {
|
|||
#if LIBAVCODEC_VERSION_CHECK(56, 8, 0, 60, 100)
|
||||
#else
|
||||
unsigned int zm_av_packet_ref( AVPacket *dst, AVPacket *src ) {
|
||||
dst->size = (src->size + FF_INPUT_BUFFER_PADDING_SIZE)/sizeof(uint64_t) + 1;
|
||||
dst->data = reinterpret_cast<uint8_t*>(new uint64_t[dst->size]);
|
||||
av_new_packet(dst,src->size);
|
||||
memcpy(dst->data, src->data, src->size);
|
||||
dst->flags = src->flags;
|
||||
return 0;
|
||||
|
|
|
@ -303,8 +303,8 @@ void zm_dump_codecpar ( const AVCodecParameters *par );
|
|||
#define zm_av_packet_unref( packet ) av_packet_unref( packet )
|
||||
#define zm_av_packet_ref( dst, src ) av_packet_ref( dst, src )
|
||||
#else
|
||||
#define zm_av_packet_unref( packet ) av_free_packet( packet )
|
||||
unsigned int zm_av_packet_ref( AVPacket *dst, AVPacket *src );
|
||||
#define zm_av_packet_unref( packet ) av_free_packet( packet )
|
||||
#endif
|
||||
#if LIBAVCODEC_VERSION_CHECK(52, 23, 0, 23, 0)
|
||||
#define zm_avcodec_decode_video( context, rawFrame, frameComplete, packet ) avcodec_decode_video2( context, rawFrame, frameComplete, packet )
|
||||
|
|
|
@ -331,6 +331,8 @@ int FfmpegCamera::OpenFfmpeg() {
|
|||
ret = av_dict_set(&opts, "rtsp_transport", "tcp", 0);
|
||||
} else if ( method == "rtpRtspHttp" ) {
|
||||
ret = av_dict_set(&opts, "rtsp_transport", "http", 0);
|
||||
} else if ( method == "rtpUni" ) {
|
||||
ret = av_dict_set(&opts, "rtsp_transport", "udp", 0);
|
||||
} else {
|
||||
Warning("Unknown method (%s)", method.c_str() );
|
||||
}
|
||||
|
@ -606,7 +608,8 @@ int FfmpegCamera::OpenFfmpeg() {
|
|||
return -1;
|
||||
}
|
||||
|
||||
mConvertContext = sws_getContext(mVideoCodecContext->width,
|
||||
mConvertContext = sws_getContext(
|
||||
mVideoCodecContext->width,
|
||||
mVideoCodecContext->height,
|
||||
mVideoCodecContext->pix_fmt,
|
||||
width, height,
|
||||
|
@ -722,7 +725,8 @@ int FfmpegCamera::CaptureAndRecord( Image &image, timeval recording, char* event
|
|||
uint32_t video_writer_event_id = monitor->GetVideoWriterEventId();
|
||||
|
||||
if ( last_event_id != video_writer_event_id ) {
|
||||
Debug(2, "Have change of event. last_event(%d), our current (%d)", last_event_id, video_writer_event_id );
|
||||
Debug(2, "Have change of event. last_event(%d), our current (%d)",
|
||||
last_event_id, video_writer_event_id);
|
||||
|
||||
if ( videoStore ) {
|
||||
Info("Re-starting video storage module");
|
||||
|
|
|
@ -127,7 +127,8 @@ VideoStore::VideoStore(const char *filename_in, const char *format_in,
|
|||
|
||||
#else
|
||||
video_out_stream =
|
||||
avformat_new_stream(oc,(AVCodec *)(video_in_ctx->codec));
|
||||
avformat_new_stream(oc, NULL);
|
||||
//(AVCodec *)(video_in_ctx->codec));
|
||||
//avformat_new_stream(oc,(const AVCodec *)(video_in_ctx->codec));
|
||||
if ( !video_out_stream ) {
|
||||
Fatal("Unable to create video out stream\n");
|
||||
|
@ -158,6 +159,9 @@ VideoStore::VideoStore(const char *filename_in, const char *format_in,
|
|||
|
||||
// Just copy them from the in, no reason to choose different
|
||||
video_out_ctx->time_base = video_in_ctx->time_base;
|
||||
if ( ! (video_out_ctx->time_base.num && video_out_ctx->time_base.den) ) {
|
||||
video_out_ctx->time_base = AV_TIME_BASE_Q;
|
||||
}
|
||||
video_out_stream->time_base = video_in_stream->time_base;
|
||||
|
||||
Debug(3,
|
||||
|
@ -339,6 +343,9 @@ bool VideoStore::open() {
|
|||
if (ret < 0) {
|
||||
Error("Error occurred when writing out file header to %s: %s\n",
|
||||
filename, av_make_error_string(ret).c_str());
|
||||
/* free the stream */
|
||||
avio_closep(&oc->pb);
|
||||
//avformat_free_context(oc);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -412,7 +419,7 @@ VideoStore::~VideoStore() {
|
|||
if (int rc = av_write_trailer(oc)) {
|
||||
Error("Error writing trailer %s", av_err2str(rc));
|
||||
} else {
|
||||
Debug(3, "Sucess Writing trailer");
|
||||
Debug(3, "Success Writing trailer");
|
||||
}
|
||||
|
||||
// When will we not be using a file ?
|
||||
|
@ -426,7 +433,7 @@ VideoStore::~VideoStore() {
|
|||
} else {
|
||||
Debug(3, "Not closing avio because we are not writing to a file.");
|
||||
}
|
||||
}
|
||||
} // end if ( oc->pb )
|
||||
// I wonder if we should be closing the file first.
|
||||
// I also wonder if we really need to be doing all the ctx
|
||||
// allocation/de-allocation constantly, or whether we can just re-use it.
|
||||
|
|
|
@ -163,8 +163,19 @@ if [ $? -ne 0 ]; then
|
|||
fi;
|
||||
cd "$DIRECTORY.orig";
|
||||
|
||||
# Init submodules
|
||||
git submodule init
|
||||
git submodule update --init --recursive
|
||||
|
||||
# Cleanup
|
||||
rm -rf .git
|
||||
rm .gitignore
|
||||
cd ../
|
||||
|
||||
tar zcf $DIRECTORY.orig.tar.gz $DIRECTORY.orig
|
||||
cd $DIRECTORY.orig
|
||||
|
||||
# Generate Changlog
|
||||
if [ "$DISTRO" == "trusty" ] || [ "$DISTRO" == "precise" ]; then
|
||||
mv distros/ubuntu1204 debian
|
||||
else
|
||||
|
@ -189,12 +200,6 @@ if [ "$URGENCY" = "" ]; then
|
|||
URGENCY="medium"
|
||||
fi;
|
||||
|
||||
rm -rf .git
|
||||
rm .gitignore
|
||||
cd ../
|
||||
tar zcf $DIRECTORY.orig.tar.gz $DIRECTORY.orig
|
||||
cd $DIRECTORY.orig
|
||||
|
||||
if [ "$SNAPSHOT" == "stable" ]; then
|
||||
cat <<EOF > debian/changelog
|
||||
zoneminder ($VERSION-$DISTRO${PACKAGE_VERSION}) $DISTRO; urgency=$URGENCY
|
||||
|
|
Loading…
Reference in New Issue