From cff48df04aaa4a7e1e477bfde651ff7dff8488b4 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 25 Oct 2024 14:08:29 -0400 Subject: [PATCH] Attempt to log microsecond timestamp when capture --- src/zm_monitor.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index 18c10892a..5d3544053 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -2595,7 +2595,9 @@ int Monitor::Capture() { packet->timestamp = std::chrono::system_clock::now(); shared_data->heartbeat_time = std::chrono::system_clock::to_time_t(packet->timestamp); int captureResult = camera->Capture(packet); - Debug(4, "Back from capture result=%d image count %d", captureResult, shared_data->image_count); + Debug(4, "Back from capture result=%d image count %d timestamp %" PRId64, captureResult, shared_data->image_count, + static_cast(std::chrono::duration_cast(packet->timestamp.time_since_epoch()).count()) + ); if (captureResult < 0) { // Unable to capture image @@ -2792,7 +2794,7 @@ bool Monitor::Decode() { Debug(1, "Ret from decode %d, zm_terminate %d", ret, zm_terminate); } } else { - Debug(1, "Not Decoding ? %s", Decoding_Strings[decoding].c_str()); + Debug(1, "Not Decoding frame %d? %s", packet->image_index, Decoding_Strings[decoding].c_str()); } // end if doing decoding } else { Debug(1, "No packet.size(%d) or packet->in_frame(%p). Not decoding", packet->packet->size, packet->in_frame.get());