9061 Commits

Author SHA1 Message Date
Martin Pulec
4c4434b028 UltraGrid 1.9.5 v1.9.5 2024-07-22 14:44:37 +02:00
Martin Pulec
a172ec1c71 vcap/rtsp: fixed pointer passing
insteda to rtsp_state::rtsp_error_occurred, the error was printed to
some place of stack (the address of `s` variable on stack plus offset
of that attribute).

\+ added magic value to ensure
2024-07-22 14:44:37 +02:00
Martin Pulec
6498db9528 debug_dump: overflow fix
The printout includes pointer, which was at the time of writting supposed
to be 32, in which case the line length was:

2 /* 0x */ + 8 /* ptr */ + 1 /* : */ + 3 * 16 /* " XX" */ + 16 /* char repr */ + 5 /* additiona separators */ + 1 /* NL */ = 81

(separators - 2 betweeh group of hexa and char repre, 3 between hexa and char represenatation)

With 64 bit pinters, it can be at most 89 bytes. To keep the old length,
removed one space between every pair of hexadecimal byte representation -
it is still good legible, compatibile with xxd, still keeping the 80
long line..
2024-07-22 11:22:22 +02:00
Martin Piatka
4f3da43514 capture/dshow: Add workaround for OBS virtual camera 2024-07-22 11:22:22 +02:00
Martin Piatka
8c41477b43 CI Win: Install VC 2010 Redist 2024-07-22 11:22:22 +02:00
Martin Piatka
24691102c6 CI Win: Dependencies for screen capture 2024-07-22 11:22:22 +02:00
Martin Pulec
c1b8169966 vdisp/file: fixed correctly the lock problem
Fixed correctly the problem that was incorrectly attempted by the
previous commit revert. should_exit doesn't need to be checked with the
main while loop because it is done by the inner one.
2024-07-22 11:22:21 +02:00
Martin Pulec
dd801dd9d3 Revert "display/file: fixed CID 424197/1"
This reverts commit 517bef3dd1.

The fix was incorrect, causing also new CID 464471.
2024-07-22 11:22:21 +02:00
Martin Pulec
f5dad89997 vcomp/cineform: fixed a crash witn unint frame
It is actually a bug of cineform, which can be also reproduced with:
`-t testcard:c=RGB:pattern=noise -c cineform`, this is a workaround.
2024-07-22 11:22:21 +02:00
Martin Pulec
be70813aab vcomp/cineform: fixed crashing RGB
Together with the previous revert commit fixes CID 464437.

In addition to incorrect change to unsigned, also parenthesis around
(height - 1) were missing.
2024-07-22 11:22:21 +02:00
Martin Pulec
a7f7535e92 Revert "Cineform: Windows warning fix"
This reverts commit 45d0bfb615.
2024-07-22 11:22:21 +02:00
Martin Pulec
116d5533d7 video_rxtx: don't unregister callb. if not regist.
Do not unregister the should_exit callback if not registsterd. This
occurs eg. when invalid host was entered, like: `uv blah`.
2024-07-22 11:22:20 +02:00
Martin Pulec
c2c3bdc050 AppRun Firejail: allow Avahi over D-bus
needed for NDI discovery
2024-07-22 11:22:20 +02:00
Martin Pulec
82b7a21021 vcap/testcard2: try also Monaco.dfont as mac font
Some macs doesn't have Monaco.ttf, in which case Keyboard.ttf is usually
selected, which is not monospace and doesn't have a symbol for ':'.

The mac, where Monaco.ttf is missing usually have Monaco.dfont, that
can be directly used, so added it to font_candidates.
2024-07-22 11:22:20 +02:00
Martin Pulec
3cec5ad9b1 vcap/ndi: DNS-SD is required for NDI discovery (msg)
To be preciese, not mDNS but DNS-SD is required to NDI discovery,
i.e. avahi-daemon is required in Linux, although systemd-resolved is
mDNS capable.
2024-07-22 11:22:20 +02:00
Martin Pulec
a39bac849b ndi_common: increment USE_NDI_VERSION to 6
just a default value

Actually, not much is influenced by that change, since it has been 5 (by
default) and the version 6 keeps v5 API, so that the entrypoint remains
`const NDIlib_v5* NDIlib_v5_load(void);` (not 6).

