Commit Graph

11087 Commits

Author SHA1 Message Date
Martin Pulec
6feb734b15 vdisp/avf: print warn if no devices were found 2026-01-20 12:38:55 +01:00
Martin Pulec
84f560b97f move countof() def from macros.h to compat/c23.h
technically it will be C2Y but the c23.h can be perhaps used for both

in c++, std::size() is rather used

This fixes compilation of pano_gl, where its implementation
of countof clashes with the macro (leaked through
debug.h->color_out.h->utils/macros.h, which no longer contains that
define).
2026-01-20 11:10:06 +01:00
Martin Pulec
c758c38772 ARM CI: use NDI v6
With v5, NDI doesn't compile because of NDIlib_frame_type_source_change
missing. According to the NDI license, the most recent version should
be used, anyways.
2026-01-20 10:02:30 +01:00
Martin Pulec
2ee508522b configure: screen: if Linux&req=yes, require x11+PW
If --enable-screen is used in Linux without specifying explicitly
x11 or pipewire, require both. The user may need to have the PipeWire
implementation and end up with X11 or vice versa.

Also fix the check for implementation - checked X11 only if
--enable-screen=x11 (without PW) and vice versa for Pipewire.  But not
eg. --enable-screen=x11,pipewire.
2026-01-20 10:02:30 +01:00
Martin Pulec
747deae750 vcap/avf: disable remove ancient compat
we definitely wont comipile on OS X 10.8/10.9
2026-01-20 10:02:30 +01:00
Martin Pulec
afcf9131f5 vcap/avf: HD/VGA preset compat
those are no longer shown in help but make it work for backward compat
2026-01-20 10:02:30 +01:00
Martin Pulec
3ed0ec3751 vcap/screen: probe actual screens 2026-01-20 10:02:30 +01:00
Martin Pulec
80c5fdbb22 CI: reenable screen for macos-15-intel runner
AV Foundation backend now works
2026-01-20 10:02:29 +01:00
Martin Pulec
a9d4bb471f add screen capture with AV Foundation
Also changed configure.ac so that Pipewire screen cap requirements
are checked only in Linux (in other platform currently perhaps not
expected the use of Pipewire screen capture).
2026-01-20 10:02:29 +01:00
Martin Pulec
415ca23405 configure.ac: switch from Darwin vers. to macOS
The actual Darwin version was actually matched to corresponding macOS
version so use those directly.
2026-01-20 10:02:29 +01:00
Martin Pulec
d31244d3a5 vcap/avf: allow screen cap init by name
as listed in help
2026-01-20 10:02:29 +01:00
Martin Pulec
7597e2893f vcap/disp: set the preset directly
set the given <preset> as AVCaptureSessionPreset<Preset> (first letter
converted explicitly to upper-case for backward compatibility when there
has been "low" option not "Low")
2026-01-20 10:02:28 +01:00
Martin Pulec
90a1335ec8 vcap/avf: do not set preset
If the desktop is 2880x1800, the main profile would capture 480x300, which
is perhaps unexpected - even though the resolution doesn't necessarily
need to be native, 480x300 is perhaps too small. For the FaceTime HD Camera
480x360 so it is better to keep the default (deskotp native, FaceTime 720p).
2026-01-20 10:02:28 +01:00
Martin Pulec
2a73f9e2c5 vcap/avf: add screen ident by uid 2026-01-20 10:02:28 +01:00
Martin Pulec
f6bed5eb50 vcap/avf: allow screen cap default fallback
if no video devices available, use screen capture if device unspecified
2026-01-20 10:02:28 +01:00
Martin Pulec
912942cb0d vcap/avf: use autorelease pools
For objects like returned by `[[device uniqueID] UTF8String]` not to leak.
2026-01-20 10:02:28 +01:00
Martin Pulec
413bf5d18d vcap/avf: help improvements
- suggest also AVCaptureSessionPreset1920x1080
- do not advertise HD - it was actually 720p, users may expect 1080p
(but still allow the setting)
- updated examples - added the "long" preset option, some opts now
use shortcuts
2026-01-20 10:02:27 +01:00
Martin Pulec
1ba58a4862 vdisp/avf: allow arbitrary preset
eg. AVCaptureSessionPreset1280x720
2026-01-20 10:02:27 +01:00
Martin Pulec
ff46eb9ef3 vcap/avf: do not use VLA
Since the module is currently written in Objective-C++, clang complains
about use of VLA (but just a warning).
2026-01-20 10:02:27 +01:00
Martin Pulec
e3162f8732 vcap/avf: print captured format + set preset 2026-01-20 10:02:27 +01:00
Martin Pulec
f9fad513c7 configure.ac: document CUDACXX env var
just as an alternative to CUDA_PATH for now
2026-01-20 10:02:27 +01:00
Martin Pulec
04d9bc8474 vcap/avf: initial support for screen capture
vcap/avf: fix device index in help
2026-01-20 10:02:26 +01:00
Martin Pulec
f7fad8fbeb vcap/avf: use generic indicator + early return 2026-01-20 10:02:26 +01:00
Martin Pulec
650cfec2b1 NDI v5 compat
honor the USE_NDI_VERSION

