Commit Graph

357 Commits

Author SHA1 Message Date
Isaac Connor c8934dac7f Remove useless debug 2019-09-17 10:30:00 -04:00
Isaac Connor 505a041c88 Don't add a final db frame to the event, because there is no jpg for the frame. I don't know why this code was originally added. 2019-08-28 10:17:23 -04:00
Isaac Connor 396be10d6f Merge branch 'master' into zma_to_thread 2019-08-22 12:57:00 -04:00
Isaac Connor ee80b086af log the # of db entries being written before doing the writing so that we know the # being written 2019-06-10 14:13:21 -04:00
Isaac Connor 50436c5ea1 Correct debug line listing how many frames are being written to db 2019-06-10 13:59:01 -04:00
Isaac Connor ebc9a77c9d When saving jpegs, do a db write on the first frame. Fix test for writing frame info to db. Because we increment frames, it is essentially 1-based. So the test needs to be ==1 instead of ! 2019-06-10 12:57:57 -04:00
Isaac Connor a16d29740c Fix final frame of event having same id as the second last 2019-06-06 13:49:01 -04:00
Isaac Connor 8bbcf0f631 merge storageareas 2019-04-25 14:49:16 -04:00
Isaac Connor 077ad75516 Merge branch 'storageareas' into origin/zma_to_thread 2019-04-25 12:41:48 -04:00
Isaac Connor 96b7d30d7d Merge branch 'master' into zma_to_thread 2019-04-15 10:47:26 -04:00
Isaac Connor f719dd9acc always commit buffered db_frames when we have a new max score image or alarm cause image 2019-04-07 10:29:02 -04:00
Isaac Connor bc62493096 Increase sql buffer space because we are using path strings that are PATH_MAX size. 2019-04-04 12:55:35 -04:00
Isaac Connor f6d5038586 we only use event_file if we are writing out a jpg, so only generate the event_file string if we are writing out jpgs 2019-04-04 12:37:25 -04:00
Isaac Connor 271937f005 store the snapshot_file and alarm_file strings in the boject during construction so that we don't have to do it everytime we write out an image 2019-04-04 12:28:08 -04:00
Isaac Connor 279e0d8bcf Merge branch 'storageareas' into zma_to_thread 2019-02-22 11:39:58 -05:00
Isaac Connor c626b0fb8e if adding a closing frame, queue it with the rest of the frames so they get written all at once. Queue 20 frames instead of 10 2019-02-19 12:00:17 -05:00
Isaac Connor 28dafd5931 Merge branch 'storageareas' into zma_to_thread 2018-12-26 12:02:00 -05:00
Isaac Connor 19e4ef99bc add get_fps to Monitor and use it to adjust the # of frames to cache before writing to db 2018-12-16 16:22:25 -05:00
Isaac Connor 89c9a28614 Merge branch 'master' into storageareas 2018-12-14 12:25:06 -05:00
Isaac Connor ad4f131284 Must unlock before logging 2018-12-14 12:22:10 -05:00
Isaac Connor 0bfe1007c8 Merge branch 'master' into storageareas 2018-12-14 10:16:08 -05:00
Isaac Connor 1a05e777c0 fix path not being constructed properly for shallow event storage 2018-12-14 08:54:29 -05:00
Andrew Bauer 22460f580b
Merge pull request #2305 from pliablepixels/save-first-alarm
Save first alarm
2018-12-11 09:35:40 -06:00
Isaac Connor ab9081e1bf create a simple Frame class. Add a queue of Frames to the Event. When we get 10 of them write them out to the db. 2018-12-05 13:18:21 -05:00
Isaac Connor 87140ecdb5 white space and quiet warning 2018-11-17 10:39:42 -05:00
Pliable Pixels 01a57222d3 keep track if we have written alarmed frame incase savejpeg is off 2018-11-12 12:43:20 -05:00
Isaac Connor 5ab1126260 Merge branch 'storageareas' into zma_to_thread 2018-10-20 17:31:14 -04:00
Isaac Connor 89cd7ceaf8 Whitespace, extra parentheses, google code style 2018-09-23 16:47:06 -04:00
Isaac Connor 7abe4c40d5 Merge branch 'fix_2213' into storageareas 2018-09-19 20:02:27 -04:00
Isaac Connor c8b10b2e3b factor out some common code when creating the event directory and add a mkdir for creating the monitor directory. Should make event writing more robust when monitor dirs do not exist for some reason. 2018-09-19 19:50:26 -04:00
Isaac Connor 60b952ab86 Merge branch 'master' into storageareas 2018-09-13 16:20:36 -04:00
Isaac Connor cc417cf3e7 reverse order of tests to be more efficient 2018-09-11 13:19:33 -04:00
Isaac Connor 672b4affe1 Merge branch 'storageareas' into zma_to_thread 2018-08-31 19:05:22 -04:00
Isaac Connor 96a1ac14e8 Don't do all the event notes stuff if notes is empty 2018-08-17 16:02:40 -04:00
Isaac Connor b2c9c2961d spacing, code style, remove useless debug logging 2018-08-11 18:49:30 -04:00
Isaac Connor 979b31ffc3 Merge branch 'storageareas' into zma_to_thread 2018-08-11 10:08:30 -04:00
Isaac Connor a335eb66de remove some extra braces 2018-08-10 11:16:04 -04:00
Isaac Connor a0e67da51d Improve loging around writing out analysis frames 2018-08-02 15:40:33 -04:00
Isaac Connor e831c1563d pretty the code structure 2018-05-24 10:59:26 -04:00
Isaac Connor dc5ccd04ef Update thumbnail with high scoring image. 2018-05-22 11:31:03 -04:00
Isaac Connor 4454ca0072 Merge branch 'storageareas' into zma_to_thread 2018-05-20 10:39:14 -04:00
Isaac Connor d3c95ea144 fix merges 2018-05-12 19:44:20 -04:00
Isaac Connor 94377a4652 Merge branch 'storageareas' into zma_to_thread 2018-05-05 12:57:50 -04:00
Isaac Connor f6139d33ed Merge branch 'storageareas' into zma_to_thread 2018-05-05 12:25:11 -04:00
Isaac Connor 375af59657 use unsigned for formatting 2018-05-04 09:58:22 -04:00
Isaac Connor 6d5e46e91f whitspace 2018-05-03 13:54:05 -04:00
Isaac Connor d8b461806a fix StartTime in the future log 2018-05-02 11:37:54 -04:00
Isaac Connor 2845f891bc Merge branch 'storageareas' of github.com:ConnorTechnology/ZoneMinder into storageareas 2018-04-30 10:12:41 -04:00
Isaac Connor e55846e716 Log start_time when its > Now 2018-04-30 10:12:34 -04:00
Isaac Connor a4da624f4c break out of loops when zm-terminate is set 2018-04-27 13:20:38 -07:00
Andrew Bauer 35dcedb2ad
fix ftbs on el7
adds compiler support for PRIu64
2018-04-21 20:55:21 -05:00
Isaac Connor e56cf0b31c switch to uint64_t for event_id because long long can actually be 128 bit 2018-04-17 13:57:19 -04:00
Isaac Connor c7deb91319 Merge branch 'zma_to_thread' of github.com:ConnorTechnology/ZoneMinder into zma_to_thread 2018-04-14 14:58:25 -04:00
Isaac Connor cd3046abb3 Merge branch 'storageareas' into zma_to_thread 2018-04-14 11:03:08 -04:00
Isaac Connor f9f78e9aa3 Convert event_id to a 64bit unsigned int 2018-04-12 13:40:11 -07:00
Isaac Connor 2af539e916 Merge branch 'storageareas' of github.com:ConnorTechnology/ZoneMinder into storageareas 2018-04-12 11:39:30 -04:00
Isaac Connor 3b7992a39b converity scan fixes, and close the .mp4 after updating the db record. 2018-04-12 10:22:46 -04:00
Isaac Connor db0dac6eb2 Don't use static sql when multiple threads might be using it 2018-04-10 13:06:36 -07:00
Isaac Connor 9fde052d39 merge 2018-04-03 14:41:32 -07:00
Isaac Connor 2107e5b223 whitespace 2018-03-23 12:50:53 -04:00
Isaac Connor 03d3f5e665 Merge branch 'storageareas' into zma_to_thread 2018-03-03 13:28:01 -08:00
Isaac Connor ede13ac41b put all db access after finishing encoding, because we don
't care when they happen, and we need the encoding done.
2018-03-02 18:25:20 -08:00
Isaac Connor 1bc6e40fbc add mutex locking around mysql functions so that we can go multi-threaded 2018-03-01 19:20:52 -08:00
Isaac Connor c443168389 split out codec and encoder, allowing one to specify which encoder to use 2018-02-28 07:17:16 -08:00
Isaac Connor 84b42ef4d7 workarouns for omx 2018-02-22 11:43:04 -05:00
Isaac Connor 84b7e85259 Add a mutex around mysql operations 2018-02-15 15:54:13 -05:00
Isaac Connor a1392bf613 Merge branch 'storageareas' into zma_to_thread
Conflicts:
	src/zm_ffmpeg_camera.cpp
	src/zm_mpeg.cpp
	src/zmc.cpp
