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.
Since the conversion policy is now "dsc" (depth-subs-cs) by default,
it may trigger more costly conversions so print a hint to enforce the
old behavior if not managing to keep the decode window and pixfmt change
takes at least 1/4 of overal de/compress time.
Use compare_pixfmt for codec sorting resulting in different selection,
eg:
uv -t testcard:codec=R10k -c libavcodec:encoder=libx265:yuv -d dummy:codec=decklink
Used to end with v210 (compressed properties was 10-bit YUV 4:4:4;
internal codec detected as Y416). Now it ends with R12L - note that this
is still not optimal as it should be rather R10k. For GL it even ends up
with RG48.
The previous behavior can be triggered by `--conv-policy cds`.
refer to GH-295