Commit Graph

7684 Commits

Author SHA1 Message Date
Martin Pulec
924453e5b0 use get_stat_color also for FPS
select the color automatically (lime for +- 2-5%, brown for >5% diff)

This simplifies the code by sharing the logic in common; also exceeding
FPS is now colored (until this just lower than nominal was colored).
2025-02-11 14:19:11 +01:00
Martin Pulec
56d6435050 get_splashscreen: set alpha to 1
set the full opacity (it is RGBA and it has been 0 so far)
2025-02-11 13:04:09 +01:00
Martin Pulec
6b09b5e9fe get_splashscreeen: add assertions 2025-02-11 13:03:59 +01:00
Martin Pulec
a657bc75df audio dec: color if received samples don't match
If the actual number of decoded samples doesn't match the expected number
(from nominal sampling rate), use colors to catch user attention. This is
similar how it is already done for video capture/display.
2025-02-11 12:59:03 +01:00
Martin Pulec
b44af19782 audio sender: use colors for sample cnt summary 2025-02-11 12:59:03 +01:00
Martin Pulec
bc47cd392c gl: print GL version in help 2025-02-11 12:59:03 +01:00
Martin Pulec
7573bf24b1 video_display FPS indicator color FPS as a warning
In the display generic FPS indicator, use colors (arctic lime/saddle
brown) if the actual FPS is lagging behind the nominal FPS. Similarly
(and copied from) how it is already done for video capture.
2025-02-07 12:16:52 +01:00
Martin Pulec
948d559c41 video_display.c: IWYU 2025-02-07 12:16:42 +01:00
Martin Pulec
630797beab sdl2: print texture types in debug 2025-02-03 16:57:11 +01:00
Martin Pulec
1c56e6564e vdisp/sdl2: fixed I420 (IYUV)
The pitch for planar pixel formats is the pitch of the first plane,
most likely =width. This yield wrong data_len for I420 if just multiplied
by the height.

this fixes the change made by 107e3e30 (2024-09-02)
2025-02-03 10:52:02 +01:00
Martin Pulec
a15c14f2a4 sdl2: include + SDL_CHECK add action
include inttypes.h

SDL_CHECK can now have an optional action (using ellipsis) + handle
return value of SDL_LockTesxture using that (currently fails on Arch
Linux with sdl2-compat 2.30.50-1 and sdl3 3.2.0-1 and YCbCr textures).
2025-01-29 15:58:46 +01:00
Martin Pulec
5812cf1608 remove unneeded HAVE_SDL2 macro
include <SDL_header> instead of <SDL2/SDL_heaaer>
2025-01-24 14:37:36 +01:00
Martin Pulec
573fe22665 GPUJPEG: adjust verbosity
v0.26 is slightly more chatty even in GPUJPEG_LL_STATUS mode (new between
INFO and VERBOSE) while the status/verbose mode maps more to debug than
UG verbose so adjust the modes as such.
2025-01-20 16:25:18 +01:00
Martin Pulec
c55fdd8fad hwaccel_vdpau.h: add config.h include guard
allows build outside of UG/when config.h not generated

Also helps when building tools/convert even when config.h is generated,
VDPAU enabled but FFmpeg headers in non-standard path (that is obtained
by pkgconf for UG but not for the tool).
2025-01-08 14:27:06 +01:00
Martin Pulec
8bf32c3883 CID 470571 fix
fixed a Coverity bug
2025-01-07 16:24:16 +01:00
Martin Pulec
16d41e8a5d aplay/mixer: restricting senders - check err
also workarounds for CIDs 47049{6,7}
2024-12-04 16:17:03 +01:00
Martin Pulec
e62773d71d get_iface_local_addr4: handle err from get_ifindex
- return on wrong iface spec (similarly as IPv6 does)
- return on "help"
2024-12-04 16:05:49 +01:00
Martin Pulec
e88ad545bc net_udp: enforce v4 sock only for mac+mcast+iface
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.
2024-12-04 15:21:00 +01:00
Martin Pulec
d1023bdccb net_udp: multicast: multiple improvements
- 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).
2024-12-04 15:20:56 +01:00
Martin Pulec
65e8bf318f net_udp: set IPV6_MULTICAST_IF only of not default
macOS fails on it otherwise (at least 15.0), although it shouldn't
according to man ip6(4) (that is, however, presumably inherited from BSD,
because FreeBSD has the same).
2024-12-04 14:07:20 +01:00
Martin Pulec
b99c8c1300 utils/net: suppress alignment warning 2024-12-04 14:06:52 +01:00
Martin Pulec
4462a15fca net_udp: fix mcast TTL not set also for IPv6
This fixes the commit 43d15680 (2021-03-29) that added this for both
IPv4 and IPv6 but for IPv6 the condition was incorrectly aligned to
setsockopt fail, not ttl==-1.

Dropped IPv4/IPv6 specification - since we may/will use v4-mapped IPv6
sockets, the word "IPv6" might be confusing if use is using IPv4 mcast
addr.
2024-12-04 14:06:48 +01:00
Martin Pulec
3e04432ef5 bmd_commmon small improvement
if property query fails, print its name (not only numeric ID)
2024-11-29 12:36:28 +01:00
Martin Pulec
a41b2c5a51 Revert "vdisp,vcap/decklink: do not fail if insuff drv ver"
Since the following error, the hard fail is again desirable. It, however
doesn't fail if the driver is usable (not so old, using same ABI).

