This commit is contained in:
Isaac Connor 2017-11-28 11:55:47 -05:00
parent d73f9e8a73
commit 344539f5dc
3 changed files with 12 additions and 6 deletions

View File

@ -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 );
}

View File

@ -432,7 +432,6 @@ public:
int GetOptSaveJPEGs() const { return( savejpegspref ); }
VideoWriter GetOptVideoWriter() const { return( videowriter ); }
const std::vector<EncoderParameter_t>* 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();

View File

@ -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;