Commit Graph

8457 Commits

Author SHA1 Message Date
Martin Pulec
e5d628cd79 lavc: added "safe" option
enables option for HW(-accelerated) decode compatibility:
* subsampling 420
* no intra refresh
* no interlaced DCT
2023-10-06 11:19:11 +02:00
Martin Pulec
000c8c0bdb lavc video help: cmdline print updates
* shorten lines
* print usage where can be seen that there is also fullhelp
2023-10-06 11:19:11 +02:00
Martin Pulec
e990318499 lavc video: handle incompatible subs as other features 2023-10-06 11:19:10 +02:00
Martin Pulec
8d6f622c6e video_compress_info::name no longer used
* removed unused function returning the name
* mark attribute as unused (so that it can be safely removed eg. with
next API change)
2023-10-06 11:19:10 +02:00
Martin Pulec
a68385ba23 vaapi: hide struct to .c file 2023-10-06 11:19:10 +02:00
Martin Pulec
a3edb01d45 HW frame to RAM transfer msg: lower to debug
Verbose messages should't be trigerred with every frame (if it is not
either an errorneous state or something we need the user to inform about).
2023-10-06 11:19:10 +02:00
Martin Pulec
11bf11c784 removed DPX10 pixfmt
Not used anymore by any module. Actually the Bluefish444 that seem to
have handled that doesn't advertise other codec than UYVY by get_property.
2023-10-06 11:19:06 +02:00
Martin Pulec
16fa09eebc debug-dump: print usage with "help" 2023-10-06 08:07:20 +02:00
Martin Pulec
b62566ca72 lavd: advertise accelerated codesc if probed
Advertise conversion to HW-accelerated codecs (eg. HW_VDPAU, RPI4_8)
only if probe (which now works in the same way as regular init since
HEAD^) would initialize to an accelerated codec.

This would prevent situations, when eg. `--param use-hw-accel=vaapi -d
gl` is used, in which case HW_VDPAU was selected as a display codec,
although not intended.
2023-10-06 08:07:19 +02:00
Martin Pulec
1c84e8d546 lavd probe: initialize in a same way as dec
We want rather mimic the actual initialization in the probe.

Also avoid errors like:
````
[lavc hevc @ 0x7f4b0c002700] A hardware frames or device context is required for hardware accelerated decoding.
[lavc hevc @ 0x7f4b0c002700] Failed setup for format vdpau: hwaccel initialisation returned error.
````
2023-10-06 08:07:19 +02:00
Martin Pulec
242581585b lavd probe: get properties from sw_pix_fmt
Currently, if probing, hw acceleration is skipped, but this will change
so this is done in preparation to this.

Also print in verbose mode now (it is now more useful to debug).
2023-10-06 08:07:19 +02:00
Martin Pulec
4f76857e5a lavd: print explicitly if hwacc not enabled
Previously, if '--param use-hw-accel' was specified but the hw
acceleration was not compiled-in, unknown parameter was reported.

This is not entirely acurate and can be a little misleading, rather
print that the support is not enabled directly.
2023-10-06 08:07:19 +02:00
Martin Pulec
df9e382381 lavd: print available HW accels on "help"
also check requested hw accel validity in init
2023-10-06 08:07:19 +02:00
Martin Pulec
2af4ace259 Reed-Solomon (zfec): fixed fec_new fail
With current zfec code, fec_init() needs to be called prior to fec_new(),
otherwise the later one returns NULL.

\+ updated submodule to the current zfec version (requiring fec_init();
but UG will compile with the older zfec version as well)
2023-10-06 08:06:05 +02:00
Martin Piatka
1cbb716198 vcap/pipewire: Buildable without screencast dbus portal stuff 2023-10-05 16:05:17 +02:00
Martin Piatka
4015350998 rtp: Exit with failure if FEC init fails 2023-10-05 16:05:16 +02:00
Martin Pulec
4c250bd274 lavc video: do not report "lavc" shortcut in caps
would be displayed twice in GUI otherwise
2023-10-05 15:05:36 +02:00
Martin Pulec
8e1f8905d5 lavc video enc: warn on interlaced DCT as well
see also previous commit
2023-10-05 15:05:36 +02:00
Martin Pulec
17fcd1bf44 lavc video: warn when auto-enabled intra-refresh
Warn in the same way as when non-4:2:0 video is encoded - intra refresh
might be problematic as well.

Do not warn if enabled explicitly (`:intra_refresh`).
2023-10-05 15:05:36 +02:00
Martin Pulec
fe004593a7 exit uv on wrong hwacc spec 2023-10-05 15:05:36 +02:00
Martin Piatka
14de9401b6 vcap/decklink: Fix not appearing in GUI 2023-10-05 15:03:23 +02:00
Martin Pulec
297661cd2a control_socket: fixed a leak
fixes CID 417382
2023-10-04 08:56:20 +02:00
Martin Pulec
87e0c61416 renamed video_rxtx hdrs from .h to .hpp
clang-tidy doesn't like naming C++ headers with .h
2023-10-02 08:44:17 +02:00
Martin Pulec
500fc0aeb1 video_rxtx: make API functions noexcept 2023-10-02 08:44:13 +02:00
Martin Piatka
a4d4aab9d3 CI: Patch ffmpeg svtav1 to not force keyframes
Forcing keyframes makes the low delay mode (no b-frames) unavailable
2023-09-27 18:51:09 +02:00
Martin Pulec
69a84d0b16 lavc video: increase # of tiles for rav1e and aom
Processors with 64 logical cores are quite common nowadays.

