Commit Graph

10611 Commits

Author SHA1 Message Date
Martin Pulec
c31e1ffbcc control_socket: use logger instead of fprintf
- the errors will be red
- prefixed by MOD_NAME
2025-06-17 11:37:30 +02:00
Martin Pulec
497d6f5b17 fix other occurences of missing NL 2025-06-17 11:37:30 +02:00
Martin Pulec
9230adc0e3 border: fix " terminating line instead of NL" 2025-06-17 11:37:30 +02:00
Martin Pulec
32b1ff43c8 poraudio_common: error: print non-valid index
+ add missing NL
2025-06-17 11:37:29 +02:00
Martin Pulec
c931a78df3 net_udp: add NL to Win error hint
The space there might have been intentionally assuming the subsequent
hint but if not shown, the line was not terminated. It doesn't hurt
to have it on saparate lines even though.
2025-06-17 11:37:29 +02:00
Martin Pulec
2ca38e7c05 recompress: fix compress_done use
Reflects the commit 0557730f (from 2024-03-08) that replaced generic
module deleter with compress_done().
2025-06-16 14:33:54 +02:00
Martin Pulec
7d53ff95c4 vcomp/lavc/amf: fixed auto header insert for H264
The commit 87378965 from 2024-07-10 has actually broken this because
the header_inserter_req value changed in temporary struct since that,
not in the one that is stored in state.

Fixed by adding the actual value, alongside the _req value in parameters.
2025-06-13 11:38:19 +02:00
Martin Pulec
55712e2d97 vcomp/lavc: module_done
Since the commit e056d786 (2025-06-03) it needs to be called because
the parent no longer calls that.
2025-06-13 10:21:08 +02:00
Martin Pulec
5e54e7838f download-gh-asset.sh improved
fix the situation when most recent release doesn't include the asset
matching the patern (but some other does)

notes:
- the assets are included directly in /releases, no need for subsequent fetch
- use -e to fail jq if the result is null
- $pattern doesn't need to be anchored
2025-06-12 10:04:03 +02:00
Martin Pulec
933d0d0374 pam,y4m: backported from GPUJPEG
i18n support - UTF-8 file names

Unfortunately won't be useful for UltraGrid so far - it is perhaps not
possible to pass UTF-8 encoded arguments from commmand-line unless using
`wmain (int argc, wchar_t *argv[])` main function prototype (for more
info see GJ GIT log).
2025-06-12 08:05:55 +02:00
Martin Pulec
2b9b642023 GH scripts: import back from GPUJPEG
import improvements from GPUJPEG - summary:
- LABEL - replace ' ' with %20 (will get to URL)
- use while instead of for..seq
- cat json file directly (avoid interpretting \n and \r that XSI-compilant
echo, as in dash, does)
- cat really the $json file, don't print its name
- wrap long lines + early return in while-loop

The rewrite of `for n in \`seq` may be perhaps a bit controversal
(with while is less readable) but technically POSIX doesn't specify the
seq comand.
2025-06-11 13:16:03 +02:00
Martin Pulec
227c6d1e01 acap,aplay/portaudio: print index hint just if numeric
If given by name, the info was that the invalid index was -2, which is
an internal value. The message that a device with given name could not
have been found is already printed.
2025-06-04 15:42:18 +02:00
Martin Pulec
d21c44c737 portaudio: allow also case insensitive substr 2025-06-04 15:42:16 +02:00
Martin Pulec
3080fe33ba portaudio: add examples 2025-06-04 14:38:21 +02:00
Martin Pulec
e2d98a250f portaudio_select_device_by_name: improve selection
return available device in this order:
1. exact match; if not found, then:
2. prefix match; if not found, then:
3. any substr match
2025-06-04 14:11:02 +02:00
Martin Pulec
90e1dce1f6 portaudio: selection by name - filter out unusable
do not return not usable deviecs - eg. "Microsoft Sound Mapper" doesn't
return "Microsoft Sound Mapper - Input" device if playback wanted but
"- Output" one.
2025-06-04 14:10:59 +02:00
Martin Pulec
8039c9d7c7 snprintf_ch truncation warning: surround with NL
Since the warning is not hightlighted with any color, surround with NL
to catch visual attention.
2025-06-04 12:57:05 +02:00
Martin Pulec
963934ef10 portaudio help: print only relevant ch direction
for capture, print just max available input channels (and vice versa)

