Commit Graph

7686 Commits

Author SHA1 Message Date
Martin Pulec
96b9ff511c Win CI scripts: create /usr/local/* if not
Ensure that /usr/local/{bin,include,lib} are created in scrips that copy
to that.

This is not problem for the CI because `.github/scripts/Windows/prepare_msys.sh`
already creates them but the scripts are standalone installers and it
can be run independently by a developer to install the particular dependency.
2023-04-11 13:02:24 +02:00
Martin Pulec
169bfee7f5 Spout: fixed missing GL include
fixes failed run:

   https://github.com/MartinPulec/UltraGrid/actions/runs/4665946519/jobs/8259953664
2023-04-11 12:06:59 +02:00
Martin Pulec
00c0c60cc3 fixed gl_context.h warning
int:1 values are only -1,0 but assigning TRUE makes -1 from 1
2023-04-11 11:52:17 +02:00
Martin Pulec
a8f0f997f6 echo: lock_guard should not be a temporary 2023-04-11 11:52:17 +02:00
Martin Pulec
9eeff27085 DeckLink cap,disp: print display mode flags
print all known display mode flags, not only 3D support
2023-04-11 11:52:17 +02:00
Martin Pulec
0ca9366930 DeckLink disp.: print field mode 2023-04-11 11:52:16 +02:00
Martin Pulec
121ab45d17 DeckLink cap.: print field dominance
refers to GH-306
2023-04-11 11:52:16 +02:00
Martin Pulec
fe89ab13c2 gpustitch: fixed further 3 warnings 2023-04-11 11:52:16 +02:00
Martin Pulec
13a88249d6 gpustitch: fixed mismatched new/free 2023-04-11 11:52:16 +02:00
Martin Pulec
cc9dedabb9 DeckLink cap.: moved frame postprocessing to separate func 2023-04-11 11:52:16 +02:00
Martin Pulec
60369907da fixed CIDs 405918 and 405919 2023-04-11 11:52:13 +02:00
Martin Pulec
0d679a341a DeckLink cap.: warn if lower field first order detected
see GH-306
2023-04-06 16:56:55 +02:00
Martin Pulec
8dcb6808eb lavc: do not unref packet in deconfigure
+ do not allocate it ahead in _init

For HuffYUV and FFV1 this caused crash (perhaps deconfigure was run twice
for those codecs with extradata /it uses a different path than usual
codecs without that data/, leaving the AVpacket pointer nullptr after
first run).

Unreferencing should not be necessary - we are not refcounting it and
FFmpeg example (decode_video.c), which works similarly, doesn't do that,
anyways. Also av_packet_free() should unreference it according to doc.
2023-04-06 14:39:10 +02:00
Martin Pulec
df211bf948 lavc: always use default slice count
Use default slice count also for JPEG with threads==1 because it is no
longer broken with current FFmpeg code.
2023-04-06 14:20:55 +02:00
Martin Pulec
4ce5f69217 cmpto_j2k dec.: added hint to increase tile limit
hint to increase tile limit if we are dropping frames
2023-04-06 12:11:12 +02:00
Martin Pulec
9338b588aa cmpto_j2k dec: increased tile limit to 2
This increases throughput by some 33 % at the expense of one frame
increased latency. Using more than that improves the throughput only
slightly so it is perhaps not worth adding latency (as a default value).
2023-04-06 11:48:45 +02:00
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