+ notice how to set this to configure.ac
2026-01-20 10:01:31 +01:00
Martin Pulec
87789be182 fix @^^: missing test 2026-01-19 12:21:02 +01:00
Martin Pulec
e5f61f655a CI Linux FFmpeg: updated SVT-HEVC patch
SVT-JPEG-XS has been merged, which was causing the conflicts
2026-01-15 14:48:20 +01:00
Martin Pulec
ea93cbe022 configure.ac: accept also CUDACXX for nvcc
Primarily used by CMake but if no nvcc was found, we can try this as well.
2026-01-15 13:23:11 +01:00
Martin Pulec
6c83b6de8a configure.ac: honor default DELTA install in Win
+ fix $DELTACAST_DIRECTORY not being honored in Windows since @^2
2026-01-15 10:58:03 +01:00
Martin Pulec
e8076ae690 deltacast_dv: fixed wrong message 2026-01-14 16:43:36 +01:00
Martin Pulec
11d52756ff configure: fix current Delta Linux paths
preset also DELTACAST_PATH to /usr to allow build with VideoMaster distro pkg
2026-01-14 16:43:34 +01:00
Martin Pulec
b71b9231c1 from_lavc_pf_priority: do not advertise HW_VDPAU
This is handled differently and may trigger unexpected decode to HW_VDPAU
if gl display advertises that, eg. `uv -t testcard -c lavc:c=MJPG -d gl`.

This fixes the commit 647d8627 (2025-06-25) that unintentionally
enabled that.

The HW accel is hanndled actually separately ahd snouldn't be "enabled"
in this way.
2026-01-13 16:50:27 +01:00
Martin Pulec
c9f52b5483 vdisp/sdl3: remove leaks if init fails
not much important but reported by Coverity (CID 899144)
2026-01-13 15:05:36 +01:00
Martin Pulec
45e2cdbe14 vdisp/gl: FEATURE_PRESENT simplified
strcmp not actually required, just compare first char (1 or '\0')

Mentioned by CID 899145 (pointless comparison, after preprocesor
expansion) but most likely won't fix that (but doesn't need to be fixed,
anyways).
2026-01-13 14:57:50 +01:00
Martin Pulec
8eac41a61f main: docu 2 env vars in fullhelp
NDILIB_REDIST_FOLDER and NV_OPTIMUS_ENABLEMENT (added recently; Win only)

the others env vars used by UG are not much important for regular users
2026-01-13 11:07:53 +01:00
Martin Pulec
0412738a68 [Win] set NvOptimusEnablement=0 (or by env var)
- fixes the SPOUT capture with NVIDIA Optimus
- renderer for Vulkan seem to still use NVIDIA for 10 bit rendering
(-t testcard:c=R10k:patt=gradient2)

