Commit Graph

131 Commits

Author SHA1 Message Date
Isaac Connor 42100d9a33 introduce current_event in videostore_data so we know which event we are writing a video file for. Also, GetLastEventId so that non-friends can find out the event id of the current event. 2017-06-13 17:05:37 -04:00
Isaac Connor 457d7e5c94 code documentation, whitespace 2017-05-20 09:03:51 -04:00
Isaac Connor e7ca892efd merge more differences from SA 2017-05-19 15:07:41 -04:00
Isaac Connor b1f8485969 Fix videostorage (#1885)
* merge relevant c bits to make h264 recording work

* h264 code requires libavresample and boost

* Need libavresample
2017-05-16 12:04:56 -04:00
Isaac Connor c859f7291c Feature h264 videostorage (#1882)
* Moved writing of configure options from Controller to Model.  Fixes #191.

* Initial commit for saving events as videos :)

* Add zm_video.cpp to autotools

* Add zm_video.h to autotools

* Search for MP4V2 header file 3 times: mp4v2/mp4v2.h, mp4v2.h, mp4.h

* Fix serve memory leak

* Few minor code improvements

* Added the ability to override preset, tune, profile and few other improvements

* Correctly write SPS & PPS from x264 encoder headers

* Remove unnessecary SPS & PPS writing code

* Imported missing files from master to feature-h264-videostorage

* Audio support including fixes for dts/pts, split on keyframe and update to mkv extension to prevent ffmpeg problems writing rtsp audio to mp4 containter (header problem)

* Updates to make gcc happy

* Add html5 video control to timeline and event to support mkv playback

* Add zm_videostore.cpp to CMakeLists.txt

* Remove Modern Branch for now

* Fix minor bug

* Option handled added in master, removing duplicate declaration

* Add CaptureandRecord from zm_camera.h

* Putting placeholder in for CaptureAndRecord function

* Removed duplicate code and brackets

* add digest auth file for cmake

Conflicts:
	src/CMakeLists.txt

* Add web dir back into Makefile.am
Revert "Removed web from SUBDIRS in Makefile.am"

This reverts commit d9bbcdf3a9.

* Add CaptureAndRecord to vlc, still need to make it record

* Resolve SegFault on videostore

* Swap to mp4 container

* mp4 changes

* spaces to tabs, hide video stuff if video writer is turned off

* Make timeline open event.mp4 instead of mkv

* Missed mkv in timeline.js

* Fix some issues from the merge conflict

* Resolve post merge build issues with braces

* Fix whitespace

* Update Jpeg and Video options for passthrough options

* Whitespace fix zm_camera.h

* Fix array mkssing comma

* Add support for Jpeg save options for h264 branch snapshot. Might remove altogether if snapshots not needed

* Update VideoStoreData memory size comment

* Change from config.use_mkv_storage to per monitor option VideoWriter from video branch

* Fix bracket issues post merge

* Clean up comments and add av_free_packet

* Convert from event_directory to event file as per Video branch

* Testing videojs for video playback

* Fixed a missing bracket post merge and also SQL_values now used for EventID and Monitors

* bring recent improvements in ffmpeg capture function into captureandrecord

* Remove pict from writeAudioFramePacket as not used

* Add translate options for h264 Storage options in Monitor and update en_gb file

* Cherry-Pick from iconnor - make it compile on ubuntu 15.04.  Which is libav 56.1.0

Conflicts:
	src/zm_ffmpeg.cpp
	src/zm_remote_camera_rtsp.cpp

Conflicts:
	distros/ubuntu1204/changelog

* Clean up videostore code and remove lots of unused code

* proof of concept for dynamic/automatic video rotation using video-js plugin zoomrotate

Conflicts:
	web/skins/classic/views/event.php

* removed redundant field in sql query

Conflicts:
	web/skins/classic/views/event.php

* local storage of video js plugin

* Beautify!

Make the code somewhat readable.

* added missing videojs.zoomrotate.js file

added missing videojs.zoomrotate.js file

* Typo

added missing "

* Added missing brackets

* fix to display thumbnails when only storing snapshot.jpg

* added control for video playback rate

Conflicts:
	web/skins/classic/views/event.php

* dynamically create jpegs from video file for viewing in browser

* fix timeline view for SaveJPEGs monitors (without enabled VideoWriter)

* only expose monitor info which are being used in client

* fix segmentation fault in zma with ubuntu 14.04 and ffmpeg 2.5.8 (gcc 4.8)

when libx264 is not installed

* better way of detecting showing image or video in timeline and event view

instead of Monitor.VideoWriter, Event.DefaultVideo is used, so even if
VideoWriter/SaveJPEG option is changed, a valid image or video will always be
displayed for historical events in both timeline and event view

this also fixes loading videos in timeline view

* Fixes problem of crashing zmc when bad packet arrives causing av_interleaved_write_frame() to return non-zero (-22).  Prefilters common packet issues. Add metadata title to generated video file

* Remove syslog.h

* fixed SaveJPEGs are not working

which is caused in errors introduced when merging with master

* Update README.md

* Fix build warnings specific to h264 branch, unused FrameImg, unused ret and int64_t snprintf issues

* Fix PRId64 issue in travis, builds locally fine, but I can see a gcc version issue here

* Fix PRId64 issue in travis, another try

* Try "STDC_FORMAT_MACROS" to see if that helps Travis on gcc 4.6.3

* Revert space removal around PRId64

* video branch ffmpeg 2.9 fixes

ffmpeg 2.9 patched removed SSE2 CPU

* Add FFMPEGInit back

* use webvvt to overlay timestamp (honoring Monitor.LabelFormat) to videos in timeline and event

also fixed bug which prevented seeking in timeline video preview

* ffmpeg 3.0 API build failure fixes

* Update README.md

* merge all the commits from the messed up iconnor_video branch

* fix whitespace

* revert

* whitespace fixes

* spelling fix

* put back some text

* add these back

* fix spelling mistake

* Steal some packet dumping routines from ffmpeg. Convert them to use our logging routines

* add a test and error message if the codec is not h264

* these have been removed in master

* add a view to check auth and just send the video

* add some comments, and dump filename and AVFormatContext on failure to write header

* add the toggle for RecordAudio so that the checkbox works to turn off Audio

* Must init videoStore in constuctor

* more debug and comments, return checking

* Fix dropped part of sql query.

* fix extra else and some whitespace

* Fix missing } from merge that was preventing building.