print both in fullhelp
2025-06-04 12:42:02 +02:00
Martin Pulec
75e1778fac macros/snprintf_ch: handle cert-err33-c warn
Handle clang-tidy cert-err33-c warning that output of snprintf is not
used. The return value should be used to handlet truncation  - it is
hard to handle this generically but we may issue at least a warning.
2025-06-04 12:40:24 +02:00
Martin Pulec
edfee4c032 portaudio: dev listening - more compact details
In the device names, there are often too much text so reduce the text
added in order to improve readability.
2025-06-04 12:05:42 +02:00
Martin Pulec
50081d5457 vcomp/cmpto_j2k: set_pool - specialization to tech
It is tech-dependirg (specifically CUDA has a bit complex handling)
so move it there.
2025-06-04 11:13:31 +02:00
Martin Pulec
e056d786f1 video_compress: module state changes to void *
The internal state of compression module is now simply (void *) as in
other modules. The (module *)-typed vesion was actually unnecessary
because except lavc, no module reads messages. Also the idea of universal
API with struct module didn't make it in the end.

This complements the commit 0557730 that did simlarly for external
vcompress API.
2025-06-04 11:13:26 +02:00
Martin Pulec
92e1c508aa utils/macros: include string.h
required for IS_KEY_PREFIX
2025-06-04 08:17:21 +02:00
Martin Pulec
b0ec1dc765 Merge pull request #459 from benroeder/fix-spelling-errors
Fix spelling errors throughout codebase
2025-06-04 08:14:02 +02:00
Martin Pulec
4d32b60173 Makefile: DeckLinkAPIDispatch: fix out path
fixes the commit db3cef98 (22-05-2025) that broke out-of-tree builds if
DeckLink was enabled
2025-06-03 10:47:06 +02:00
Martin Pulec
023991ddf5 vcap/rtsp: suppress arg type warning
libcurl has some weird typecheck that triggers a warning if argument of
type int is passed to long
2025-06-03 10:19:59 +02:00
Martin Pulec
4051e20891 video_compress: move compress_init_t below
In the header, first is external API and then internal (explicitily)
so moved it the right place.

updated @file doxy a bit (is for ext+int API)
2025-06-02 16:22:43 +02:00
Martin Pulec
43f589a6c6 vdec: missing nl for verbose msg 2025-06-02 16:22:40 +02:00
Martin Pulec
ff9d9ef9f0 Merge pull request #458 from ATrivialAtomic/cmpto-j2k-lossless
cmpto_j2k: vcomp/vdec lossless additional features/cleanup
2025-06-02 11:53:49 +02:00
Ben Roeder
a62fe80c3f Fix spelling errors throughout codebase
Corrected various spelling mistakes in comments, documentation, and
variable names across the project. Changes include:
- Documentation files (CONTRIBUTING.md, README.md, etc.)
- Source code comments in C/C++ files
- Function parameter names and descriptions

No functional changes were made.
2025-06-01 18:03:40 +01:00
Martin Pulec
b899dbeec7 configure.ac: replace numeric expr with test
the operator <= actually did just lexicographic compare for number eg
2.1 - compare just major version now
2025-05-30 15:23:20 +02:00
Martin Pulec
2634e6379c configure.ac: compat with expr not accepting --
eg. busybox v1.37.0 expr doesn't support -- allthough it is required [1]

prefix args 'x', which should be equivalent for opeartor :

improves commit b2932247 (22th May 2025)

[1]: https://pubs.opengroup.org/onlinepubs/9799919799/utilities/expr.html
2025-05-30 15:12:36 +02:00
Martin Pulec
4feb079faf config_unix.h: fixes
correct headers is fcntl.h not sys/fcntl.h (redirected, but triggers
warn with musl)

