From cf9fa78ca3bf2f425fc9153011e1a9b9a67beb91 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 29 Sep 2016 09:28:48 -0400 Subject: [PATCH 01/16] work on fixing event view --- src/zm_event.cpp | 7 +++ src/zm_storage.cpp | 1 - web/skins/classic/views/event.php | 46 +++++--------- web/skins/classic/views/frame.php | 34 +++++------ web/skins/classic/views/js/event.js | 95 ++++++++++++++++------------- web/views/image.php | 3 +- 6 files changed, 93 insertions(+), 93 deletions(-) diff --git a/src/zm_event.cpp b/src/zm_event.cpp index 7d47d18c7..ce8a3e20b 100644 --- a/src/zm_event.cpp +++ b/src/zm_event.cpp @@ -1243,7 +1243,14 @@ bool EventStream::sendFrame( int delta_us ) { static struct stat filestat; FILE *fdj = NULL; + if ( monitor->GetOptSaveJPEGs() & 1) { snprintf( filepath, sizeof(filepath), Event::capture_file_format, event_data->path, curr_frame_id ); + } else if ( monitor->GetOptSaveJPEGs() & 2 ) { + snprintf( filepath, sizeof(filepath), Event::analyse_file_format, event_data->path, curr_frame_id ); + } else { + Fatal("JPEGS not saved.zms is not capable of streaming jpegs from mp4 yet"); + return false; + } #if HAVE_LIBAVCODEC if ( type == STREAM_MPEG ) { diff --git a/src/zm_storage.cpp b/src/zm_storage.cpp index 3fca93479..8856208e3 100644 --- a/src/zm_storage.cpp +++ b/src/zm_storage.cpp @@ -76,7 +76,6 @@ Storage::Storage( unsigned int p_id ) { Debug(1,"No id passed to Storage constructor. Using default path %s instead", path ); strcpy(name, "Default"); } - } Storage::~Storage() { diff --git a/web/skins/classic/views/event.php b/web/skins/classic/views/event.php index 125127127..a7bb909b7 100644 --- a/web/skins/classic/views/event.php +++ b/web/skins/classic/views/event.php @@ -18,9 +18,8 @@ // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // -if ( !canView( 'Events' ) ) -{ - $view = "error"; +if ( !canView( 'Events' ) ) { + $view = 'error'; return; } @@ -117,8 +116,7 @@ xhtmlHeaders(__FILE__, translate('Event') );