Commit Graph

9782 Commits

Author SHA1 Message Date
Martin Pulec
970475c3f5 video_decoders: rm libavcodec/defs.h inc by mistake
Added unintentionally with IWYW but the older versions of
libavcoded didn't have the header (and had it included directly in
libavcodec/avcodec.h that is included later).
2024-09-24 08:11:00 +02:00
Martin Pulec
264d40af94 RTP: print bound ports in verbose
Until now, in verbose mode was printed the dynamically selected port
pair. But the knowledge should be useful also to ensure the ports where
it doesn't need to be clear, eg. in server mode or for receiver to see
that 5004 is indeed bound.
2024-09-23 14:11:08 +02:00
Martin Pulec
c572e20959 vdisp/sdl2: removed param sdl2-r10k
It didn't seem that R10k worked for anyone before 18th Sep (commit
3c9e2602) because bit shuffling is needed (r10k_to_sdl2()).

Also the negative meaning (=no), which has been added just in the last
week commit can be replaced with '--param decoder-use-codec='!R10k'`.
2024-09-23 14:11:07 +02:00
Martin Pulec
ccfbd9b03b video_decoders: allow display codec blacklist
using param decoder-use-codec with an exclamation mark
2024-09-23 14:11:07 +02:00
Martin Pulec
b52bf7b991 video_decoders: improved including 2024-09-23 14:11:07 +02:00
Martin Pulec
36d5affe8e video_decoders: use PADDING not MAX_PADDING
But set the padding as the maximum of AV_INPUT_BUFFER_PADDING_SIZE
(if there is include) and MAX_PADDING (both are currently 64).

Use __has_include() instead of HAVE_LIBAVCODEC_H.
2024-09-23 14:11:03 +02:00
Martin Pulec
d794c28b2d Makefile mac: get rid of error (non-fatal)
get rid of an error:
`cp: uv-qt.app/Contents/Frameworks: Not a directory`
2024-09-20 16:09:44 +02:00
Martin Pulec
e1b37950ca vcap/aggregate: improved includes
avoid including config*.h
2024-09-20 16:09:41 +02:00
Martin Piatka
8c3af01e08 GUI: Show placeholder text for video & audio bitrate 2024-09-20 15:33:22 +02:00
Martin Piatka
2798cfb5f8 capabilities: Report placeholder text for codec options 2024-09-20 15:33:22 +02:00
Martin Pulec
64ee8a2f48 macOS build: fixed crashing build
the build fails after switch to macos-13 on manual page generation:
```
dyld[41003]: Symbol not found: __Z11IsRGBFormat21NTV2FrameBufferFormat
  Referenced from: <2945C378-5453-3610-9AA4-63E2723BBA5D> /Users/runner/work/UltraGrid/UltraGrid/bin/uv
  Expected in:     <no uuid> unknown
Could not obtain data from UG/reflector output!
make: *** [uv.1] Error 3
make: *** Waiting for unfinished jobs....
```

which tries to run bin/uv with --fullhelp.

(this fails only if run within the script data/make_man.sh, not when run directly)
2024-09-20 14:15:54 +02:00
Martin Pulec
e1c747e966 CI mac: use macos-13
macOS 12 is no longer supported and as Homebrew has a policy, that it
compiles packages from sources on unsupported macOSes, it is needed to
switch to newer macOS to keep reasonable build times.
2024-09-19 16:18:59 +02:00
Martin Pulec
69523f960e configure.ac: cmpto_j2k - add cudart if used
add -lcudart to the libs if CUDA is used for the conversions
2024-09-18 16:22:24 +02:00
Martin Pulec
7b70622b2a configure.ac: disable screen cap in macOS 15
macOS 15 drops support for the API we used for the screen capture in
favor of ScreenCaptureKit, the error is:
```
src/video_capture/screen_osx.c:109:28: error: 'CGDisplayCreateImage'
is unavailable: obsoleted in macOS 15.0 - Please use ScreenCaptureKit
instead.
  109 |         CGImageRef image = CGDisplayCreateImage(s->display);
      |                            ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:383:33:
note: 'CGDisplayCreateImage' has been explicitly marked unavailable here
  383 | CG_EXTERN CGImageRef __nullable
  CGDisplayCreateImage(CGDirectDisplayID displayID)
```
2024-09-18 16:03:49 +02:00
Martin Pulec
58aad91adf configure.ac: pkgconf compat improved
pkg.m4 macro from pkgconf since 2.3.0 aborts by default if PKG_CONFIG
is not found, which check implicitly for pkg-config. Thus set
ACTION-IF-NOT-FOUND to allow fallback check for pkgconf.
2024-09-18 16:03:47 +02:00
Martin Pulec
be0b38e647 vdisp/sdl2: handle R10k as other pixfmts 2024-09-18 16:03:43 +02:00
Martin Pulec
3a238de998 vdisp/sdl: R10k conversion optimized
Create inner loop with fixed amount of iterations (16). This will allow
the compiler to unroll the inner loop and vectorize (16 iterations per
4 bytes is 512b allowing up to 512b instructions).

