Commit Graph

100 Commits

Author SHA1 Message Date
Andrew Bauer c11a219b9f Merge pull request #1896 from connortechnology/dragndrop_monitor_sorting
Dragndrop monitor sorting
2017-06-12 20:49:51 -05:00
Isaac Connor 81c2216eb6 spaces/quotes 2017-06-08 13:37:26 -04:00
Isaac Connor b9736ad2f2 merge from sa the ajax file to apply the sorting. 2017-05-25 14:08:04 -04:00
Isaac Connor ac8b09e89c merge some trivial updates from storageareas 2017-05-16 14:14:07 -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
Matt N 33092e4022 Allow API authentication using the `auth` query parameter containing an auth. hash. (#1845)
* Allow API authentication using the `auth` query parameter containing an auth. hash.

Fixes #1827

The same auth. hash for zms is used here. This allows consumers to use the API without sending the password in the query string and not require forging logins via the login form.

* Move logger.php's global Debug function to Logger::Debug to avoid polluting globals

This avoids a conflict with CakePHP when logger.php gets included indrectly from API code.

* Protect action=login when ZM_ENABLE_CSRF_MAGIC is enabled
2017-05-15 21:51:48 -04:00
Joergen Edelbo fb5668c9ef Fix spelling of remSocketFile 2017-04-29 09:02:35 +02:00
Isaac Connor 9135da92ed fix typo fileFields => filterFields 2017-01-31 21:33:43 -05:00
Isaac Connor a8d1450adf Merge branch 'master' into fix_sql_injection 2017-01-27 17:18:34 -05:00
Isaac Connor ef71ae248c fix ramSocketFile to remSocketFile 2017-01-02 09:31:26 -05:00
Isaac Connor 8b726996f7 FAQ fixes, more text about zms problems in it, and adjust the socket_sendto error message to point to the FAQ entry that is relevant. 2016-12-19 21:36:39 -05:00
Isaac Connor fe3f3d91ce replace the old socket_sendto error message with something more useful so that people stop asking us how to fix it. 2016-12-16 09:12:27 -05:00
Isaac Connor ad157cf21c fix tabs 2016-12-14 14:56:54 -05:00
Isaac Connor 7c84e2417d remove extra ? 2016-12-08 15:53:38 -05:00
Isaac Connor c8009baf3f fix missing ; and test for integer string in limit 2016-12-08 15:46:42 -05:00
Isaac Connor 587fd16aa6 Add testing for limit, sortField and all the filters to ensure that they are valid. 2016-12-08 13:31:44 -05:00
Steve Gilvarry bdd0790106 Merge pull request #1522 from ZoneMinder/video_session
Move the session start down to where it is actually needed so that we…
2016-06-29 21:45:12 +10:00
Steve Gilvarry f804f7739d Adjust download file path to swap path to match the file generated. 2016-06-14 20:49:38 +10:00
Isaac Connor 1930b18100 Move the session start down to where it is actually needed so that we don't hold it open while generating videos 2016-06-07 10:38:37 -04:00
Isaac Connor 6084e2d00f improve error message. The unrecognized action error happens above, so this error should just mention permissions 2016-05-16 14:38:40 -04:00
Isaac Connor c0c543e029 change quotes to prevent php7 complaint 2016-04-09 11:25:56 -04:00
SteveGilvarry 5ff427d9e9 Removed Autotools Makefile.am
Conflicts:
	Makefile.am
	misc/Makefile.am
	src/Makefile.am
	web/includes/Makefile.am
	web/js/Makefile.am
	web/skins/classic/css/classic/views/Makefile.am
	web/skins/classic/css/flat/views/Makefile.am
	web/skins/classic/views/Makefile.am
	web/skins/classic/views/js/Makefile.am
2016-02-26 22:19:02 +11:00
Isaac Connor bd71c4999d test for Server in servers_by_Id as well as just having a value for ServerId. Fixup export as well. 2016-01-02 14:36:37 -05:00
Isaac Connor cf7e168872 Fix populating the server filter and then fix filtering by server. Also introduce robustness and consolel ogging when a filter doesn't exist 2016-01-01 17:10:37 -05:00
Isaac Connor ec7504f925 Translate ServerId to Server in Log record before sending back 2016-01-01 16:33:28 -05:00
Isaac Connor bfe4175fdf Add Server to filters and log results 2015-12-31 10:13:25 -05:00
Isaac Connor 6d34f8f424 Use Monitor class instead of old sql 2015-12-09 09:23:42 -05:00
Robin Daermann 078e18e6c5 Add label size to monitor options (frontend part)
This commit adds the option "Font size" to monitor options in the
timestamp panel. Includes translations of "Font size" for german
(de_de), french (fr_fr) and spanish (es_es). All other language files
contain the english text.
2015-08-10 15:35:19 +02:00
Isaac Connor e10fdaf344 reduce the wait to 2/10ths instead of a whole second 2015-06-05 11:49:05 -04:00
Andrew Bauer 3a94712db2 add translate function 2015-05-10 08:10:30 -05:00
Isaac Connor 01af58018b close the session before requiring the page contents to fix the concurrency issue that exists due to using the file-backed session. 2015-04-20 13:06:34 -04:00
Isaac Connor 3f64f9d919 Make the log export use ZM_PATH_SWAP and report the full path on error 2015-01-03 15:16:19 -05:00
Isaac Connor ebe35c2135 handle empty [file] to prevent logzilla 2014-11-13 09:17:54 -05:00
Isaac Connor bec58a6011 fixes WRT to db logging. I believe fixes issue #504 2014-09-26 14:43:58 -04:00
Isaac Connor 5e262f5a67 the var is remSockFile, not remSocketFile 2014-07-24 11:05:35 -04:00
Isaac Connor eb5f299512 increase max_socket_tries to 10 as #470 2014-07-11 10:51:24 -04:00
stevegilvarry 61cf067be0 Wrap sort order. Fixes #450 2014-06-29 22:09:59 +10:00
Kfir Itzhak 3cee6a133d Merge remote-tracking branch 'Sune1337/motion/FrameSkip'
Conflicts:
	db/zm_update-1.27.1.sql
	web/lang/nl_nl.php
2014-04-22 20:13:11 +03: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
Isaac Connor 003b8c9868 more removal of escaping 2013-12-17 14:38:08 -05:00
Isaac Connor 9f5b8bb03b Merge branch 'mysql2PDO' of github.com:ZoneMinder/ZoneMinder into mysql2PDO 2013-12-17 14:33:46 -05:00
Isaac Connor 20f1b460ee fix 2013-12-17 14:30:56 -05:00
Isaac Connor ceca805b48 more updates 2013-12-17 11:07:19 -05:00
Isaac Connor 1c028e5806 use parameter passing and remove extra escsaping 2013-12-16 16:52:30 -05:00
Isaac Connor 969918781f more updates, currently the log updates are not enough. Filtering does not work. 2013-11-13 10:11:16 -05:00
Isaac Connor 93560652f1 make sortorder be asc or desc, not something arbitrary which needs to be escaped
other fixes to use parameter passing to PDO instead of escaping them ourselves
2013-11-01 12:30:07 -04:00
Isaac Connor ab1314f250 clean out autogenerated files 2013-09-12 14:43:57 -04:00
Isaac Connor fcf7e5b188 Redo the patch that added the <0 test. Since it isn't an actual error there won't be an error message set so I've made it another case entirely. 2013-09-12 13:54:03 -04:00
Kyle Johnson c8ad6ae656 Fixes #107 for real this time. 2013-09-05 20:31:52 -04:00
Isaac Connor a468baf9eb cleanup 2013-05-10 13:55:45 -04:00