2018-02-02 14:23:26 -05:00
Isaac Connor c9bc5a8cd8 if given timestamp is in the future, reset it, it is likely invalid 2018-01-31 14:33:20 -05:00
Isaac Connor 218e34a079 Can only have 6 digitals, not 8 2018-01-30 11:23:09 -05:00
Isaac Connor 5b238f713d fix comma 2018-01-29 11:52:17 -05:00
Isaac Connor 9a15328894 Merge branch 'storageareas' into zma_to_thread
Conflicts:
	src/zm_event.cpp
2018-01-26 13:02:16 -05:00
Isaac Connor 5a3d0b944e Detect invalid delta_time and don't exit on failed mysql 2018-01-26 12:21:12 -05:00
Isaac Connor d87e691363 Merge branch 'zma_to_thread' of github.com:connortechnology/ZoneMinder into zma_to_thread 2018-01-16 17:53:48 -05:00
Isaac Connor 573c44839a Merge branch 'storageareas' into zma_to_thread 2018-01-16 17:39:37 -05:00
Isaac Connor a2211bf438 Merge branch 'storageareas' into zma_to_thread
Conflicts:
	src/zm_event.cpp
	src/zm_monitor.cpp
2018-01-16 13:36:57 -05:00
Isaac Connor 9284e26512 get rid of the snapshot setting. If we aren't storing all frames, then we should always store the snapshot. 2018-01-13 15:15:14 -05:00
Isaac Connor 0ea6fd9807 Merge branch 'storageareas' into zma_to_thread 2017-12-19 14:06:58 -05:00
Isaac Connor 2922a86d23 fixes to new Storage Schemes code 2017-12-19 11:01:03 -05:00
Isaac Connor e16852ee8e fix compile, impose minimum 10 second event length 2017-12-18 13:39:08 -05:00
Isaac Connor 8a8001f14a fix missingc_str() 2017-12-18 13:25:24 -05:00
Isaac Connor 705a98276f change StorageScheme to Scheme 2017-12-18 13:17:43 -05: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 bcdadc67bf Merge branch 'storageareas' into zma_to_thread 2017-12-12 15:29:19 -05:00
Isaac Connor 2df96bf6ee use the return value of stat 2017-12-12 12:51:54 -05:00
Isaac Connor 2f23f81ff3 store a snaphost when we don't storae anything else as opposed to when specifically storing a snpashot 2017-12-08 21:28:30 -05:00
Isaac Connor 12350407bf reconnet to db on error 2017-12-08 10:37:35 -05:00
Isaac Connor 128ae82331 add a debug for when in addpacket and no videostore 2017-12-01 10:33:10 -05:00
Isaac Connor 0865201e1e seems to work 2017-12-01 07:26:34 -05:00
Isaac Connor 84c901a01b don't write non-frames 2017-11-30 15:01:48 -05:00
Isaac Connor f2efc80f22 works? 2017-11-30 14:37:36 -05:00
Isaac Connor 9d91d4ce45 relocate code for readability 2017-11-27 15:43:16 -05:00
Isaac Connor 8e494ef431 Merge branch 'storageareas' into zma_to_thread 2017-11-23 08:40:49 -05:00
Isaac Connor 0eb2ae60f3 only try to write timecodes if the open was successful 2017-11-22 12:13:28 -08:00
Isaac Connor 3c55daaf36 Merge branch 'tesla' of github.com:connortechnology/ZoneMinder into tesla 2017-11-22 12:10:54 -08:00
Isaac Connor a1fe0c4de3 store the value of saveJpegs in the event 2017-11-21 23:56:22 -05:00
Isaac Connor 24a0d717c5 wip 2017-11-21 19:55:40 -05:00
Isaac Connor 7ed495c948 wip 2017-11-21 11:58:15 -05:00
Isaac Connor 74650ebc70 simplify Analysis 2017-11-20 11:48:56 -05:00
Isaac Connor ef5e296144 some fixes 2017-11-17 14:30:38 -05:00
Isaac Connor 159c0a7165 moer cppcheck fixes 2017-11-17 07:52:26 -05:00
Isaac Connor ecc68da0fd Merge branch 'zma_to_thread' into put_ffmpeg_into_event_wip 2017-11-14 02:39:58 -05:00
Isaac Connor 56bb2205d8 add mjpeg support 2017-11-14 01:59:15 -05:00
Isaac Connor 39b12057f2 add saveJPEGs to Events 2017-11-13 21:34:39 -05:00
Isaac Connor df0d37f4eb add saveJPEGS to the event record 2017-11-13 21:29:15 -05:00
Isaac Connor e325f5435c too much refactoring 2017-11-13 10:17:46 -05:00
Isaac Connor bb116cebd7 wip 2017-11-09 13:37:02 -08:00
APHW2 MFGENG d15d36f389 rework, compiles, won't open h264 2017-11-09 11:50:20 -08:00
Isaac Connor ef0379dd18 wip 2017-10-27 20:36:49 -07:00
Isaac Connor 0265a48a30 fix seg fault, fix pkt pts dts/duration. Stil wrong framerate 2017-10-26 10:12:56 -07:00
Isaac Connor 3be40bcc99 blah 2017-10-25 13:25:44 -07:00
Isaac Connor 0fbb473dd4 refactoring 2017-10-25 13:06:15 -07:00
Isaac Connor 2d3aa08303 include <0 in test on event frame timestamp 2017-10-23 09:56:30 -04:00
Isaac Connor b58c9d87c3 wip 2017-10-23 09:51:41 -04:00
Isaac Connor 666233af54 fix mving capture_file_format to staticCOnfig 2017-10-18 20:46:26 -04:00
Isaac Connor ad97023732 spacing 2017-10-12 08:54:43 -07:00
Isaac Connor 8ea335d45e whitespace 2017-10-10 15:08:24 -04:00
Isaac Connor 7b2163f824 add debug 2017-10-10 12:58:06 -04:00
Isaac Connor 463503b763 mostly comments, deal with negative timestamps 2017-10-09 14:58:07 -04:00
Isaac Connor 2163099d6b Merge branch 'storageareas' into zma_to_thread 2017-10-08 09:14:04 -04:00
Isaac Connor 219b7e0f36 output failing sql 2017-10-08 09:13:56 -04:00
Isaac Connor 224ca30c86 Merge branch 'storageareas' into zma_to_thread 2017-10-06 17:10:28 -04:00
Isaac Connor 869d2b4f16 make failure to symlink non-fatal. Someday we may want to use a file store that doesn't do symlinks 2017-09-25 16:22:41 -04:00
Isaac Connor da74f8d533 initial turn zma into a thread 2017-07-10 19:37:55 -04:00
Isaac Connor c241b6dddd Merge branch 'split_zmeventstream' into storageareas 2017-06-22 10:46:32 -04:00
Isaac Connor 226514e887 split EventStream into it's own files 2017-06-22 10:10:28 -04:00
Isaac Connor 76f63686cb Merge branch 'fix_event_viewing' into storageareas 2017-06-22 09:24:31 -04:00
Isaac Connor 5e75588bfb Fix event viewing. Output a frame immediately on zoom in/out. Fix recursive loop on play/pause 2017-06-21 17:14:02 -04:00
Isaac Connor f0d80ddfd4 fix runstate merge 2017-06-13 21:18:09 -04:00
Isaac Connor 7a67a5e475 fix merge 2017-06-13 21:15:58 -04:00
Isaac Connor 085d239a6e Merge branch 'master' into storageareas 2017-06-13 18:02:28 -04:00
Andrew Bauer bf04a68085 Merge pull request #1752 from connortechnology/filter_by_runstate
rough in the ability to filter on RunState
2017-06-12 20:54:17 -05:00
Andrew Bauer bacf65ae9a Migrate values from Options -> Paths to zm.conf (#1908)
* initial commit to migrate contents of Options->Paths to zm.conf

* remove paths items from configdata.pm

* remove paths tab from options

* update deb packaging scripts with new cmake vars

* remove extraneous file

* save custom paths variables to config file before dB is freshened

* don't check configs if the dB version is >= 1.31.0
2017-06-12 21:39:37 -04:00
Isaac Connor 01717a5c14 Merge branch 'master' into filter_by_runstate 2017-06-06 20:34:47 -04:00
Isaac Connor 9534c725d6 Merge branch 'master' into storageareas 2017-06-05 09:21:37 -04:00
Isaac Connor 187bec40ec Fix #1906 2017-06-05 09:05:17 -04:00
Isaac Connor a515041e14 Merge branch 'master' into storageareas 2017-05-23 15:17:46 -04:00
Isaac Connor 03495e8c23 fix 2017-05-20 09:54:03 -04:00
Isaac Connor 1ab8530aed use enum values to make code more readable. Better error message on event insertion failure 2017-05-20 08:34:46 -04:00
Isaac Connor 7ecbcd8f12 code documentation 2017-05-20 08:26:55 -04:00
Isaac Connor 7caeee6bf8 Merge branch 'master' into storageareas 2017-05-19 15:09:44 -04:00
Isaac Connor e7ca892efd merge more differences from SA 2017-05-19 15:07:41 -04:00
Isaac Connor 91138ba8a1 Merge branch 'master' into storageareas 2017-05-19 14:53:08 -04:00
Isaac Connor 44e5b6f829 remove redundant code 2017-05-19 14:52:45 -04:00
Isaac Connor 9e54efdfcf Merge branch 'master' into storageareas 2017-05-19 14:49:25 -04:00
Isaac Connor 7c889add76 cleanup sql to load event data. Don't need MonitorName 2017-05-19 14:43:49 -04:00
Isaac Connor 764c76f98a add loading the video filename when loading event data 2017-05-19 14:29:08 -04:00
Isaac Connor e79d2c5a00 Merge branch 'master' into storageareas 2017-05-19 14:26:28 -04:00
Isaac Connor 7dccbac78d clenaup 2017-05-19 14:25:44 -04:00
Isaac Connor ccc9f6fdf6 remove redundant code 2017-05-19 14:24:49 -04:00
Isaac Connor 1e4792e13d Merge branch 'master' into storageareas 2017-05-19 13:36:23 -04:00