* fix tabs

* get rid of use of separator, just use \n

* Restore lost fixes for deprecation

* Why are these failing

* Respect record_audio flag when setting up video file so dont try and initiliase mp4 with unsupported audio

* Forgot that I was trying to solve case of stream is true and record_audio
is false.

* Pass swscale_ctx back in to getCachedContext or it will create new
context every frame and leak memory like a mofo.

* Add libx264-dev and libmp4v2-dev to build requires to save hassle of
ensuring they are installed before build.

* Merge my Rotation/Orientation work and fixes for bad h264 streams

* need arpa/inet for reverse lookups

* pull in the new byte range code for viewing videos

* Move our recording flag deeper into closeevent

* add braces and only call closeEvent if there is an event

* deprecate the z_frame_rate stuff which is deprecated in ffmpeg

* remark out some debugging

* fix for video on stream 1

* fix audio_stream to audio_st

* Ignore bad decodes

* fix problems with content-length causing viewing to not work in chrome/android

* change logic of sending file contents to handle an off by one and be more readable

* Some fixes pointed out by Maxim Romanov.  Also simply the loading of events to not join the Monitors table

* fix to sql for timeline

* added RecordAudio to sql in README

* Use sub queries instead of joins to fix errors when using new mysql defaults.

* fix sql queries

* Dockerfile to build feature-h264-videostorage

* Must cast codec

* add php-acpu as a dependency

* require php5-acpu

* fix typo

* remove extra /

* Add a line for out-of-tree builds to do api/lib/Cake/bootstrap.php

* delete merge conflict files

* delete merge conflict files
2017-05-15 22:02:48 -04:00
Andy Bauer 254fcbcef7 update gpl 2 mailing address in source files 2016-12-26 09:23:16 -06:00
Isaac Connor 03b1ced568 tabs to spaces and use 2space indenting 2016-04-04 10:11:48 -04:00
Isaac Connor 1e52a8ad2c remove unused class member 2016-03-24 09:44:34 -04:00
Isaac Connor 6ff4e333b4 Merge branch 'fix_warnings' into multi-server
Conflicts:
	src/zm_monitor.cpp
2015-10-02 15:34:05 +00:00
Isaac Connor 8125ef0334 change types and move things around to remove compile warnings 2015-10-02 09:49:09 -04:00
Isaac Connor 75919c9cd5 Merge branch 'master' into multi-server
Conflicts:
	docs/installationguide/ubuntu.rst
	misc/apache.conf.in
	src/zm_monitor.cpp