Not increased for libsvtav1 since it doesn't seem to improve performance
there.
2023-09-27 12:32:40 +02:00
Martin Pulec
5876326d5c lavc video: do not force IDR for libsvtav1
there is not such an option for SVT AV1
2023-09-27 12:32:38 +02:00
Martin Pulec
70a8c1e10c keycontrol: avoid mixing stdio and POSIX read API
getchar() must not be used to read a character when there are more than
one at once because otherwise won't next select() return and the key
will remain in the stdio buffer.

Fixed:
``
(sleep 2; printf '\x18M';  sleep 50 ) | ./build/bin/uv -s testcard -r alsa --param disable-keyboard-control=no
```
when the 'M' key was not processed immediately but just at the end of
the process.
2023-09-27 09:24:47 +02:00
Martin Pulec
123b2fa6fc keycontrol: override term check with param
Run the keycontrol even if 0 is not TTY with `--param
disable-keyboard-control=no`.
2023-09-27 09:24:47 +02:00
Martin Pulec
7fc14c3d51 control: added commands to (un)mute audio
In addition to already existing "mute", that toggled mutte for the
receiver, [un]mute-{sender,receiver} was added, which mutes or unmutes
the sender or receiver.
2023-09-27 09:24:47 +02:00
Martin Pulec
e4bcac7f84 audio msg processing: simplified
refactor only - removed unneeded branching (early return)
2023-09-27 09:24:43 +02:00
Martin Piatka
c4f6188a54 configure.ac: Rework Pipewire stuff
Split the common part out into its own section. Now all pipewire stuff
(audio cap/play, video cap/disp, screen_pw) can be disabled all together
with --disable-pipewire
2023-09-26 14:49:40 +02:00
Martin Piatka
cf342696c3 disp/pipewire: Put PID in node name
The node names should be probably unique
2023-09-26 14:48:28 +02:00
Martin Piatka
da1e7314ce disp/pipewire: Fix get_property 2023-09-26 14:48:28 +02:00
Martin Piatka
89b238c97c disp/pipewire: Fix warnings 2023-09-26 14:48:27 +02:00
Martin Piatka
2c4cc96799 disp/pipewire: Set stream fps as a fractional value 2023-09-26 14:48:27 +02:00
Martin Piatka
8f661305af disp/pipewire: Cleanup log msgs 2023-09-26 14:48:27 +02:00
Martin Piatka
b087074e2e disp/pipewire: Ensure in flight frame is freed.
The pipewire stream is explicitly disconnected so that pipewire calls
the remove buffer callback
2023-09-26 14:48:22 +02:00
Martin Piatka
d32cccce37 disp/pipewire: Add target option 2023-09-26 14:48:21 +02:00
Martin Piatka
4a17e8f3b5 disp/pipewire: Properly manage the memfd lifetime 2023-09-26 14:48:18 +02:00
Martin Piatka
aa6169555f disp/pipewire: Allocate our own buffers
Buffers are allocated as mmaped memfds, which allows the pipewire server
to use them without copying
2023-09-26 14:48:14 +02:00
Martin Piatka
d89dddfb4f disp/pipewire: Better dummy frame handling 2023-09-26 14:48:06 +02:00
Martin Piatka
157ebde4ba Initial pipewire display implementation 2023-09-26 14:48:05 +02:00
Martin Piatka
900765bbb0 pipewire_common: pw_fmt_from_uv_codec 2023-09-26 14:48:05 +02:00
Martin Piatka
4aec799813 vcap/pipewire: Fix format list
Apparently the preferred format needs to be specified twice (in the list
and as preferred)
2023-09-26 14:48:05 +02:00
Martin Pulec
aa6b079190 vidcap testcard: check audio frequency validity
* moved (some of) checking to separate function
* fixes CID 417257
2023-09-26 11:02:54 +02:00
Martin Pulec
4f362ac85f keycontrol interactive help: pretty-print
\+ render footnote at the end instead of inline
2023-09-25 16:29:04 +02:00
Martin Pulec
fe999cc666 restore TIO unconditionally
the check is perhaps unneeded - restoring twice won't hurt

More importantly, it didn't restore the TIO when sequence restore_tio()
-> set_tio() is called repeatedly. Concretely, entering interactive cmds:

1. Ctrl-X - unlock control
2. 'c' - one-time command mode
3. 'help<cr>' -
4. 'c' - one-time command mode
5. 'help<cr>' -

the second "help" was not echoed, because restore_tio() was called before
3, but second run of the function was not run. Moreover, after 5, the saved TIO
will be perhaps replaced by the curend one by set_tio().
2023-09-25 16:29:04 +02:00
Martin Pulec
8a50ff4d2e audio messages: rename MUTE->MUTE_TOGGLE
* the MUTE commands are actually mute-toggle
2023-09-25 16:29:03 +02:00
Martin Pulec
9c015f96ad audio control: refactorize a bit
Moved all audio commands handled by control socket to single function.
2023-09-25 16:28:48 +02:00