Commit Graph

184 Commits

Author SHA1 Message Date
Isaac Connor 12d46e2377 change event_id in status_msg to 64bit when unpacking 2018-04-18 09:52:57 -04:00
Isaac Connor 0b0fbae1c5 Add output of paused image when paused 2018-04-12 18:43:57 -04:00
Isaac Connor 22f86da372 Have to use the .sock file instead of w.lock 2018-04-11 10:38:13 -04:00
Isaac Connor 002f22f685 generateAuthHash is already called earlier in index.php, so it will always be up to date. Just include it in the response. 2018-02-14 13:15:22 -05:00
Isaac Connor 2774fded57 add debugging and put NavBarHTML back in message 2018-02-14 11:57:45 -05:00
Isaac Connor 4df8cdc685 add auth_hash updating to the navbar reload. 2018-02-14 10:44:48 -05:00
Isaac Connor a610d564d1 tweak timeouts 2018-01-31 15:51:12 -05:00
Isaac Connor a76fcb331c Remove debugging. Treat can't get semaphore as a non-error 2018-01-29 08:25:46 -08:00
Isaac Connor b1b8b42f2b Fix getting stream status updates when # of files open is > 1024. 2018-01-29 07:21:31 -08:00
Isaac Connor 2dcb0d183f Merge branch 'storageareas' of github.com:connortechnology/ZoneMinder into tesla 2018-01-28 18:07:33 -08:00
Isaac Connor 51d5fd38aa scan the board for the names of the camera inputs 2018-01-28 18:06:13 -08:00
Isaac Connor 0d734a880c add hack to ensure that next and previous operate on time 2018-01-28 17:30:49 -05:00
Isaac Connor 5d4fde88d9 Merge branch 'storageareas' of github.com:connortechnology/ZoneMinder into tesla 2018-01-27 12:17:13 -08:00
Isaac Connor bc6d8623a6 add a semaphore around the socket creation and retention. I think concurrent processes are messing with the sockets. 2018-01-27 15:03:22 -05:00
Isaac Connor 320f5c2083 Turn off error reporting in output 2018-01-25 09:13:44 -08:00
Isaac 1b23f7b564 turn off debug 2018-01-23 17:34:49 +01:00
Isaac Connor 0f3cf33565 Move unparse_url from add_monitors to functions to make it generally available 2018-01-19 08:16:52 -08:00
Isaac Connor d312482a2b add StorageScheme to Storage and Events. Deprecate ZM_USE_DEEP_STORAGE 2017-12-18 12:52:26 -05:00
Isaac Connor c509b6fbf4 fix a quotes problem 2017-12-12 15:46:50 -05:00
digital-gnome 7930e1881f Fix quotes 2017-12-07 11:18:10 -05:00
Isaac Connor bd73e7c2e2 Merge branch 'robots' into storageareas 2017-12-07 10:31:25 -05:00
digital-gnome f8d3c07586 Add h264 event view functionality and new feature alarmCues (#2012)
* Fix nearEventsQuery

Removed dbEscape from getNearEvents previous event because it only returns 0.  Now matches next.  Changed getEventDefaultVideoPath function to return a web path rather than the absolute path based on ic0ns branch.  Also added start times to allow for videoJS replaymode.

* Unescape filters

Filters need to be unescaped

* Add initial values to page load

* Add replay modes to videojs

* rough in figuring out a frame in between bulk frames

* Add alarmCues

Add a graphical indication of where alarm frames happened in an event.  Similar to what zmNinja shows.

* Add remaining buttons to videojs

Functionality for all buttons on videojs streams.  FF/RW buttons show as active when they are active.

* Whitespace and fix Bulkframe calcs

* Fix zms events trying to generate with mp4 code

ZMS events would attempt to generate frames as though they were an mp4/passthrough type because the full eventpath wasn't passed

* ZMS scrub bar

Move zms scrub bar to bottom of image feed.  Make it simpler and more like videojs style.

* Wrap event feeds properly

* Fix dvrControls on watch view

* Add scaleToFit

Add a scaleToFit option to event view

* Add navigation for videoJS streams

Disables nav buttons at beginning and end of events.  Handles switching from zms to videojs.  If zms crashes changes next event function to reload page instead of ajax.

* Add scaleToFit to watch and frame view

Adds scaleToFit to watch view.  Since frame view uses the watch cookie this required changes to frame view

* Add transition to zoom

* Change stills view to match stream

Move stills slider bar to match scrub bar on streams.  Allow it to resize, make it larger.  Add alarmcues.

* Add Stills for every event

Add stills for every event.  Match size to stream size

* Progressbox transitions
2017-12-04 21:26:59 -05:00
digital-gnome 3e7c573da5 Add download video option to events view
Creates a new popup window for downloading event video files with no directory structure in the archive
2017-12-03 14:42:07 -05:00
digital-gnome 0a995aea78 Add navbar refresh to all pages that use it 2017-11-30 16:33:46 -05:00
Isaac Connor cb70a3627f Fixes to montagereview and only load event data when in History mode 2017-11-28 14:50:21 -05:00
Isaac Connor b565125df9 montage layout improvements 2017-11-22 12:33:34 -05:00
digital-gnome 64346a031d alarmCues to status.php
Switched alarm cues from API to ajax/status.php.  Less overhead due to only requesting the information it needs and avoids a weird problem with authentication after sitting logged in for hours.
2017-11-16 21:03:03 -05:00
Isaac Connor 8432ab5938 change quotes, and limit the # of results to 2 when getting next and previous frames. 2 is because one of them could be the currently selected Event, 2017-11-03 15:09:19 -04:00
Isaac Connor 866c875312 Merge branch 'storageareas' into tesla 2017-11-01 12:01:51 -07:00
Isaac Connor 9473fbecd8 more debug 2017-10-31 13:32:42 -07:00
Isaac Connor c16e101120 rough in add monitors import wizard 2017-10-27 20:52:08 -07:00
Isaac Connor eb48759ff8 wip 2017-10-27 13:37:51 -07:00
digital-gnome 1eb2edd95c Converge initial eventData with ajax
The initial eventData object on page load didn't have most of the information that the ajax call gave it.
2017-10-21 22:14:46 -04:00
digital-gnome e23b4a0d5d Fix event path 2017-10-07 12:42:16 -04:00
Isaac Connor 8f8d66189c Google code style 2017-10-04 10:48:24 -04:00
digital-gnome febf15812f Add start times to getNearEvents 2017-09-29 21:44:57 -04:00
digital-gnome 7dd95f6afe getNearEvents prev always 0
getNearEvents always returns 0 for prev event.  sortColumn is escaped with passes it with single quotes and breaks the query.  I changed it to match next event by removing the escape.
2017-09-25 22:14:36 -04:00
Isaac Connor 148d7066f9 Merge branch 'master' into storageareas 2017-07-11 16:15:02 -04:00
Isaac Connor 50adec45c5 Strip non 7-bit ascii chars from log message 2017-07-06 11:45:17 -04:00
Isaac Connor c2a042c0e7 replace with $)REQUEST so that logs can be query using a GET. Strip non-asci8bit chars from log message 2017-07-06 11:42:04 -04:00
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 371b86300a Merge branch 'master' into storageareas 2017-06-08 14:23:40 -04:00
Isaac Connor 81c2216eb6 spaces/quotes 2017-06-08 13:37:26 -04:00
Isaac Connor 36ae355a2c spacing, braces 2017-06-05 15:21:07 -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 f4224bb88e Merge branch 'master' into storageareas 2017-05-17 17:47:39 -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
Isaac Connor fd90de5952 if no AuthHashGEneratedAt then generate one instead of outputting an error 2017-05-05 16:47:50 -04:00