2015-08-27 10:34:47 -04:00
Robin Daermann 2aca87654a Remove unneccessary parameter in constructor 2015-08-26 07:44:50 +02:00
Robin Daermann 5b465194f8 Renamed 'Blacken' zone type to 'Privacy' 2015-08-20 17:37:59 +02:00
Robin Daermann 6fc4525784 Blacken Zones are now correctly displayed 2015-08-20 15:01:07 +02:00
Robin Daermann 8f9ed96585 First try to implement blacken areas for monitors 2015-08-20 14:20:41 +02:00
Isaac Connor 41637278c9 merge master 2015-08-19 16:08:12 -04:00
Isaac Connor 12da43afe7 Merge branch 'master' into multi-server
Conflicts:
	src/zm_monitor.cpp
	src/zm_monitor.h
2015-08-19 14:01:28 -04:00
Isaac Connor 880e77b096 Merge branch 'master' into multi-server
Conflicts:
	src/zm_monitor.cpp
	src/zm_monitor.h
2015-08-19 13:30:48 -04:00
Andrew Bauer fe3595bfa1 Merge branch 'add_analysis_interval' of https://github.com/manupap1/ZoneMinder into manupap1-add_analysis_interval
Conflicts:
	CMakeLists.txt
	configure.ac
	db/zm_update-1.28.101.sql
	src/zm_monitor.cpp
	src/zm_monitor.h
	version
2015-08-18 20:20:53 -05:00
Andrew Bauer 68adcc9e67 Merge branch 'large-timestamp' of https://github.com/schrorg/ZoneMinder into schrorg-large-timestamp
Conflicts:
	CMakeLists.txt
	configure.ac
	src/zm_monitor.cpp
	src/zm_monitor.h
	version
2015-08-18 14:07:38 -05:00
Andrew Bauer 59c1b83d4f create embed_exif flag in Monitor class 2015-08-16 17:42:12 -05:00
Robin Daermann 7f3a07f21b Add label size to monitor options (database and backend part)
This commit bumps version to 1.28.101 because of database schema change
2015-08-10 15:35:18 +02:00
Emmanuel Papin 93990b253f Use a dedicated pre event buffer if analysis_fps is set 2015-07-27 16:24:32 +02:00
Emmanuel Papin 0bff99f5c7 Improve string conversion and use unsigned type for analysis_update_delay 2015-07-25 13:38:50 +02:00
Emmanuel Papin 649a39b372 Replace analysis interval parameter by analysis framerate 2015-07-23 16:36:30 -04:00
Emmanuel Papin 132e0a1798 Add analysis fps paramter to monitors 2015-07-22 21:38:35 +02:00
Emmanuel Papin a6b7c6e99f Add analysis interval parameter to monitors 2015-07-21 22:52:52 +02:00
Isaac Connor dfd3d2c4cd use std::string to build sql for loading monitors. ALso use new ZmDbFetch functions 2015-07-20 16:28:21 -04:00
Isaac Connor 3c5a9b796b Merge branch 'master' into zms_no_crash 2015-07-03 11:34:42 -04:00
Isaac Connor 0308baabb3 This change uses a member Image instead of constantly allocation a new Image.
This saves all the initialisation and the lines of debug.
Also in GetImage we potentially remove and entire copy if no scaling or timestamping is being done.
2015-06-03 15:10:52 -04:00
Isaac Connor 4394bb0a9a Make zms not crash when zmc is not running. 2015-02-22 16:58:15 -05:00
Emmanuel Papin 346015f472 Fix some indentations in zm_monitor.h 2014-11-29 14:39:57 +01:00
Emmanuel Papin c313e2e389 Fix a memory leak in Monitor::Analyse() 2014-11-29 06:06:10 +01:00
Isaac Connor 585a1c50a1 Merge branch 'nommap' 2014-07-24 14:40:37 -04:00
Isaac Connor 9385471392 move v4l_multibuffer and v4l_captures_per_frame from Config to Monitor and Local Camera 2014-07-13 16:39:27 -04:00
Isaac Connor 07dbbd46d3 only do mmap on demand 2014-06-26 14:54:47 -04:00
m-bene ceff5a98ea add generic Option field to ffmpeg and libvlc cameras 2014-05-05 13:29:12 +02:00
Sune1337 6c637947e2 Ability to skip frames in motion detection.
The reason for this is to make it possible to reduce CPU-load if split-second motion detection is not required.
2014-04-10 14:59:34 +02:00
Kfir Itzhak 833705b613 Added alarm blend percent (useful for controlling how long an alarm lasts) and a dropdown list is used now if ZM_FAST_IMAGE_BLENDS is enabled 2013-11-03 10:26:04 +02:00
Kyle Johnson 36d94d160f Change zm_monitor.h mem_size from long to unsigned long. Fixes #226. 2013-10-30 09:18:13 -04:00
Kyle Johnson 2c04690865 Allow larger shared memory sizes. Fixes #226 2013-10-30 08:39:24 -04:00
Kyle Johnson 1888bec092 Doing my best to manually remove nextime's plugin architecture while keeping his other changes. 2013-08-13 09:43:23 -04:00
Isaac Connor cdac403fb1 Merge ../zum into develop
Conflicts:
	AUTHORS
	configure.ac
	db/zm_create.sql.in
	scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in
	scripts/zmupdate.pl.in
	src/Makefile.am
	src/zm_buffer.cpp
	src/zm_config_defines.h
	src/zm_event.cpp
	src/zm_ffmpeg.h
	src/zm_ffmpeg_camera.cpp
	src/zm_image.cpp
	src/zm_jpeg.h
	src/zm_local_camera.cpp
	src/zm_logger.cpp
	src/zm_mem_utils.h
	src/zm_monitor.cpp
	src/zm_monitor.h
	src/zm_mpeg.cpp
	src/zm_remote_camera_http.cpp
	src/zm_remote_camera_rtsp.cpp
	src/zm_rtsp.cpp
	src/zm_sdp.cpp
	src/zm_sdp.h
	src/zm_stream.cpp
	src/zm_thread.cpp
	src/zm_thread.h
	src/zm_threaddata.cpp
	src/zm_user.cpp
	src/zm_user.h
	src/zm_utils.cpp
	src/zm_zone.cpp
	src/zm_zone.h
	web/includes/actions.php
	web/lang/big5_big5.php
	web/lang/cn_zh.php
	web/lang/cs_cz.php
	web/lang/de_de.php
	web/lang/dk_dk.php
	web/lang/en_gb.php
	web/lang/es_ar.php
	web/lang/et_ee.php
	web/lang/fr_fr.php
	web/lang/he_il.php
	web/lang/hu_hu.php
	web/lang/it_it.php
	web/lang/ja_jp.php
	web/lang/nl_nl.php
	web/lang/pl_pl.php
	web/lang/pt_br.php
	web/lang/ro_ro.php
	web/lang/ru_ru.php
	web/lang/se_se.php
	web/skins/classic/js/skin.js
	web/skins/classic/views/js/monitor.js.php
	web/skins/classic/views/monitor.php
	web/skins/classic/views/zone.php
