From e15adb9d925d22a1f39b7aab0bc7c1918ce6e81f Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Mon, 22 Sep 2025 08:05:48 +0200 Subject: [PATCH] video_compress: for frame debug size, use delim If the frame sizes become big, let say >1 MB, it is really hard to see the order of magnitude visually. This slightly hardens parsing the dumped frame sizes in batch but it shouldn't a big problem (tr(1) or sed(1) will remove them). --- src/video_compress.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/video_compress.cpp b/src/video_compress.cpp index fb1a687c0..70d1d42b0 100644 --- a/src/video_compress.cpp +++ b/src/video_compress.cpp @@ -51,6 +51,7 @@ #include "messaging.h" #include "module.h" #include "tv.h" +#include "utils/misc.h" // for format_number_with_delim #include "utils/synchronized_queue.h" #include "utils/thread.h" #include "utils/vf_split.h" @@ -598,8 +599,10 @@ shared_ptr compress_pop(struct compress_state *proxy) auto f = proxy->queue.pop(); if (f) { - MSG(DEBUG, "Compressed frame size: %8u; duration: %7.3f ms\n", - vf_get_data_len(f.get()), + char sz_str[FORMAT_NUM_MAX_SZ]; + MSG(DEBUG, "Compressed frame size: %s B; duration: %7.3f ms\n", + format_number_with_delim(vf_get_data_len(f.get()), sz_str, + sizeof sz_str), (f->compress_end - f->compress_start) / MS_IN_NS_DBL); } return f;