Only functional change is updated fallback path in MSW.
2024-07-22 11:22:20 +02:00
Martin Pulec
8758d9a393 ndi_common: do not call dlerror() second time
Do not call dlerror() second time - the function actually clears the
error status, so that the second call returns NULL (printing with '%s'
is actually UB).
2024-07-22 11:22:19 +02:00
Martin Pulec
abcc6c8ddf updated NDI copyright
Updated copyright as per current version at:
<https://docs.ndi.video/docs/sdk/licensing>
2024-07-22 11:22:19 +02:00
Martin Pulec
03c0f0b406 CI NDI: use v6 2024-07-22 11:22:19 +02:00
Martin Pulec
0af8eaf755 CI NDI: do not repeat downloads in install scripts
NDI SDK should be already downloaed from the step before in the YAML.
2024-07-22 11:22:19 +02:00
Martin Pulec
cf7e5d9a84 vcap/rtsp: clear cURL only if init 2024-07-15 15:54:02 +02:00
Martin Pulec
87f5c52a32 Revert "fixed CID 424197" + fix correctly
Fix the commit ab794ce70 (2023-11-23) that fixed (incorrectly) the
CID 424197.

If  should_exit was set before waiting in pthread_cond_timedwait, the
infinite loop is never left. Moreover, it seems that the loop was left
only on should_exit timeout, not when notified by condition variable.

This is mostly to make Coverity happy - the spurious wakeup here does
not matter in any way. So reverting the original "fix" would be enough.
2024-07-15 15:46:06 +02:00
Martin Pulec
44eb1a5dad vcomp/lavc: hint for libsvtav1
pred-struct=1 + bitrate will likely fail (with new libsvtav1) - add hint
to use CRF or CQP.

More sofiscated solution is in master branch.
2024-07-10 16:29:49 +02:00
Martin Pulec
a3b3caddae UltraGrid 1.9.4 v1.9.4 2024-06-27 08:56:27 +02:00
Martin Pulec
a0fbc4e517 vcomp/cmpto_j2k: mct opt parse fix
Fixed the commit 27bfe2fc (2020-05-29) which added option nomct, but
switched the meaning of nomct and mct by mistake.
2024-06-26 16:35:53 +02:00
Martin Pulec
498fd765ee vcap/decklink: profile setting fix
Fixed the wrong condition since the commit 215ee42481 (2023-05-04) -
profile was actually not set.
2024-06-26 16:35:53 +02:00
Martin Pulec
9f52fabe76 fixed new (>0.25) gpujpeg compat
\+ use RESTART_AUTO if we have >= 0.25.3
2024-06-26 16:35:53 +02:00
Martin Pulec
67467807a3 fix repeated get_sockaddr_str calls
When get_sockaddr_str was called second time, the buffer was not cleared.

Also use snprintf to write the result in get_scoaddr_addr_str.
2024-06-26 16:35:53 +02:00
Martin Pulec
7dc235843b net: get_local_addresses - ifaddrs.ifa_addr can be NULL
The pointer ifa_addr in struct ifaddrs can be NULL and indeed it occurs
(perhaps with interfaces without assigned addrs?). Steps to reproduce:
```
uv -x sdp -t testcard -c lavc:subs=420
````
2024-06-26 16:35:53 +02:00
Martin Pulec
91fe3ac71e vdec/lavd: check_duration wrong cond
It was perhaps meant to advise frame threads if not enabled, not if
slice thread is not enabled.
2024-06-26 16:08:14 +02:00
Martin Pulec
2d5b20734b broadcast_should_exit: fixed signalling
Since the function can be called from the signal handler, there must
not be any call to signal unsafe function (see signal-safety(7)).

Actually, this is not just a fix of a possible problem but it caused
activelly problems within the reflector when 2 signals were raised one
shortly after anotner. Was stuck at following (snippet):
```
std::unique_lock<std::mutex>::unique_lock(std::mutex&) at /usr/include/c++/14.1.1/bits/unique_lock.h:74
 (inlined by) state_root::broadcast_should_exit() at /home/martin/Projects/ultragrid/src/host.cpp:533
exit_uv at /home/martin/Projects/ultragrid/src/host.cpp:587
signal_handler(int) at /home/martin/Projects/ultragrid/src/hd-rum-translator/hd-rum-translator.cpp:219
```
2024-06-26 16:08:14 +02:00
Martin Pulec
1123f4f399 CI: suppress brew list output for uninstalled
the message: `Error: No such keg: /opt/homebrew/Cellar/asciidoctor`
is now print on stderr, which disturbs GitHub CI (complains about it in
action summary annotations; just a warning).
`
2024-06-26 16:08:14 +02:00
Martin Pulec
5aaba6d1d1 CI Win: CUDA/MSVC incompatibility fix
Latest MSVS 2022 17.10.34928.147 (MSVC v14.40.33807) in GH runner
20240603.1.0) is no longer compatible with CUDA 11.8.0.52206. CUDA refuses
to compile because of unsupported compiler. Previous version 17.9.34902.65
(GH runner 20240514.3.0) was OK.

