Commit Graph

7720 Commits

Author SHA1 Message Date
Martin Pulec
bc05c72e0d main: IWYU 2025-09-16 15:29:48 +02:00
Martin Pulec
42afa5642e [vulkan_]sdl3: handle positioning errors
- return on errors
- do not set the position when neither display/x/y was set (prevent
Wayland errors)
- check that the only x/y or display was set (not both position and
display)
2025-09-15 11:30:28 +02:00
Martin Pulec
c5f38fe2ff vulkan_sdl3: cstoi: add description if failed
Add amendment that parsing the number was the problem (originally was
just "Wrong option: <opt>" which is just the same as if passing unknown
option).
2025-09-15 11:30:27 +02:00
Martin Pulec
f6d4b87508 vulkan_sdl3: fix cstoi
The lenght check was not functional for eg. pos=5,6 - the first number
was rejected because endpos was 1 but lenght of the string 3.

broken since 2025-09-05 (with the commit 4290a298)
2025-09-15 11:30:27 +02:00
Martin Pulec
42302507d7 module: print db not empty warn to stdout
Do not use logger. Dump tree uses plain stdout so make this the same
(the warning is currently displayed multiple times, for every ancestor
in tree and so the logger issues that the message is repeated n-times
which gets messed with the plain printfs).
2025-09-15 11:30:27 +02:00
Martin Pulec
e9d29cd842 [vulkan_]sdl3: do not set pos if not req
if neither of display/x/y is set, do not set the window position
2025-09-15 11:30:27 +02:00
Martin Pulec
2fd4d2e418 sdl3 Wayland display w/o fs: print SDL error
+ print the SDL_SetWindowPosition in verbose mode also in
Wayland (currently always an error - we are calling it with
x/y=SDL_WINDOWPOS_CENTERED_DISPLAY(0) if nothing is specified).
2025-09-15 11:30:24 +02:00
Martin Pulec
cf20aea586 vcomp/lavc: libsvtav1: old FFmpeg compat
default preset doesn't with some quite old FFmpeg (4.4.6, from MacPorts)
2025-09-05 16:22:07 +02:00
Martin Pulec
38fb6f9c42 vulkan_sdl2: fix gpu=integrated|discrete 2025-09-05 15:59:15 +02:00
Martin Pulec
4290a298d1 vulkan_sdl3: use IS_KEY_PREFIX
The parsing made more C-string based (because IS_KEY_PREFIX expects
that). It can be made more string_view using again later but it seems
to be more short now).

this also fixes gpu=integrated|discrete
2025-09-05 15:58:47 +02:00
Martin Pulec
d7191a7d65 vulkan_sdl2: check some SDL calls 2025-09-05 14:28:23 +02:00
Martin Pulec
2c2dcc215d sdl3/vulkan_sdl3: allow ID for display
This is a bit tricky because the ID seems to be a (small) ordinal and may
potentially clash with the index... Index is considered first, this
approach may bbe re-evaluated (eg. letters for the indexes?).
2025-09-05 14:28:23 +02:00
Martin Pulec
7e42cb9f91 sdl2, vulkan_sdl2: validate parameters
similar to [vulkan_]sdl3
2025-09-05 11:12:09 +02:00
Martin Pulec
b96080ee0b vulkan_sdl3: chech display_idx spec only with fs
In Wayland, the display/position specification is not possible. The
display can be specified when having fullscreen.

see also vdisp/sdl3
2025-09-05 11:02:32 +02:00
Martin Pulec
fc20578250 vulkan_sdl3: fix setting display ID 2025-09-05 10:48:21 +02:00
Martin Pulec
e22cf9d8e3 vulkan_sdl3: fix (initial) fs setting 2025-09-05 10:46:47 +02:00
Martin Pulec
09c47b73ed sdl3: handle SDL_SetWindowPosition errors
- :fs hint in Wayland
- print error otherwise if fails
- rename get_display_id_to_idx to get_display_id_from_idx
2025-09-05 10:46:41 +02:00
Martin Pulec
9084609ef8 fs: get_data_path: fix inverted cond + rename
fixed inverted condition

rename to get_ug_data_path
2025-09-05 08:53:41 +02:00
Martin Pulec
3a178455a4 vulkan_sdl3: check SDL return values
and print error if something gets wrong (ported from vdisp/sdl3)

also fixes CID 894258
2025-09-05 08:43:40 +02:00
Martin Pulec
b4e18389f9 vulkan_sdl3: do not dereference NULL on fail
not critical

CID 894257
2025-09-05 08:22:54 +02:00
Martin Pulec
09674dc1ce sdl3: fix a leak when unable to lock texture
not likely to occur and even if so, it occurs just once (and init fails)

CID 894256
2025-09-05 08:20:02 +02:00
Martin Pulec
3aa3a22cae fs: generalize dir_exists to file_exists + use
+ use with src/playback
2025-09-04 16:39:09 +02:00
Martin Pulec
96b5986f28 playback: IWYU 2025-09-04 16:38:38 +02:00
Martin Pulec
ffa79acdc5 vcomp/cuda_dxt: improve error print
- use logger
- print CUDA error string
2025-09-04 11:23:55 +02:00
Martin Pulec
0578d809c1 default sountfont: use original name
The name default.sf3 is no longer required, the soundfont name is resolved
directly so use the original name. It is TimGM6mb derivative with just
piano downloaded from:
<https://musical-artifacts.com/artifacts/2642>
2025-09-04 09:25:44 +02:00
Martin Pulec
4357452c32 move soundfont to shared + always install
This simplifies things a bit at the expense that the soundfont is always
included/installed (91 kB).

