Doesn't prevent compilation currently because where the headers were
included, the required headers were included as well but was marked as
error by a standalone analyzator, like clangd.
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
Do not prepend /tmp/ (or generally a temporary dir prefix) to given name
resulting in /tmp/<name.sdp>. This is not an expected behavior and it
also doesn't play well with absolute paths.
Until now, `uv -s testcard --protocol sdp` didn't generate the SDP file
(nor output) because the all SDP state initialization was handled in
video_rxtx/h264_sdp.
For audio codecs, we respect its native capitalization of letters, eg.
AAC, speex. So do it also for Opus. This should not affect existing
applications since the Opus name is parsed case-insensitively.
Only exception is SDP (rtpmap) where is usually used lower-case (at
least in rfc7587).
using bound checking variants
Remained last one instance in utils/text.c, that does the checking by
itself and vsnprintf compat using vsprintf, that is not used, anyways.
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
- simplify the flow (exit early)
- allocate string copy on stack (strdupa)
- use logger for errors
- fixed usage
The usage syntax (`--video-progocol rtsp[=port:<num>]`) looks a bit
exotic, however (isn't entirely consistent with the rest of UG).
Some of devices cannot be used in either input or output (or none)
direction. Those are usually hidden but are shown if in verbose mode.
If so, use different color to highlight that those cannot be used.
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.
There doesn't seem to be any significant advantage of using the
readerwriterqueue so replace it with a generic UG one.
If needed, this change can be easily reverted (the API is similar).
- accept bg/fg options without need to alter (default) text
- print error on wrong option
- use #CC00CC (pink) - although looking less decent, the subsampling
artifacts should be more observalble with this color