Commit Graph

7670 Commits

Author SHA1 Message Date
Martin Pulec
8a34c2a27f configure: enclose CUDA paths in quotes only in Win
autoconf doesn't handle the quotation marks well, in this case it
doesn't take the path given by eg. `-L"/usr/local/cuda/lib64"`.

This allows at least correct configure in Linux, in Windows, user may
perhaps need to set LIBRARY_PATH env variable.
2023-04-06 11:34:12 +02:00
Martin Pulec
b2777c0909 CI Linux: use GH mirror for PipeWire
Doesn't fail if the master repo is temprorarily unavailable as in:

    https://github.com/MartinPulec/UltraGrid/actions/runs/4627178136/jobs/8184796245
2023-04-06 11:18:25 +02:00
Martin Pulec
f336b010fa RTP UDP: fixed crash on invalid address
Fixed abort on invalid address as in `uv invalid` since commit f444f2fa
(udp_exit is run even on unsuccessful init).
2023-04-06 10:46:08 +02:00
Martin Pulec
b4b138b74f AppRun: do not use LD_LIB_PATH for handle_updates()
The command-line tools used here (eg. stat) may use our custom libraries
(like libselinux) which may not be entirely compatible (it just most
likely ends up with a warning).

+ do the same for get_tools() and set_libva_ld_preload()
+ use original (if any) LD_LIBRARY_PATH for set_ld_preload()
+ removed unneeded `exit $?` (it is implicit)
2023-04-05 16:32:58 +02:00
Martin Pulec
35bf20065e AppRun: use get_loader() from preload.sh 2023-04-05 16:12:55 +02:00
Martin Pulec
c0cde4bc82 Firejail: allow pipewire screen capture
additionally requires root (not to be disabled by default.profile) + not
disabling dbus
2023-04-05 15:24:11 +02:00
Martin Pulec
538fc2af3f AppRun: preload also libpipewire
libpipewire is incompatible with preloaded jack on current Arch and
causes a crash (unsatisfied jack pipewire function dependency).

Anyways, the pipewire screen capture didn't work with the bundled
library, anyways, so we certainly need one from system.
2023-04-05 15:24:11 +02:00
Martin Pulec
5ec8d87479 screen_pw.cpp: compat 2023-04-05 15:23:57 +02:00
Martin Pulec
ea9e454a80 CI Linux: enable pipewire screen cap 2023-04-05 09:49:34 +02:00
Martin Pulec
ad71239134 CI Linux: remove AOM U18 compat 2023-04-05 08:36:53 +02:00
Martin Pulec
8cb7e7e779 CI Linux: use Vulkan directy from repo 2023-04-05 08:25:49 +02:00
Martin Pulec
3ac7af2aa0 CI Linux: install wayland with apt
Previously, actually the same version was used but downloaded directly
and installed with dpkg, because it has been used a version from U20
(now default) to U18.
2023-04-05 08:22:48 +02:00
Martin Pulec
25cbc0d8d2 SDL2: fixed inverted condition
This fixes blocking putf freeze, eg.:

    uv -t testcard --param decoder-drop-policy=blocking

but more importantly:

    uv -t testcard -d multiplier:sdl

