From fb0f184d1d6714ad049b6175d76f76ea94d0a4b5 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 29 Nov 2021 16:08:47 -0500 Subject: [PATCH] Revert "timestamp image before scaling. Fixes lack of scaling when TIMESTAMP_ON_CAPTURE" This reverts commit 59e8bca3bcd031e130fcc4174e2af295b300dbd5. --- src/zm_monitorstream.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/zm_monitorstream.cpp b/src/zm_monitorstream.cpp index 5d7309435..126ed708e 100644 --- a/src/zm_monitorstream.cpp +++ b/src/zm_monitorstream.cpp @@ -377,10 +377,9 @@ bool MonitorStream::sendFrame(const char *filepath, const timeval ×tamp) { return false; } // end bool MonitorStream::sendFrame(const char *filepath, struct timeval *timestamp) -bool MonitorStream::sendFrame(Image *image, SystemTimePoint timestamp) { - if (!config.timestamp_on_capture) { +bool MonitorStream::sendFrame(Image *image, const timeval ×tamp) { + if (!config.timestamp_on_capture) monitor->TimestampImage(image, timestamp); - } Image *send_image = prepareImage(image); fputs("--" BOUNDARY "\r\n", stdout); @@ -864,10 +863,6 @@ void MonitorStream::SingleImage(int scale) { int index = monitor->shared_data->last_write_index % monitor->image_buffer_count; Debug(1, "write index: %d %d", monitor->shared_data->last_write_index, index); Image *snap_image = monitor->image_buffer[index]; - if (!config.timestamp_on_capture) { - monitor->TimestampImage(snap_image, - SystemTimePoint(zm::chrono::duration_cast(monitor->shared_timestamps[index]))); - } if (!config.timestamp_on_capture) { monitor->TimestampImage(snap_image, monitor->shared_timestamps[index]);