This was unnecessary compat macro, since we always build with a compiler
that understands __attribute__ except of the AJA module in MSW, which
uses MSVC compiler
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.
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).
The << operator for stringstream casts the result to basic_ostream
which does not have the .str() method on some compilers. (See C++ defect
report 1023).
The previous implementation using atomics was not entirely correct,
since the following situation could happen:
1. Thread 1 detects a msg repeat
2. Thread 2 prints a message before thread 1 could print repeat notice
3. Thread 1 outputs "last msg repeated" for the msg from step 1
The stdout stream uses locking internaly anyway, so this should not have
any significant overhead. On the other hand this simplifies the code,
eliminates an allocation and fixes the leak on exit.
+ 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...
Added DEBUG_TIMER_START and DEBUG_TIMER_STOP to debug.h to for
performance measurements. If DEBUG is not defined, the code is not
compiled (doesn't impose any runtime overhead).