This makes sure that pipewire always gets a steady stream of samples,
even when we're not receiving anything. This prevents the error count in
pw-top skyrocketing when the sender stops sending.
Even if no devices were found, print the help and empty list of
devices. Without that, it would be missleading because the help shows
nothing.
Print the empty list ("Available deviviecs:" with nothing) also for
acap/jack to make clear that there are actually no devices.
improves 8597f39b
see the previous commit
This changes the manual handling introduced by the commit 925db63e. Also
$FEATURES are not passed explicitly as added in the commit 9eb29225.
Fix leaked frame when decode failed - this is a dumb regression introduced
with the commit b52bf7b9 (2024-09-23) by inverting the condition.
also CID 152946
Frame type (I/P/B) is already printed in debug so add also frame flags
which may be useful (eg. for the recent x265 intra-refresh decode
fix 6d2ab24b - flag indicates corrupted frame all the time, which
may or may not be an incorrect behavior from hevc decoder; but doesn't
matter for us, anyways).
Also use MSG(), which also has a advantage that if log_level not met,
it is not evaluated.
linux/videodev2.h is part of kernel headers and is usually present
But if it isn't, do not compile the stuff - there are defined the macros
that are required to compile.
The aggregate packets with less than 2 aggregation units are prohibited
by the RFC 6184/7798 and since we must receive the whole UDP packets,
this should not happen (unless UDPlite would be used). But we could
perhaps expect broken encoder (this is std transmission).
Retestd with MJPEG, VP9, AV1 and HEVC and except the first one all
(AV1 is indecisive) seem to produce better results. Tested with:
```
tc qdisc replace dev lo root netem loss 0.1%
uv -t testcard:patt=text:s=1280x720 -c lavc:c=CODEC -d gl
```
and with `--param lavd-accept-corrupted[=no]`
Namely HEVC seem to produce significantly better results (often avoiding
the intra refresh wave).
This may be revided later (HW decoders, disabled intra refresh with
H.265 and so).
Fix decoding of HEVC streams with intra-refresh and current Git FFmpeg
code. When intra-refresh is enabled and we are not catching the first
frame, no frame will be decoded without the flag
AV_CODEC_FLAG_OUTPUT_CORRUPT. This corresponds with FFmpeg commit
bc1a3bfd (2025-02-20), not yet included in current 7.1.1 / lavc 61,
should appear in lavc 62.
Steps to reproduce:
```
uv -t testcard -c lavc:e=libx265 -d gl
```
the behavior is now very slightly modified but effectively the same,
eg. change 1 to 3 channels copies now channel 0 to 1 and then 1 to 2
(before it copies 0 to both 1 and 2).