because the later one is how it is called via GUI (mutliplier uses
blocking putf).
2023-04-04 16:59:43 +02:00
Martin Pulec
c4b12a6d8c SDL2: errors are <0
SDL_PushEvent returns 1 on success (and 0 if filtered)
2023-04-04 16:45:50 +02:00
Martin Pulec
737a27270e FEC help: excess second %
perhaps a relict from printf printout
2023-04-04 16:33:07 +02:00
Martin Pulec
8ea11c3413 AppRun: run tput prior to setting LD_LIB_PATH
Setting LD_LIBRARY_PATH would override the library path also for tput
executable, leading to possible incompatible version of ncurses in
bundle, leading to following error:

    tput: /tmp/.mount_UG-20-oJoJEf/usr/lib/libncursesw.so.6: version `NCURSES6_TINFO_6.2.20211010' not found (required by tput)

(and of course the color escape sequence is not returned)
2023-04-04 15:59:47 +02:00
Martin Pulec
028ef7b45e Coverity CI: set schedule also to Tue 4:00 UTC
aligned with ARM builds (same date)

having the timer more often provides quickier feedback
2023-04-04 15:47:49 +02:00
Martin Pulec
bc9b313ea9 rpi4_out.cpp: moved thread_id to correct structure 2023-04-04 14:50:17 +02:00
Martin Pulec
1930b7b857 create-appimage.sh: fixed shellcheck warnings 2023-04-04 14:26:58 +02:00
Martin Pulec
c45112d034 SDL2: minor improvements
- check return values of some SDL calls
- removed should_exit var, break the loop instantly
2023-04-04 14:22:53 +02:00
Martin Pulec
92e8535b3b syphon_server.m: moved from Obj-C++ to Obj-C
The .mm extension was needless (no C++ feature was actually used).
2023-04-04 14:22:52 +02:00
Martin Pulec
87f3bf1d75 color.h: missing includes 2023-04-04 14:22:52 +02:00
Martin Pulec
062f771fde AppImage: don't use bundled Wayland libraries
Don't use bundled Wayland libraries when running on Wayland but use it
otherwise to satisfy possibly unsatisfied dependencies.

See also previous commit - Wayland libraries seem not to be portable and
prevent SDL2 native run on Wayland. After this change, SDL2 runs on
U22.04 in Weston (without Xwayland).
2023-04-04 14:19:55 +02:00
Martin Pulec
9eb376ee38 CI Linux: do not build own SDL2 anymore
SDL2 now obviously works on U20.04, because we are building there. It
doesn't work on U22.04, but neither the build with SDL 2.0.20 nor 2.26.2
does.

The problem seems actually to be the inclusion of Wayland libraries in
AppImage.
2023-04-04 12:49:46 +02:00
Martin Piatka
0149ea3fdf CI: Apply vaapi compatibility patch on 20.04 too 2023-04-04 11:42:55 +02:00
Martin Piatka
eb7406f06e CI/Linux: Migrate to Ubuntu 20.04 2023-04-04 10:46:16 +02:00
Martin Pulec
4adb5f6ac0 configure.ac: simplify
use a macro to ensure feature availability

+ use for the macro M4 instead of shell
2023-03-31 16:17:21 +02:00
Martin Pulec
811938ed8c main: call regiesterd should_exit callback if exit
If registering a should_exit callback but should_exit has already been
broadcasted, it wasn't ever run, leading likely to a freeze.

Steps to reproduce the fixed problem:

    uv -t swmix:512:512:2 -t invalid

Fixed by immediately calling the registered callback if should_exit has
been already issued.
2023-03-31 14:16:47 +02:00
Martin Pulec
edd254f558 swmix: use C 2023-03-31 14:16:47 +02:00
Martin Pulec
c6c18208c9 swmix: properly free resorces if init fails
vidcap_swmix_done() can now be run even if not entire initialization is
done so call it to free partially initialized state if init fails.
2023-03-31 14:16:47 +02:00
Martin Pulec
3db29d0c6c Makefile: do not echo CUDA compilation twice
The compiler is run twice - first for real compilation, second for
dependency tracking. Do not print compilation message the second one
since it may be confusing.
2023-03-30 17:03:23 +02:00
Martin Pulec
af1df2e376 configure: ensure cuda is present if req 2023-03-30 17:03:23 +02:00
Martin Pulec
34cf791ba0 configure: if CUDA used, link with it (Linux)
Linux still uses modular build but previous commit adds dependency on
CUDA directly to UG core. Since nowadays, the libraries are normally
bundled with UG, there should't be a problem adding the direct
dependency.

Fixes failed build

    https://github.com/MartinPulec/UltraGrid/actions/runs/4564204742/jobs/8053681894
2023-03-30 17:02:57 +02:00
Martin Pulec
2317819400 CUDA: do not use gpujpeg for dev list
Query directly, without help from GPUJPEG (although the code is actually
borrowed from there).

This enables device listing also if GPUJPEG is not compiled in and it
simplifies main.
2023-03-30 14:01:10 +02:00
Martin Pulec
757b03fd67 cuda_wrapper/cuda_runtime.h wrapper: added documentation 2023-03-30 14:01:10 +02:00
Martin Pulec
17db78a191 configure.ac: removed some unused HAVE_ defs
When using modules, it should not depend on the preprocessor directive
but its sources should be included conditionally if enabled.

This change reduces number of features in config.h and also helps
refactoring because the absence of HAVE_ macro indicates that there is
no additional dependency on the module.
2023-03-30 14:01:10 +02:00
Martin Pulec
07f8d44d46 Syphon: minor help improve
- print help for "app" and "name" opts
- numerate servers (but the numbers cannot be used as indices for init)
2023-03-30 14:00:57 +02:00
Martin Pulec
963e1c3561 GL: create tiny wrapper for SPOUT/Syphon
to be more user friendly by allowing user to specify simply:

        -d spout:name="My server"

+ removed dummy audio functions from GL display (unneeded)
2023-03-30 13:49:09 +02:00
Martin Pulec
c009f9da76 Syphon: use Objective-C without C++ 2023-03-30 10:49:32 +02:00
Martin Pulec
a4680299dc DShow: fixed inverted condition
fixed commit 4fe552f2 from 24th Feb 2023
2023-03-30 10:39:54 +02:00
Martin Pulec
28431e2784 ARM CI: fixed cron schedule line
fixes commit 88d7d1eb
2023-03-29 14:54:18 +02:00
Martin Pulec
ed2aa1a6d2 pbuf: improved max_loss computation
max_loss is now not capped to 64 but consecutive loss periods from
adjacent 64 packet groups are summed together
2023-03-29 14:54:16 +02:00
Martin Pulec
31a8b30c57 pbuf: compute_longest_gap refactor
equivalent rewrite in preparation to modification
2023-03-29 14:53:57 +02:00
Martin Pulec
720fafc3d6 pbuf: use enum instead of macros
clang-tidy modernize-macro-to-enum
2023-03-29 13:39:50 +02:00
Martin Pulec
f41897410a Syphon: prevent not likely race condition
+ added documentation
2023-03-29 13:39:49 +02:00
Martin Pulec
d7f1f24c7a Syphon: properly stop mainloop
Do not call [NSApplication terminate], because main event loop is never
left but call stop. A custom event needs to be posted to execute the
event step. References:

- https://stackoverflow.com/questions/48041279/stopping-the-nsapplication-main-event-loop
- 6e6805000a
2023-03-29 13:39:49 +02:00
Martin Pulec
f4e915da9b macOS: removed remains of GLUT
This effectively reverts commit 887da08822.
2023-03-29 13:39:49 +02:00
Martin Pulec
87c82baa14 updated REPORTING-BUGS.md 2023-03-29 13:39:49 +02:00
Martin Pulec
3bccc55a6f Syphon: miscellaneous fixes 2023-03-29 13:39:49 +02:00
Martin Pulec
51835138b8 Syphon: fixes
Fixed releasing of timers (recycle onle) + remove the last one,
otherwise it will be left dangling and triggerred (and crash) when gl
display is also launched.

+ moved server discovery before creating new GL textures etc.
2023-03-29 13:39:48 +02:00