Corrected various spelling mistakes in comments, documentation, and
variable names across the project. Changes include:
- Documentation files (CONTRIBUTING.md, README.md, etc.)
- Source code comments in C/C++ files
- Function parameter names and descriptions
No functional changes were made.
The rationale is to separate the config.h-dependent stuff to a separate
file to eliminate the need to transitively include config.h.
+ fix the files that need config.h directly to include it
- use 'h' suffix when len printed in hexa
- for missing bytes at the end (not aligned to 16 B) print 2 spaces
instead of 1, because it stands for 2 nibbles. Otherwise the ASCII
representation would be moved left (the muber of chars didn't match).
Where the PACKAGE_BUGREPORT is the only used item from config.h,
use bug_msg(), which can be then removed.
Improved bug_msg() to allow printf-like fomat + arguments.
The printout includes pointer, which was at the time of writting supposed
to be 32, in which case the line length was:
2 /* 0x */ + 8 /* ptr */ + 1 /* : */ + 3 * 16 /* " XX" */ + 16 /* char repr */ + 5 /* additiona separators */ + 1 /* NL */ = 81
(separators - 2 betweeh group of hexa and char repre, 3 between hexa and char represenatation)
With 64 bit pinters, it can be at most 89 bytes. To keep the old length,
removed one space between every pair of hexadecimal byte representation -
it is still good legible, compatibile with xxd, still keeping the 80
long line..
do not prefix messages not starting on new line by timestamps, eg.:
$ uv -s embedded -t testcard -d file:n=/dev/null -V
[1698853041.393] [lavc] Stream #0:0[1698853041.393] : Video: rawvideo, 1 reference frame (UYVY / 0x59565955), uyvy422, 1920x1080 (0x0), q=2-31, 829440 kb/s[1698853041.393] , [1698853041.393] 25 tbn[1698853041.393]
Flush the output only on NL and before it store it in internal
thread-local buffer.
Locking was removed as static data are now thread-local.
this improves 808b3de3
Not critical at all - the comma-separated option could not have been
used so far (it was intended to separate modules, but this funcion is
used in only one so far).
use static, not thread_local storage
This has an implications that the message is indeed printed once, even
though is called from 2 threads (this can happen eg. when printed once
during normal operation and then during module deletion, that may happen
in a different thread).
The returned value was actually incorrect (counting also formatting
escape sequences and terminating nul byte).
Since the return value should not be important for the caller, it is
perhaps better not to complicate and don't return anything.
fixes warnings with Xcode 14.3 as in previous commit
+ allocate +1 in Log_output buffer - snprintf(MULL, 0...) returns number
of bytes without terminating '\0'. std::string storage isn't guaranteed
to be NULL-terminated (std::string("").at(0) throws an exception). The
buffer is somewhere preallocated 256 which prevents problem but it's
better not to rely upon it.
+ comment out some unused function in LDGM that also triggered the
warning but looked a bit suspicious so it was not clear how to fix
Needs adding log_msg_once variable arguments (printf-like).
+ print always error in deinterlace - if user explicitly wants
deinterlace PP, maybe we should notify loudly
On one-shot second and further calls of one-shot message, no output was
producet, yet empty buffer was submitted to Log_output resulting in
false repeate messages:
Last message repeated <n> times
To simplify the stuff, C++ API was removed and in the C API the Logger
is taken only if actual message will be output. If someone is willing to
use the C++ API, it can be later readded (not really needed now, only
simple message are presented).
Previously colored output using the inline TERM_* macros from color_out.h was
done only using the color_printf() function. Since there are now places
where they are used with log_msg(), we need to prune ansi codes here
too.
Removed indirect dependency on rang.hpp through color_out.h. Now only
remaining dependencies on rang.hpp are direct.
+ fixed escape sequence for foreground magenta
+ change first parameter of serialize callback to (const void *)
+ renamed "lavd-uncompressed" to "lavd-avframe" - uncompressed is vague
since there are multiple forms of uncompressed - avframe, ultragrid
pixfmt...