- if unsufficient number of channels, do not print Result (irrelevant - success)
- print the actual configuration of bidir channels if succeeded (as in SDK
example); increase verbosity to INFO (may be userful/important for user)
- redundant "bidirectional" if not succeeded
apply early return to simplify the code flow
Mostly only the refactor with these changes:
- log_msg -> MSG
- if IsBiDir and there is sufficient number of channels - print that we
don't have the mapping instead of the first message that was (incorrectly)
printed before
GETCH - return always -1 on error, not -1 when read returned 0 and -2
if -1 - the actual value doesn't seem to be checked by any of caller.
CID 472180 should be perhaps fixed
- fixed a leak of s->devices (CID 472157)
- fix partial display_done (when eg. second device from 2 fail to init,
do not call the vidcap_done on this - assumes non-NULL)
- remove s!=NULL after assertion on that
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.