The eventual rest (%16 != 0) is computed per pixel as it used to be..
2024-09-18 14:35:48 +02:00
Martin Pulec
70e169db3f utils/misc: improved including 2024-09-18 14:35:48 +02:00
Martin Pulec
3c9e260240 vdisp/sdl2: enable R10k
Seem to be working now (but requires a byte swap for the R10k pixels
values).

refer to GH-412
2024-09-18 14:34:57 +02:00
Martin Pulec
7b3953615b vdisp/sdl2: putf - early return on poison pill 2024-09-18 10:30:56 +02:00
Martin Pulec
77d243f931 AppRun: fix libwayland* not found condition
(commit HEAD^^^)
2024-09-17 15:07:41 +02:00
Martin Pulec
78fa125ff8 vdisp/sdl2: if [WAYLAND_]DISPLAY undef, use KMSDRM
If neither DISPLAY nor WAYLAND_DISPLAY environment variable is defined,
set driver=KMSDRM by default in Linux.
2024-09-17 14:37:51 +02:00
Martin Pulec
0b261533c8 AppRun: added APPIMAGE_DEBUG + use for libwayland*
Replace FIREJAIL_DEBUG with APPIMAGE_DEBUG and use it to debug printf
that we are using bundled libwayland*.
2024-09-17 14:09:10 +02:00
Martin Pulec
8a58843b7c AppRun: use bundled libwayland* only if needed
Besides the original check (-n $WAYLAND_DISPLAY), do not use the bundled
libraries also when there are the libwayland* in system (so not needed).

This allows `uv -d sdl:driver=KMSDRM` even from console when
WAYLAND_DISPLAY is not defined but Wayland is run in a different session.

If the WAYLAND_DISPLAY is defined but the not all libwayland* are found
in the system, now the bundled version is used (changed- was not
previously).
2024-09-17 13:59:21 +02:00
Martin Pulec
e2ff36750e vdisp/sdl2: accept opt prefixes 2024-09-17 12:07:09 +02:00
Martin Pulec
5546f5c904 vdisp/sdl2: accept (and prefere) renderer name
Accept renderer option given by a name in addeition to the index (which
is still supported but no longer preferred/advertised).
2024-09-17 11:57:34 +02:00
Martin Pulec
eacf6bf8a5 vdisp/sdl2: check renderer range 2024-09-17 11:37:04 +02:00
Martin Pulec
0621d8e938 vdisp/sdl2: handle splashscreen reconf err
If the SDL display reconfiguration fails for some reason when setting
the splashscreen, the display freezed at subsequent _getf.
2024-09-17 10:26:06 +02:00
Martin Pulec
cb1fe717c1 vdisp/sdl2: print version in help 2024-09-17 10:24:31 +02:00
Martin Pulec
c05a49a596 vdisp/sdl2: correct includes 2024-09-17 10:24:27 +02:00
Martin Pulec
73a5b0f552 vdisp/sdl2: call SDL_VideoInit before SDL_Init
In order to the initialize the option `driver=` successfully the video
subsystem must be called with the driver name (SDL_VideoInit), not with
SDL_Init[SubSystem].

This allows eg. `-d sdl:driver=KMSDRM` to be used.

Also use the driver in show_help (for `-d sdl:driver=KMSDRM:help`),
otherwise will SDL_Init() in help complained that "x11 not available".

refers to GH-412
2024-09-16 16:28:08 +02:00
Martin Pulec
81e6766594 rtp/audio_decoders: include-what-you-use
improved including

