Request: error messages and switching off logging
farindk opened this issue · 5 comments
I have just added a kvazaar encoder plugin to libheif as an alternative HEIC encoder:
strukturag/libheif@2fb1063
I came across two things that I could not find:
- When an API function returns an error, is there any error message or further information that I could pass on?
- Could you add a config parameter to switch off the logging to stdout through the API?
When an API function returns an error, is there any error message or further information that I could pass on?
No, not really. Since error handling in general is not easy in C, we do the bare minimum.
Could you add a config parameter to switch off the logging to stdout through the API?
Kvazaar shouldn't output anything to stdout (except help or version message), so I assume you mean stderr? Even then do you mean error messages from the config parsing, since the actual logging by the encoder is performed by the CLI and not the API version of Kvazaar that you are using. Nevertheless, there is no such option, but if you want to create it yourself we would be happy to accept a pull request for such feature.
The following is printed to stderr
in api->encoder_open()
:
Compiled: INTEL, flags: MMX SSE SSE2
Detected: INTEL, flags: MMX SSE SSE2 SSE3 SSSE3 SSE41 SSE42 AVX AVX2
Available: avx(11) avx2(54) sse2(2) sse41(4)
In use: avx(1) avx2(54)
--owf=auto value set to 2.
--threads=auto value set to 8.
Printing is done here:
kvazaar/src/strategyselector.c
Lines 538 to 591 in 37a0404
Sorry, yes you are correct, this was already brought up in #292 and then answer is pretty much the same still.