+ remove duplicite unistd.h include
2025-05-30 14:28:08 +02:00
Martin Pulec
07c8df3748 rtp/net_udp: use strerror_s instead of _r
compat already handled in compat/strings so not needed to replicate it
2025-05-30 14:25:37 +02:00
Martin Pulec
4d4cd93546 build: -D_GNU_SOURCE for Linux only
This improves the commit f8b54ea9 from 2013 - currently _GNU_SOURCE is
required eg. for pthread_setname_np. Intantionally used not only with
glibc but also with musl - if not defined pthread_setname_np is not
defined.

+ add COMMON_FLAGS also to CPPFLAGS (doesn't matter much but better)
2025-05-30 14:25:36 +02:00
Martin Pulec
cf5f593e05 Makefile BSD compat improved
In the workaround rules, try to use first word of $+ (list of
prerequisities) in place of $<, which is part of POSIX Issue 8 (2024)
but not yet implemented by BSDs. On contrary, it is implemented by GNU
Make. For the first case, use $@ (target) as a fallback.
2025-05-30 09:00:36 +02:00
Martin Pulec
5dbf9204b1 DragonFly BSD compat 2025-05-30 08:38:05 +02:00
Martin Pulec
c9bb34f9f5 compat/qsort_s: reformat + improve doc
+ s/QSORT_S_COMP_CTX_FIRST/QSORT_S_COMP_CTX_FIRST/
+ define the comparator with QSORT_S_COMP_DEFINE in hwaccel_videotoolbox.c
2025-05-30 08:38:03 +02:00
Martin Pulec
e4501e90bc utils/thread: set_thread_name *nix consolidation
Consolidate the code for various *nix flavors:
- guard macro __unix__
- 16 bytes only for Linux (required, otherwise not set)
- use platform specific pthread_setname_np prototypes
- default to (pthread_t, const char *) arguments, that work for Linux,
DragonFly and FreeBSD but different for macOS and NetBSD, OpenBSD
unimplemented
2025-05-30 08:29:35 +02:00
Martin Pulec
7c911a3312 NetBSD compat 2025-05-30 08:10:34 +02:00
Martin Pulec
87dda7dbb9 net_udp: don't attempt set IPV6_V6ONLY=1 if unsupp
case of OpenBSD (doesn't support dual-home sockets)
2025-05-30 08:10:34 +02:00
Martin Pulec
f1745fba65 configure.ac: improvements
fix all occurances of:
- test -a/-o
some occurences (where line affected by the above)
- enclose vars in ""
- ensure that var is defined ${...?}
2025-05-30 08:10:34 +02:00
Martin Pulec
b1951bb823 GLEW: do not required GLU
not avail on OpenBSD
2025-05-30 08:10:34 +02:00
Martin Pulec
dbfe8362a7 configure.ac: don't req X11 hdrsfor GL disp [Lin]
Separate OPENGL and OPENGL_COMMON - for Mac and Win the same but in Linux,
the first one doesn't require X11 headers, just GLEW.
2025-05-30 08:10:34 +02:00
Martin Pulec
2f63416075 support for OGL on non-Linux *nix
+ replace discouraged test -a syntax with test && test
2025-05-30 08:10:33 +02:00
Martin Pulec
cb5b9952c7 configure.ac: handle Linux for DeckLink explicitly
Although it would compile for *BSD systems, Blackmagic doesn't release
drivers, anyways. Also -ldl isn't available in OpenBSD.
2025-05-30 08:10:33 +02:00
Martin Pulec
1effd49286 qsort_r fallback implementation 2025-05-30 08:10:33 +02:00
Martin Pulec
7ba56fb8a1 get_exec_path: implement a fallback version
using argv[0] + getcwd + open("command -v ...") (so POSIX specific)
2025-05-30 08:10:33 +02:00
Martin Pulec
501d27c1d3 rtp: prefix IPPORT_MAX and IPPORT_DYNAMIC w. RTP_
IPPORT_MAX is defined in FreeBSD sys headers (65535 but since we use
the same value but different expression, it triggers a warning so to
avoid clashes.
2025-05-30 08:10:33 +02:00
Martin Pulec
7c6751d8ad utils/fs: implement get_exec_path for FreeBSD 2025-05-30 08:10:32 +02:00