refers to <https://github.com/CESNET/UltraGrid/issues/487>
2026-01-13 11:06:25 +01:00
Martin Pulec
c3cff06095 CI Win: temporarily revert to Spout 2.007.016
refers to <https://github.com/CESNET/UltraGrid/issues/487>
2026-01-13 10:52:25 +01:00
Martin Pulec
c8c3317f59 module: set locl/unlock level to debug2 2026-01-12 16:23:40 +01:00
Martin Pulec
d21d343201 spout: adjust log levels
- the fatal/error/warning was off-by-one, should have been "6 -" to match
corresponding Spout log levels, but:
- made the fatal/error/warning mapping explicit, anyways
- use SPOUT_LOG_WARNING for both UG NOTICE and INFO - the previous
SPOUT_LOG_NOTICE is a bit chatty during init, so:
- UG VERBOSE - use the Spout notice
2026-01-12 12:59:02 +01:00
Martin Pulec
b090bf1a08 spout: enable logging
It seems like SPOUTLIBRARY::EnableSpoutLog() must be also executed to
actually enable the logging.

Note that there also exists SPOUTLIBRARY::OpenSpoutConsole(), which seems
to be intended to open a standalone logging window but it didn't open
when just executed between EnableSpoutLog().

As the logging is mainly intended to be output to the console window, it
seems like when issed just EnableSpoutLog() it is dumped to the
stdout/stderr, which is just what we want in UG.
2026-01-12 12:27:29 +01:00
Martin Pulec
916fe1bd78 vdisp/spout: ensure state created unless probing
The check is there just to be sure - I didn't come across the situation
when GetSpout returns nullptr. But if so, it is undesirable to crash
(as it was until now) in _probe.
2026-01-12 12:16:32 +01:00
Martin Pulec
b300fa64f4 CI Win: use pre-built Spout
instead of building own Spout, use pre-built release on GH

This actually reverts the commit b98b5ab0 from 2023-11-06.
Date:   Mon Nov 6 09:08:46 2023 +0100
2026-01-09 15:29:01 +01:00
Martin Pulec
1029a58821 vdisp/gl: process_r10k: ensure proper alignment
fix an alignment warning - check by assert and cast over (void *)
2026-01-09 15:11:14 +01:00
Martin Pulec
428188b01d vdisp/gl: issue the 10+ warning just if the case
If receiving >8 bit but not displaying, do not display it (the warning
in added previous commit is rather applicable).
2026-01-09 12:50:15 +01:00
Martin Pulec
91c9c3380b vdisp/gl: warn if recv depth higher than mode
gl_load_splashscreen moved below because it issues reconfigure, while the
s->mode_depth not yet set to actual value, so not to issue misleading msg.
2026-01-09 12:47:34 +01:00
Martin Pulec
6caf38c214 vcap/ndi: handle NDIlib_frame_type_source_change
to suppress a warning - just print a notice

Not sure when it occurs - if source identity has changed, we would
perhaps stop receiving the stream. Or maybe there is some notice and
NDI handles that automatically? If some action is required, the notice
may help in a bug request.
2026-01-09 12:12:13 +01:00
Martin Pulec
d73eceab5b vdisp/gl: help+platform fixes
- suggest that platform= may preceed (full)help - in this case, in fullhelp,
the mode list may differ in X11 than in Wayland
- according to this, warn if something is after "[full]help" - eg. user
may mistakenly set "fullhelp:platform=x11", which won't work since the
platform has not yet been parsed when gl_show_help() executed
2026-01-09 12:06:36 +01:00
Martin Pulec
ef076c757a vdisp/gl: run glfwInit after init hints set
+ no longer store the init hints in the dictionary but set them directly
+ call the glewInit in help - this allow the output to be aligned with
selected platform, eg. `-d gl:platform=X11:fullhelp` lists X11 oonitors

Note that on wrong cmdline opt. glfwTerminate is called without prior
glfwInit in _dene but it doesn't seem to be causing problems so far.
2026-01-09 12:06:36 +01:00
Martin Pulec
8513192c6a vdis/gl: use dictionary for hints
+ do not use map, min, vector
2026-01-09 12:06:36 +01:00
Martin Pulec
754a78f664 vdisp/gl: autohide - use time_ns_t 2026-01-09 12:06:36 +01:00
Martin Pulec
0476362886 vdisp/gl: common tex_disp setting
factor out common setting properties of texture_display
2026-01-09 12:06:35 +01:00