Revert "timestamp image before scaling. Fixes lack of scaling when TIMESTAMP_ON_CAPTURE"

This reverts commit 59e8bca3bc.
This commit is contained in:
Isaac Connor 2021-11-29 16:08:47 -05:00
parent 7f8195b248
commit fb0f184d1d
1 changed files with 2 additions and 7 deletions

View File

@ -377,10 +377,9 @@ bool MonitorStream::sendFrame(const char *filepath, const timeval &timestamp) {
return false; return false;
} // end bool MonitorStream::sendFrame(const char *filepath, struct timeval *timestamp) } // end bool MonitorStream::sendFrame(const char *filepath, struct timeval *timestamp)
bool MonitorStream::sendFrame(Image *image, SystemTimePoint timestamp) { bool MonitorStream::sendFrame(Image *image, const timeval &timestamp) {
if (!config.timestamp_on_capture) { if (!config.timestamp_on_capture)
monitor->TimestampImage(image, timestamp); monitor->TimestampImage(image, timestamp);
}
Image *send_image = prepareImage(image); Image *send_image = prepareImage(image);
fputs("--" BOUNDARY "\r\n", stdout); 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; 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); Debug(1, "write index: %d %d", monitor->shared_data->last_write_index, index);
Image *snap_image = monitor->image_buffer[index]; Image *snap_image = monitor->image_buffer[index];
if (!config.timestamp_on_capture) {
monitor->TimestampImage(snap_image,
SystemTimePoint(zm::chrono::duration_cast<Microseconds>(monitor->shared_timestamps[index])));
}
if (!config.timestamp_on_capture) { if (!config.timestamp_on_capture) {
monitor->TimestampImage(snap_image, monitor->shared_timestamps[index]); monitor->TimestampImage(snap_image, monitor->shared_timestamps[index]);