Skip to content

Commit e15adb9

Browse files
committed
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).
1 parent 93da71e commit e15adb9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/video_compress.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
#include "messaging.h"
5252
#include "module.h"
5353
#include "tv.h"
54+
#include "utils/misc.h" // for format_number_with_delim
5455
#include "utils/synchronized_queue.h"
5556
#include "utils/thread.h"
5657
#include "utils/vf_split.h"
@@ -598,8 +599,10 @@ shared_ptr<video_frame> compress_pop(struct compress_state *proxy)
598599

599600
auto f = proxy->queue.pop();
600601
if (f) {
601-
MSG(DEBUG, "Compressed frame size: %8u; duration: %7.3f ms\n",
602-
vf_get_data_len(f.get()),
602+
char sz_str[FORMAT_NUM_MAX_SZ];
603+
MSG(DEBUG, "Compressed frame size: %s B; duration: %7.3f ms\n",
604+
format_number_with_delim(vf_get_data_len(f.get()), sz_str,
605+
sizeof sz_str),
603606
(f->compress_end - f->compress_start) / MS_IN_NS_DBL);
604607
}
605608
return f;

0 commit comments

Comments
 (0)