diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index a550b4370..44324adf5 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -779,7 +779,14 @@ unsigned int Monitor::GetLastWriteIndex() const { return( shared_data->last_write_index!=(unsigned int)image_buffer_count?shared_data->last_write_index:-1 ); } -unsigned int Monitor::GetLastEvent() const { +uint32_t Monitor::GetLastEventId() const { + Debug(2, "mem_ptr(%x), State(%d) last_read_index(%d) last_read_time(%d) last_event(%d)", + mem_ptr, + shared_data->state, + shared_data->last_read_index, + shared_data->last_read_time, + shared_data->last_event + ); return( shared_data->last_event ); } diff --git a/src/zm_monitor.h b/src/zm_monitor.h index 780c10b7c..0de71c424 100644 --- a/src/zm_monitor.h +++ b/src/zm_monitor.h @@ -432,7 +432,6 @@ public: int GetOptSaveJPEGs() const { return( savejpegspref ); } VideoWriter GetOptVideoWriter() const { return( videowriter ); } const std::vector* GetOptEncoderParams() const { return( &encoderparamsvec ); } - uint32_t GetLastEventId() const { return shared_data->last_event; } uint32_t GetVideoWriterEventId() const { return video_store_data->current_event; } void SetVideoWriterEventId( uint32_t p_event_id ) { video_store_data->current_event = p_event_id; } @@ -448,7 +447,7 @@ public: int GetAlarmCaptureDelay() const { return( alarm_capture_delay ); } unsigned int GetLastReadIndex() const; unsigned int GetLastWriteIndex() const; - unsigned int GetLastEvent() const; + uint32_t GetLastEventId() const; double GetFPS() const; void ForceAlarmOn( int force_score, const char *force_case, const char *force_text="" ); void ForceAlarmOff(); diff --git a/src/zmu.cpp b/src/zmu.cpp index 46ba35ac6..4c94d0b51 100644 --- a/src/zmu.cpp +++ b/src/zmu.cpp @@ -514,10 +514,10 @@ int main( int argc, char *argv[] ) { } if ( function & ZMU_EVENT ) { if ( verbose ) - printf( "Last event id: %d\n", monitor->GetLastEvent() ); + printf( "Last event id: %d\n", monitor->GetLastEventId() ); else { if ( have_output ) printf( "%c", separator ); - printf( "%d", monitor->GetLastEvent() ); + printf( "%d", monitor->GetLastEventId() ); have_output = true; } } @@ -712,7 +712,7 @@ int main( int argc, char *argv[] ) { tv.tv_sec, tv.tv_usec/10000, monitor->GetLastReadIndex(), monitor->GetLastWriteIndex(), - monitor->GetLastEvent(), + monitor->GetLastEventId(), monitor->GetFPS() ); delete monitor;