Commit Graph

7684 Commits

Author SHA1 Message Date
Martin Pulec
31ea569352 aplay/coreaudio: remove unneeded config*.h 2025-03-25 12:36:36 +01:00
Martin Pulec
cfca08b895 audio/playback/*: IWYU 2025-03-25 11:24:10 +01:00
Martin Pulec
ca93e7db8f wav_{reader,writer}: IWYU 2025-03-25 10:56:11 +01:00
Martin Pulec
c2116835da compat/platform_{pipe,semaphore}: IWYU 2025-03-25 10:56:10 +01:00
Martin Pulec
26ffbfded8 gl_common,glx_common: IWYU 2025-03-25 09:17:19 +01:00
Martin Pulec
e8cd71b259 vcap/import: IWYU + aligned_malloc compat 2025-03-25 09:17:13 +01:00
Martin Pulec
70903661f9 vdisp/dummy, x11_common: IWYU 2025-03-25 08:37:14 +01:00
Martin Pulec
d31f1e2797 vcomp/lavc version: print ver from run-time linked
Do print the runtime lavc version instead the one from headers, that
may differ (minor and patch only).
2025-03-25 08:20:42 +01:00
Martin Pulec
bef67b7879 acap/testcard, vdisp/dump: IWYU 2025-03-24 17:29:01 +01:00
Martin Piatka
5df5014708 disp/vulkan: Use generic FPS indicator 2025-03-20 13:29:07 +01:00
Martin Piatka
d523f96c77 disp/vulkan: Don't crash when image acquire fails multiple times
It is not uncommon for swapchain image acquire to fail multiple times in
a row e.g. when the user is continuously resizing the windown with the
mouse cursor. There is really no need to raise an exception and crash
the whole process.
2025-03-20 13:23:31 +01:00
Martin Piatka
f648c2753c disp/vulkan: Fix suboptimal swapchain handling
When vkAcquireNextImage() returns VK_SUBOPTIMAL_KHR it means that a valid
usable image was still acquired and that means that the
acquire_samaphore is pending and signalled as normal.

This means we cannot just recreate the swapchain and reuse it to acquire
an image from the new swapchain as VulkanDisplay::display_queued_image()
was doing, because the spec states that the semaphore must be unsignaled
and not pending.

The fix here is to render and display the suboptimal image as normal and
set a flag to immediately return swapchain_image_out_of_date to trigger
a swapchain recreation on the next frame.
2025-03-20 13:23:11 +01:00
ATrivialAtomic
17ffd5d986 compress/cmpto_j2k.cpp - Fixed missing template arguments in cuda_allocator declaration 2025-03-19 15:01:54 -04:00
Martin Piatka
c8ee20a854 vcap/testcard: Fix frames being limited to 0 by default
The capture_frames was initialized to 0 which together with changes in
commit 2d72943 meant that no frames were captured by default.
2025-03-19 14:45:09 +01:00
Martin Pulec
9f92e09602 removed another positional refs in printf format 2025-03-17 16:13:36 +01:00
Martin Pulec
724eaff424 parse_mtu: additional checks
Added additional number validitiy check (to newly created parse_number
function). Mainly to cover inputs like '1something'  where it should
not be parsed correctly as being 1.
2025-03-17 15:54:45 +01:00
Martin Pulec
84c3e5571d MTU size check: improved
Do not use positional references to printf format string, which is a
POSIX extension and not supported by Windows C library.

+ write the optarg string (in case that is only partionally parsed -
atoi stopped at first non-number)

refers to GH-437
2025-03-17 15:51:20 +01:00
Martin Pulec
283439b9fe aplay/portaudio get_supported_format: sort srates
Sort sampling rates for poraudio playback that are tested if the device
doesn't support natively the received sample rate.

Use lowest higher or equal sampling rate if possible, if not, use the
highest usable sampling rate.

Also remove note in qsort_s.h (no longer valid - can be included where
approopriate, not only before first inclusion of stdlib.h).
2025-03-17 15:51:20 +01:00
Martin Pulec
33915a7eae aplay/portaudio: add dev default sample rate
This complements the previous commit - add the device default rate to
list of rates, that are tested if work (obviously this one should work
by definition so that now testing the remaining sample rates shouldn't
take place).
2025-03-17 15:51:20 +01:00
Martin Pulec
4b2c6266e5 acap/portaudio: set device default rate
instead of hard coding 48 kHz, which may also fail as for VB-Matrix set
to 44100 Hz using ASIO

refers to GH-430
2025-03-17 15:51:20 +01:00
Martin Pulec
fd0771c9c6 prettier audio printout
- just 2 decimal points for secs
- print aggergate sample count with thousands delimiter
2025-03-17 15:51:17 +01:00
Martin Piatka
cda82b3af6 lavc: Include common hwaccel unconditionaly
Needed for create_hw_device_ctx() for vulkan hwframes. Shouldn't cause
any issues as lavd always includes this too.
2025-03-17 13:38:06 +01:00
Martin Piatka
206b05f180 lavc: Add AV_PIX_FMT_VULKAN to supported pix fmts 2025-03-17 13:09:21 +01:00
Martin Piatka
15ab076c4e lavc_common: Define HWACC_VULKAN if ffmpeg is new enough 2025-03-17 13:09:21 +01:00
Martin Piatka
7e110eac14 lavc: vk hwframe support 2025-03-17 13:09:00 +01:00
Martin Piatka
b8208e79d7 libavcodec: Vulkan pixfmt fix inverted ifdef cond 2025-03-17 13:08:59 +01:00
Martin Piatka
679e090900 disp/vulkan: Don't use yuv sampler if linear filter unavailable 2025-03-14 14:52:57 +01:00
Martin Pulec
be1ec3fa30 vcap/testcard: exit if frames=<n>q
added optional exit if testcard run with frames= limit
2025-03-12 16:52:16 +01:00
Martin Pulec
2d72943438 vcap/testcard: limit frames - fix number (was -1) 2025-03-12 16:46:55 +01:00
Martin Pulec
2a59b6d00f vcomp/lavc: prefer libvpx-vp9 if AVX2 !present
For VP9, libsvt_vp9 is preferrd (if built-in, which is in Linux builds),
but it compiles with AVX2 by default, so prefer libvpx if CPU doesn't
support that.
2025-03-12 13:58:04 +01:00
Martin Pulec
7bcaf24ffa vcomp/lavc: preferred encoder updates
- typo (prefered->preferrred)
- if callback defined but returned nullptr, ignore that
2025-03-12 12:46:11 +01:00
Martin Piatka
f4504e1f52 vulkan_context: Fix debug callback deprecation warn 2025-03-11 13:29:48 +01:00
Martin Piatka
caf774efcf lavc: Don't crash on missing codec opts
codec->priv_class could be null, fixes GH-435
2025-03-11 10:15:56 +01:00
Martin Pulec
1abc9d97aa portaudio_common: help shotcut words
'output channels' and 'input channels' is needlessly verbose, use abbrevs
+ IN 1st, out second
2025-03-07 15:50:34 +01:00
Martin Pulec
e0dd01ccaf CoInitializeEx: use COINIT_APARTMENTTHREADED
PortAudio/ASIO drivers seem refuse initialization if
CoInitilizeEx initialized as COINIT_MULTITHREADED but they do for
COINIT_APARTMENTTHREADED.

Windows devices that could be affected by this change tested and seem
to work, namely:
- DeckLink
- DirectShow
- WASAPI

refer to GH-430
2025-03-07 13:26:17 +01:00
Martin Pulec
b2e70a619e poraudio: print supported APIs in fullhelp
useful mainly to check ASIO presence in Win
2025-03-07 11:11:01 +01:00
Martin Pulec
dc80f7cb48 portaudio_common: include-what-you-use 2025-03-07 10:36:30 +01:00
Martin Pulec
850138ab59 set ug_options.audio.codec_cfg=nullptr
The commit b785c3d8 from 2024-08-05 changed the default unconditionally
to PCM, but this has been true just for UltraGrid RTP, not RTSP or SDP
that used MP3, so this change reverts it back.
2025-03-06 10:59:26 +01:00
Martin Pulec
06bb519cb3 messaging: include-what-you-use 2025-03-05 16:15:51 +01:00
Martin Pulec
4a085c6c6c vrxtx/rtsp: allow compressed stream passthough
If the input is already compressed, try to pass it further. Initialize
the compression just if receiving uncompressed data.

This is implemented in the same way as it already is in vrxtx/sdp.

refers to GH-433
2025-03-05 16:09:05 +01:00
Martin Pulec
1cb57d341e video_display: fix use ptr after free
video_display putf implementation may free the frame so that the pointer
is no longer valid upon the exit from the callback (or anytime later).
This is the case for eg. vdisp/decklink.

Fixes `uv -t testcard -c lavc -d dummy:discard` (wrong color in output
line):
```
[dummy] 126 frames in 5.03501 seconds = 25.0248 FPS
```

even though FPS is +/- the nominal 25. Depending on circumstances it
could have also easily crashed (access after free).
2025-03-03 13:56:03 +01:00
Martin Pulec
0349beb384 vdisp/dummy: add discard parameter 2025-03-03 13:53:52 +01:00
Martin Pulec
0dad02e66a acap/wasapi: fix alignment of loopback acap device 2025-02-28 14:53:11 +01:00
Martin Pulec
00fb576307 wasapi: fix setting dev by UUID
The mutibyte to wide character conversion was (perhaps since the
beginning) wrong - mbtowc converts just one character - it should have
beem mbstowcs but using rather mbsrttowcs (thread-safe).
2025-02-28 14:53:11 +01:00
Martin Pulec
be2b3dcb59 aplay/sdl_mixer: rev changes committed by mistake
Reverted unintentionally committed changes in in the previous commit.
2025-02-26 09:03:30 +01:00
Martin Pulec
b26ca14cb1 lavc get supported prop fix
There are some calls using just the codec_ctx
parameter, which fail (with the compat with
legacy FFmpeg).

eg. `uv -A Opus -s testcard` (using the old FFmpeg)
2025-02-25 23:37:54 +01:00
Martin Pulec
0307b9ca7a vdisp get_splashscreen: fixed assert
1. static_assert could not have been strictly speaking used (splash_width
is not constexpr), although it worked most of the time (except macports
clang-mp-14)
2. the assertion was actually inverted (but the equality is included
and is the case for both cases so both work)
2025-02-20 10:35:12 +01:00
Martin Pulec
925c9e5264 DeckLink: added more help for DeckLink IP
- example for IP-specific opts in capture
- hint in display to consult capture help
- help:FourCC - in help usage
2025-02-18 16:58:10 +01:00
Martin Pulec
abc30c2be9 PAM: rename depth to ch_count
The depth (DEPTH field of PAM) is actually channel count, which may be
slightly misleading - use rather ch_count instead.
2025-02-18 16:58:08 +01:00
Martin Pulec
484a5a0b09 testcard:mode= add fullhelp + sd 2025-02-14 09:51:18 +01:00