Added additional number validitiy check (to newly created parse_number
function). Mainly to cover inputs like '1something' where it should
not be parsed correctly as being 1.
PortAudio/ASIO drivers seem refuse initialization if
CoInitilizeEx initialized as COINIT_MULTITHREADED but they do for
COINIT_APARTMENTTHREADED.
Windows devices that could be affected by this change tested and seem
to work, namely:
- DeckLink
- DirectShow
- WASAPI
refer to GH-430
No longer enforce v4 socket for dot-decimal IPv4 mcast addresses unless
macOS used with mcast4 addr and interface set.
The default behavior now is to use dual-home v6 socket (with v4-mapped
addresses). macOS treates the v4 mcast addresses transparently as
v6 addresses (using v6 sockopts). But interface specification doesn't
currently seem to work in macOS, neither for native v6 mcast addresses
so enforce v4 sockets here.
- support for v4-mapped IPv6 sockets (handled with v4 sockopts in
Linux+Win and v6 sockopts in macOS)
- for mcast4, except of Windows, the interface must be identified by
local address, not device number
- support also setting the bind address directly for v4
- leave mcast4 group with correct ID (not INADDR_ANY)
The local address interface specification was actually the original one
but was removed by the commit 92e24dd02 (in 2012).
write the IPv6 link-local address with scope ID
This is achieved by using getnameinfo instead of inet_ntop.
Also rewritten in respect to the above change - simplified, no need to
get the port number separately (getnameinfo does that as well).
get_sockaddr_str is used also for create-port in the "dynamic" conference
mode, so this is perhaps better because the calls are symmetric.
Also it will allow eg. to add scope ID later to both create- and
delete-port in the single call.
get_replica_mod_name() is kept for the old/static use cases when
create-port is called explicitly or from an argument on command-line. Then
the address can be also the hostname (or a IP addresss in non-canonical
form) and it is up to the user to use the same host:addr representation.
The rationale is to separate the config.h-dependent stuff to a separate
file to eliminate the need to transitively include config.h.
+ fix the files that need config.h directly to include it
- do not print it in constructor/dtor - the participant may be moved
- copy the stored address in copy constructor
- use get_sockaddr_str + change its prototype - do not use thread_local
vars but user provided buffer
- also take (const sockaddr *) in the get_sockaddr_str and
get_sockaddr_addr_* functions (participants iterated by const iterator
returning const participant reference)
If running with Firejail, neither /tmp (used by tmpfile()) nor CWD may
be writable so try to create file in $TMPDIR (if defined, otherwise
there a default).
+ modified get_temp_file() opened file mode to be readable
The actual value (5,2,1)/5 didn't match peach fuzz (255,190,152)/255
but the rather closest color is Tomato (255,99,71)/255.
The T_DARKER_ORANGE is poorly defined but its value (3,1,0)/5 matches
approximately the X11 color Saddle Brown (139,69,19)/255.
Remove MJPG codec_t which was complementary to JPEG. The difference was
that JPEG was used for JPEG with restart intervals and MJPG without.
But slices are now enabled for MJPG (emits reset marker every 16 lines)
which actually gives the GPUJPEG decoder a space for efficient decoding.
Measured decoding performance using Ryzen 7900X and RTX 4080:
NewZealand (UYVY, 3840x2160, frame 2500):
encoded by\decoded by GPUJPEG lavd
-c libavcodec 7.1 ms 19 ms
-c gpujpeg 1.35 ms 14.3 ms
-t testcard:s=3840x2160:patt=text
encoded by\decoded by GPUJPEG lavd
-c libavcodec 2 ms 40 ms
-c gpujpeg 25 ms 40 ms
The advantage is simpler maintanance (no need to handle 2 codec
identifiers) and also performance because from the above, the GPUJPEG
decode should be faster even for JPEGs encoded by lavc.
Only situation where lavd performs better is a stream without restart
intervals at all (either `-c lavc:slices=1`, `-c gpujpeg:r=0` or from
a webcam), let say 28 ms for lavd and 40 for GPUJPEG. But it is not worth
keeping it for such a case - it will be better implemented using struct
pixfmt_desc to return rst count and picking the decoder according to
this if really needed.
It can be used in place of other network-related headers, not just for
htonl and family.
+ compat for fd_t and INVALID_SOCKET (that has been in config_*.h)
WORDS_BIGENDIAN is defiend by config.h
Use __BYTE_ORDER__ defined by GNU compilers (POSIX 2024 further defines
endian.h header but not yet in macOS /15/),
This is a hack to check whether given invalid_argument message belongs
to stoi/stod. It is usually used to catch non-numeric user input where
a number was expected.
Renamed pixel_bars to strips - the original name is not much descriptive -
pixels indicated 1 pixel width, which is not necessarily true, bars
(=vertical) isn't the default mode. Also not much distinctive (there
are other "bars").
Set also the default width to 10 - actually, the original width 1 is
better for troubleshooting compressions etc. But 10 is a visually more
appealing as a default and for the original use, the with can be set
explictily.