Use pixfmt_desc instead of codec_t for internal compression
representation. This better alignes eg. YUV 10-bit 4:4:4 which has been
deduced as Y416 and eg. for DeckLink, R12L was chosen because it was
thought to be 16 bit, not 10.
This fixes:
uv -t testcard:codec=R10k -c libavcodec:encoder=libx265:yuv -d dummy:codec=decklink
being detected internally as Y416 and configured as R12L. Now it is
internally Y444_10 and output DeckLink would be configured to R10k.
Removed also params "lavd-use-10bit", "lavd-use-codec", which were
deprecated already some time and if can be replaced by
"decoder-use-codec" if needed.
Using short getopt options, a user may make a mistake in parameter name
resulting in passing a non-numeric string to stoi, which leads to crash
on not-nice uncaught exception crash.
+ remove try/catch from parse_port (no longer needed due the above)
AV_CODEC_FLAG_QSCALE is used to signalize that fixed qscale should be
used and some codecs like QSV ones require it to signalize that CQP is
used.
refer to GH-298
mjpeg encoders (FFmpeg embedded and QuickSync) don't respond to bitrate
setting, so set cqp by default. This gives user a guidance (via the log
msg, that cqp param may be set).
Setting the constant quality is quite per-codec specific so do not
provide 2 distinct options with similar semantic that are mutually
incompatible.
Instead, try to interpret the cqp parameter and set codecs' properties
individually.
Previously if UltraGrid crashed when probing a module, all remaining
modules would be left unqueried and missing.
This commit introduces a "safe mode", which tries to query each module
independently if querying everything at once fails.
added ug_gai_strerror
Default to gai_strerror, but use WSAGetLastError() in Windows. This
solves a problem with localized error messages but with a wrong
non-ASCII characters. Instead of gai_strerror, WSAGetLastError is
preferred according the Microsoft MSDN docs (thread safety). Also using
get_win_error() to ensure non-localized output (preferred).
This is perhaps not preferred - our users should be most likely able to
understand English. Moreover, localized message content may not be clear
if given eg. in a bug report.
CoInintialize[Ex] initialized with different mode (can occur eg. for
DeckLink because it uses COINIT_MULTITHREADED but Portaudio uses
COINIT_APARTMENTTHREADED).
Factor out common errors to hresult.h header. If not running on Windows,
use that subset. Vice versa use hresult_to_str directly because it can
catch more Windows-specific errors.