Added get_data_path() function for generic handling the path to common
data (eg. /usr/local/share/ultragrid if installed). The idea is to catch
all cases - installed (run with absolute or relative path) or run from
inside the source directory in one place.
2025-09-03 16:42:28 +02:00
Martin Pulec
faf95598ad get_exec_path: return bool + fixes
return true

fix FreeBSD and generic variant - the logic was inversed to the definition,
returning 0 on success and !0 otherwise
2025-09-03 16:07:41 +02:00
Martin Pulec
f806f01428 fs: get_exec_path: static + consolidate 2025-09-03 15:08:57 +02:00
Martin Pulec
d1667f8187 snprintf_ch: discard return value from fprintf
clang-tidy complains about the unused return value of fprintf, which is
mostly useless here
2025-09-03 14:35:11 +02:00
Martin Pulec
8d15eb58a3 vulkan_sdl3: use common func for FPS pretty printout
A common way would be to use generic FPS indicator. But a slight problem
is that _putf return value isn't entirely reliable for this module,
since the frame may be dropped later doe to insufficient performance.

Because of the above, do not use the generic indicator, at least
for now. But use the common function to make the output "prettier"
(bold/color and if not performing well also use a color for FPS).
2025-09-01 11:06:09 +02:00
Martin Pulec
2169772063 remove sdl_mixer
should be replaced altogether with fluidsynth - add alias there

+ removed typo in fluidsynth pkg name  ARM CI bootstrap.sh
2025-09-01 10:22:18 +02:00
Martin Pulec
9bad114367 vdisp/vulkan_sdl{2,3}: register aliases
Switch hidden to alias - makes a difference for GUI, see also the
previous commit.
2025-08-29 08:24:32 +02:00
Martin Pulec
b0739571ce lib_common: new class for module visibility
Add MODULE_FLAG_ALIAS (+ complete API) for modules that are not hidden
as technical/deprecated moudles but rather an alias.

The difference is important for GUI not to print aliased module twice.
2025-08-29 08:24:31 +02:00
Martin Pulec
7ac13a3032 vdisp/gl: old GLFW compat 2025-08-28 14:10:05 +02:00
Martin Pulec
bddb5054f2 vdisp/gl: print the no-GLX error only as verbose
the Wayland case
2025-08-28 10:41:02 +02:00
Martin Pulec
eb7cb38ea4 vdisp/gl: add platform opt/help/info 2025-08-28 10:25:21 +02:00
Martin Pulec
7868344056 vdisp/gl: parse_fmt - return bool
returning the pointer was a bit tricky - very slightly more correct but
needlessly more complicated
2025-08-28 09:38:09 +02:00
Martin Pulec
cefae84362 soundfont lookup (sdl,fluidsynth): fix dfl sf3 path
default path for default-GM.sf3 is in /sf3 subdir, not /sf2
2025-08-27 14:09:36 +02:00
Martin Pulec
6503b92f15 configure: do not prefer SDL2 over SDL3
Unpin SDL version 2 - SDL 3 can be now considered idempotent.

Issues mentioned in sdl3:
- sdl_mixer -> replaced with fluidsynth
- Vulkan issues - Vulkan is currently (SDL 3.20) not implicit in either
of platforms; if so, trigger a warning. Also it is unavailable in SDL2.
- p010 corruption in Direct3D 11 or 12 - there is already a workaround
to disable
2025-08-27 12:13:08 +02:00
Martin Pulec
02cefe8fd0 vo_cf/flip: remove swscale
added errorneously by IWYU
2025-08-27 12:12:26 +02:00
Martin Pulec
e9d6d6bd2f acap/fluidsynth: refuse unsupported ch_count/bps 2025-08-27 09:03:17 +02:00
Martin Pulec
d010528335 acap/fluidsynth: use usleep
+ remove todo in sdl3
+ add deprecate to sdl_mixer
2025-08-27 09:00:21 +02:00
Martin Pulec
9a738c906c add acap/fluidsynth
To replace sdl3_mixer that does no longer support MIDI playback, thus
unusable for our use case.

- song1 needs to be static included potentially from 2 compilation units -
this and sdl_mixer
2025-08-27 09:00:19 +02:00
Martin Pulec
755ee5158d IWYU some more files 2025-08-25 14:28:56 +02:00
Martin Pulec
4259998a9c vcap/screen_win: IWYU 2025-08-25 14:16:40 +02:00
Martin Pulec
d75951dd41 IWYU some more files 2025-08-25 14:16:38 +02:00
Martin Pulec
5755ce818f video_capture/*: IWYU 2025-08-25 13:01:54 +02:00
Martin Pulec
e79c688497 host: silence warns if libbacktrace not present 2025-08-20 14:31:52 +02:00
Martin Pulec
877ba7a7fa live555: move the compat macro to header
the typedef is needed in BasicRTSPOnlyServer.cpp as well
2025-08-20 14:28:11 +02:00
Martin Pulec
f170a505aa old live555 compat 2025-08-20 10:32:00 +02:00