As MSVS 2022 is supported by CUDA 11.8 in general, we can pass
-allow-unsupported-compiler flag.
2024-06-26 16:08:14 +02:00
Martin Pulec
c378bea288 CI Linux FFmpeg: patch VP9 FFmpeg patch
temporarily again incompatible with current FFmpeg HEAD
2024-06-26 16:08:14 +02:00
Martin Piatka
065ca274c8 hd-rum-translator: Force recompression for conference
Previously the --conference-compression parameter would only work for
automatic output ports (sending back to participants who are sending to
us), while the hosts explicitely specified on cmdline would default to
packet reflecting mode (and not receive the mixed video).
2024-06-25 13:56:12 +02:00
Martin Piatka
298b1bb819 display/conference: Fix behaviour when fps is unspecified 2024-05-31 14:43:38 +02:00
Martin Pulec
a936500c25 UltraGrid 1.9.3 v1.9.3 2024-05-22 11:21:19 +02:00
Martin Pulec
42bbc2a31f vdisp/pipe: do not announce VC_NONE support
If using transcoding reflector, eg.:
`hd-rum-transcode 8M 5004 -c libavcodec -P 6004 100:1`

pipe is used, which advertised VC_NONE, for which assertion at the
beginning of get_pixfmt_desc() failed.
2024-05-22 10:50:44 +02:00
Martin Pulec
d7e64a07af hd-rum-transcode: exit if serv sock init fails 2024-05-22 10:24:28 +02:00
Martin Pulec
ee9fe26e01 hd-rum-transcode: catch stoi invalid_argument
Make something like `hd-rum-transcode 8M 5004 -P x 100::1` fail with
humaan readable message.
2024-05-22 10:23:47 +02:00
Martin Pulec
6e44d112d9 CI macOS: install only not installed brew formulas
The GitHub actions now complain if trying to install a formula, that is
already installed, eg:
```
  run macOS (macos-14)
  pkg-config 0.29.2_3 is already installed and up-to-date. To reinstall 0.29.2_3, run: brew reinstall pkg-config

```

As a workaround, install just the formulas, that are not already
installed.
2024-05-22 10:18:28 +02:00
Martin Pulec
afda0381ae deinterlace: fixed noopt config
Introduced by the commit c4aa64c8 (2024-01-13).

refers to GH-384
2024-05-22 10:10:28 +02:00
Martin Pulec
d8c28fabf8 macos-wrapper: change version from 10.15 to 12
Current C/C++ workflow builds already on macOS 12, so that also macOS
versions 10.15 and 11 would be incompatible.
2024-05-22 10:05:29 +02:00
Martin Pulec
5a5fc53f60 CI macos: adapt to new DELTACAST packages
see previous commit
2024-05-22 10:01:40 +02:00
Martin Pulec
359aed3446 CI Win: adapt to new DELATCAST packages
See:
<https://www.deltacast.tv/media/30987/changenotice_videomaster625_installers_and_distribution_packages.pdf>
2024-05-22 10:00:05 +02:00
Martin Pulec
00f95eb8ef audio: unregister callback
This caused occasional crashes on M1 Mac Pro with `uv --capabilities`
(also in macos-14 arm64 GH runner). This was most likely caused by the
callback being run just after the audio state has been destroyed.
2024-05-22 09:59:18 +02:00
Martin Pulec
051047d16e added unregister_should_exit_callback
\+ unregister the callback for video_rxtx
2024-05-22 09:59:12 +02:00
Martin Pulec
fcd222f5b2 register_should_exit_callback: register directly
no noeed to pass with a message
2024-05-22 09:59:00 +02:00
Martin Pulec
e613d4bd8c vcompress/lavc: do metadata housekeeping in store
Moved metadata housekeeping to store_metadata() and removed the
assert. The idea is to prevent crashes on assert when some encode fails.

In some malicous case (eg. when the latency is higg), the metadata can be
now released prior to restoring, so print at least a warning about that.
2024-05-22 09:57:41 +02:00
Martin Pulec
5da326b10f RTP: err sending RTCP - missing NL 2024-05-22 09:56:50 +02:00