2013-07-25 11:49:55 -04:00
nextime 33cbd89212 Migrate svn to git 2013-03-17 00:45:21 +01:00
Kfir Itzhak f27b424503 Much more progress!
1) Removed the V4L2_CAPTURE_FIELDS option.
2) V4L2 Interlacing control options added to the new per-monitor deinterlacing option.
3) Fixed the 32bit version of Linear.
4) Added Blend (50%) and Blend (25%).
5) Completed the grayscale version of the Four Field Motion Adaptive deinterlacing algorithm.
2012-07-13 20:11:16 +03:00
Kfir Itzhak 8f0ec42ba2 First work on adding built-in deinterlacing to ZM. 2012-07-13 20:11:16 +03:00
Kfir Itzhak 0932f50d80 1) Added the image size and format to the shared memory. This is useful for viewer applications relying on the shared memory.
2) Small changes to improve the response time of the DVR controls. Going through frames in a paused event is now much faster.
2012-03-22 08:30:57 +02:00
Kfir Itzhak eeaed7ccd3 Some small changes
1) Fixed wrong size calculation in Image::AssignDirect.
2) Improved libjpeg subpixel order selection.
3) Finished adding support in the simple Overlay function.
4) Completed Flip and Rotate 32bit RGB support.
5) Allow ZM to compile on 32bit with omit frame pointer disabled by defining _DEBUG
   To use one less register in the SSE algorithms.
6) Removed the counter variable in some loops to reduce loop overhead.
7) Modified crop query error handling.
8) Most of the shared data now declared as volatile.
9) Small improvements to the AlarmedPixels motion detection.
10) Changed the default blend percent from 7% to 12%.
11) Fixed an earlier bug created by me: motion detection checking the wrong pixels.
2012-02-01 07:33:20 +02:00
Kfir Itzhak b0bc227232 1) Made shared memory 16 byte aligned and identical size and layout for all platforms.
2) Fixed a bug in zmwatch.pl: Not freeing shared memory handles between iterations.
3) Modified default monitor options to simplify new monitor creation.
2012-02-01 07:33:20 +02:00
Kfir Itzhak 4a59761bcc Getting closer and closer everyday.
1) Fixed many errors to get it to compile
2) Fixed some small bugs
3) Small other changes
2012-02-01 07:33:20 +02:00