+ include guard to the header
2024-09-16 16:28:08 +02:00
Martin Piatka
3385323173 CI: Disable drm disp for x86 builds 2024-09-16 16:03:29 +02:00
Martin Pulec
95ae4c0616 invalid_arg_is_numeric: handle also macOS
std::invalid_argument::what() returns in macOS the string:
"stoi: no conversion"
2024-09-13 15:35:44 +02:00
Martin Pulec
ef0cd7130d unify stod/stoi invalid_argument::what parse
This is a hack to check whether given invalid_argument message belongs
to stoi/stod. It is usually used to catch non-numeric user input where
a number was expected.
2024-09-13 15:35:44 +02:00
Martin Pulec
ab25c2d1fc audio volume format: delimiting '/' unformatted
it very slightly helps readibility
2024-09-13 15:35:44 +02:00
Martin Pulec
86e218f40a audio/utils: improved including 2024-09-13 15:35:44 +02:00
Martin Pulec
6aed0ee771 audio: unify volume statistics formatting 2024-09-13 15:35:42 +02:00
Martin Pulec
414a333041 vcomp/cmpto_j2k: print CUDA support in usage 2024-09-13 15:23:33 +02:00
Martin Pulec
1e9d6ded84 vcomp/cmpto_j2k: add units to summary
In the previous commit just SI prefixes were printed.
2024-09-13 08:26:29 +02:00
Martin Pulec
db348ae9e5 vcomp/cmpto_j2k: print used parameters 2024-09-12 16:35:58 +02:00
Martin Pulec
0a8467b01f vcomp/cmpto_j2k: print opt hint in help
+ use unit_evaluate_dbl (instead of unit_evaluate) - **also** in decompress
2024-09-12 16:35:57 +02:00
Martin Pulec
ff1d9f3e9f vcomp/cmpto_j2k: accept opt prefixes 2024-09-12 16:35:57 +02:00
Martin Pulec
dfda8de842 vcomp/cmpto_j2k: advertise -O j2k-enc-cpu-conv
The GPU conversion should be better choice in general. The situation
where it can be useful is when the GPU is working hard to manage the
compression alone so that deploying on CPU saves some performance for
the encoder.
2024-09-12 16:35:57 +02:00
Martin Pulec
34b6ffbaa7 configure.ac: lavc cuda conv check improvement
- assume the feature, not cuda, when ensuring
- improved the message what can be wrong
2024-09-12 16:35:57 +02:00
Martin Pulec
92565ca2ae vcomp/cmpto_j2k: run GPU conv as prepreprocess
Set the pixfmt conversion CUDA kernel as cmpto_j2k_enc preprocessor,
not run directly.

This also eliminates to need to have the conversion kernel if conversion
is needed - CPU conversion will be sufficient. Currently not effective,
only R12L is converted for which there is the kernel.

refer to GH-406
2024-09-12 16:35:41 +02:00
Martin Pulec
caacebca37 vcomp/cmpto_j2k: allow late (lazy) initialization
Initialize the encoder stuff in configure_with, not _init.

It will allow the encoder parameter changes during the
reconfiguration. This will, however, require additional syncrhonization
and cleanup on the reconf.

There is no functional change in this commit but it changes the internal
behavior, namely the codec state is destroyed on reconfiguration and
newly created.
2024-09-12 15:06:00 +02:00
Martin Pulec
9b9105f6ae tx audio R-S warning: use the correct max_len
The data_len var used to compute packet_count may be lesser than its
initial value (tx->mtu - hdrs_len) because it might have been decreased
to number of remaining bytes of the last packet.

Returned back data_len to the do-loop and compute the value as
max_len.
2024-09-11 15:28:30 +02:00
Martin Pulec
8ff8a78592 tx audio: warn if Reed-Solomon is inadequate
refer to GH-408
2024-09-11 14:48:52 +02:00
Martin Pulec
215b823861 Reed-Solomon: add defaults for audio
For unsompreesed audio, where it has only the advantage, set default
R-S values to k=160 n=240 (50 % redundancy).

For uncompressed audio, the number of packets per frmae start at 3
(for 16-bit 30p), for which the value is appropriate. Not for the
audio captured at 60 Hz, however. Here it, is 1600 B with 16-bit samples,
with the R-S FEC this yields 2 packets only.
2024-09-11 13:11:09 +02:00