This reverts commit cac114d6e5.
2024-11-29 12:36:27 +01:00
Martin Pulec
9a0594dd4b blackmagic_api_version_check more inteligent
return false only if using the incompatible ABI

in other cases just issue a warning
2024-11-29 12:36:27 +01:00
Martin Pulec
ff2c259264 bmd_common: add all configuration items
the values will be shown in the FourCC opt listing (`help=FourCC`)

+ print value type with `help=FourCC`
2024-11-29 12:35:38 +01:00
Martin Pulec
54efe84fea deck/help=FourCC: make fourcc sample val 4-char long 2024-11-29 09:42:06 +01:00
Martin Pulec
0ac8c32716 aplay/mixer: allow selection of single participant
Allow selection of a single participant to be sent back with a control
socket (docuented in wiki).
2024-11-28 12:05:12 +01:00
Martin Pulec
d90d2836ec sockaddr_compare: handle v4-mapped sockaddr_in6
Current implementation of resolve_addrinfo defaults to v4-mapped ipv6
addresses even for dotted decimal.
2024-11-28 12:05:11 +01:00
Martin Pulec
9fd68d6447 aplay/mixer: factor out sockaddr_compare 2024-11-28 12:05:11 +01:00
Martin Pulec
273f6d3c1d add get_sockaddr + tests
to convert textual representation of host:port to sockaddr

having this new function, we can also test get_sockaddr_str
2024-11-28 12:05:11 +01:00
Martin Pulec
82aed4b4ac aplay/mixer: sockadr cmp: check also IPv6 scope ID 2024-11-28 12:05:11 +01:00
Martin Pulec
950f3dc6a4 get_sockaddr_str: obtain IPv6 scope ID
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).
2024-11-28 12:05:10 +01:00
Martin Pulec
16e647c65a hd-rum-translator: use get_sockaddr_str()
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.
2024-11-28 12:05:10 +01:00
Martin Pulec
0b27ea6e18 aplay/mixer: do not store particp sockaddr_storage
The participant sockaddr_storage doesn't need to be stored - actually the
participands are stored inside a map, whose key is the sockaddr_storage.

this modifies the commit 225fbc8ea (2024-11-13, and later fixes)
2024-11-28 12:05:10 +01:00
Martin Pulec
23197c9e78 aplay/mixer: pass audio_playback_opts to ctor
+ moved opt parsing to a separate function
2024-11-28 12:05:10 +01:00
Martin Pulec
9ff045c00b aplay API: paas init parameters in a structure
+ add also parent module pointer
2024-11-28 12:05:10 +01:00
Martin Pulec
d9eaca6cac acap/aplay headers: add missing include guard 2024-11-28 12:05:09 +01:00
Martin Pulec
1b61386af6 audio decoder: support zero-len data
to be used by passive acap and the audio mixer for passive audio
participants
2024-11-28 12:05:09 +01:00
Martin Pulec
88e511f898 audio codec: if received no data, pass it further
This is an exception to the normal behavior used by the passive audio
mixer participant, that sends empty packets to request receiving the data.

It doesn't affect the normal UG behavior, because the situation when
nonzero_channels=0 doesn't occur otherwise. Either we receive at least
some packet from a frame and if not, the decoding doesn't take place.
2024-11-28 12:05:06 +01:00
Martin Pulec
abd758241a debug: move some stuff to utils/debug
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
2024-11-28 11:46:09 +01:00
Martin Pulec
cac114d6e5 vdisp,vcap/decklink: do not fail if insuff drv ver
The motivation is to allow (although not recommend) running even with
old drivers - it will usually work and just the DeckLink IP features
won't be available (and warnings about that).

+ print it again at the beginning (== print also when :help requested)
+ change the message not_inst-or-outdated jus to outdated because in that
place it is obvious that the drivers are present
2024-11-28 10:34:08 +01:00
Martin Pulec
9e736df38e timespec_get: compat
handle it explicitly for macos < 10.15

it eliminates the need to include config.h from tv.h and also the
autoconf test
2024-11-28 10:30:11 +01:00
Martin Pulec
699c04841f added passve audio vidcap 2024-11-28 08:29:28 +01:00
Martin Pulec
adc4f954e2 vcap/decklink: print actual known connections
Instead of printing hard-coded list, print the actally recognized
connections by our implementation.
2024-11-27 14:53:12 +01:00
Martin Pulec
116096b744 vdisp/decklink: allow setting video connection
Usually not needed but needed when needing Composite output instead of
Component, because it is using the same wire as Y of component.
2024-11-27 14:29:26 +01:00
Martin Pulec
37bd9d5cce vdisp/decklink: list of available connections 2024-11-27 14:29:24 +01:00
Martin Pulec
b785a5447b get_video_desc_from_string: add ntos
added NTSC with 486 line overscan
2024-11-27 12:33:07 +01:00
Martin Pulec
bd36265293 rtpdec_jpeg: GET_2BYTE - do no use ntohs
mac clang complains about alignment and indeed it doesn't seem to be be
100% certain that the read uint16_t is 2-byte aligned.
2024-11-27 12:32:09 +01:00
Martin Pulec
7e43ab81d2 vcap/decklink: fix CID 470422
fmt cannot be nullptr
2024-11-26 08:29:30 +01:00