Commit Graph

45 Commits

Author SHA1 Message Date
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
7378bae7c9 unit_evaluate_dbl: fixed err check
arm64 (Apple silicon) needs the comparison with NAN with isnan().

Fixes also failing test misc_test_unit_evaluate on GH macos-14 runner
(arm64 mac),
2025-03-31 12:17:56 +02:00
Martin Pulec
f4d94066c8 unit_evaluate: accept binary suffixes
+ test
2025-03-31 09:15:51 +02:00
Martin Pulec
5ed4b72ca4 unit_evaluate[_dbl]: set the endptr unconditionally
Even if no number is parsed, set the endptr. This is consistent with
strtod (and family) behavior.
2025-03-31 09:15:50 +02: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
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 Pulec
b44af19782 audio sender: use colors for sample cnt summary 2025-02-11 12:59:03 +01:00
Martin Pulec
70e169db3f utils/misc: improved including 2024-09-18 14:35:48 +02:00
Martin Pulec
3c9e260240 vdisp/sdl2: enable R10k
Seem to be working now (but requires a byte swap for the R10k pixels
values).

refer to GH-412
2024-09-18 14:34:57 +02:00
Martin Pulec
95ae4c0616 invalid_arg_is_numeric: handle also macOS
std::invalid_argument::what() returns in macOS the string:
"stoi: no conversion"
2024-09-13 15:35:44 +02:00
Martin Pulec
ef0cd7130d unify stod/stoi invalid_argument::what parse
This is a hack to check whether given invalid_argument message belongs
to stoi/stod. It is usually used to catch non-numeric user input where
a number was expected.
2024-09-13 15:35:44 +02:00
Martin Pulec
0a8467b01f vcomp/cmpto_j2k: print opt hint in help
+ use unit_evaluate_dbl (instead of unit_evaluate) - **also** in decompress
2024-09-12 16:35:57 +02:00
Martin Pulec
f01e4c36b7 moved around compat functions
moved compat functions from config_*h, namely:
- localtime_s/gmtime_s
- strerror_s
- mkdir Windows compat
- removed str[n]cmp from compat/misc (already in compat/strings,h,
which is the better location)

Do not use config*.h in export.c (motivation for the above changes).
2024-06-12 14:02:42 +02:00
Martin Pulec
56a6dc78b0 replace remaining WIN32 platform macros
see the commit HEAD@{2}
2024-05-13 12:56:53 +02:00
Martin Pulec
c66d4f3194 unit_evaluate_dbl: renamed end_ptr var
Since now we receive endptr as a parameter, it is somehow misleading to
have both endptr and end_ptr vars. Use endptr_tmp instead.
2023-11-29 15:27:32 +01:00
Martin Pulec
40a7d04ec1 unit_evaluate[_dbl]: added endptr param 2023-11-29 15:27:32 +01:00
Martin Pulec
c0db7d1999 added strerror_s compat
Encounter using standard strerror_s() instead of home-grown
replacement. MSW already include C11-compatible strerror_s()
implementation (although it doesn't advertise __STDC_LIB_EXT1__).
XSI version of strerror_r() is mostly compatible (except of argument
order).

Using standard functions should be more convenient than custom workarounds
(even if there is needed a compat macro).
2023-08-10 12:04:03 +02:00
Martin Pulec
c4dcc5051b vidcap file: s/clampi/CLAMP/
Replaced clampi with CLAMP - since the clampi is the only use of the
function, it can be removed.
2023-06-14 12:04:04 +02:00
Martin Pulec
5b750c2ff3 lavc video: prefer libaom-av1 for ARM macs
While on x86_64 is libsvtav1 still slightly ahead, on the M1 mac, the
AOM AV1 performs significantly better (2x faster).

The above holds for native builds, it actually looks like the x86_64
build running SVT AV1 on M1 mac doesn't run correctly at all - it
produces just blank picture (green as is zeroed YCbCr buffer).
2023-05-17 14:56:11 +02:00
Martin Pulec
e5484c7a96 moved get_splashscreen to video_display
to resolve this failed build:

    https://github.com/CESNET/UltraGrid/actions/runs/4375068060/jobs/7655309176

(Added dependency of misc.o on video stuff, which broke build of
tools/convert, which has hard-coded dependencies.)

The function is video_display specific, anyways.
2023-03-09 15:35:48 +01:00
Martin Pulec
37876bbec8 caca: updates
- added splashscreen
- fixed RGB-shifts
- redraw last frawme if resized
2023-03-09 13:26:13 +01:00
Martin Pulec
cac1d11190 updated copyrights of files changed in 2023 2023-02-09 09:19:50 +01:00
Martin Pulec
6bc837726d misc: removed unneeded MIN definition (already in misc.h) 2023-01-17 16:08:18 +01:00
Martin Pulec
7b98a4a1d0 dummy: simplified dump usage 2022-11-25 11:02:20 +01:00
Martin Pulec
579389cebc tool/convert: compilation fixes
- moved macros to utils/macros.h (not config_common.h that is not going
  to be included) and include in config_common.h the macros.h file
  instead (later it should be removed)
- avoid dependency of color_out.o on host.o if build outside UG (easiest
  for now)
- compile tools with '-g' (obviously for better debuggability)
2022-11-22 10:34:37 +01:00
Martin Piatka
7cb9771962 Move tokenize and sv_parse_num into string_view_utils 2022-11-10 12:04:41 +01:00
Martin Pulec
787731fd96 DeckLink disp.: simplified parsing
rather hard-fail than silently continue (user may not see the message)
2022-10-26 09:20:50 +02:00
Martin Pulec
3036c48c8b WAV reader: reflect CID 401447
+ rename function
+ documentation
2022-10-20 14:14:45 +02:00
Martin Pulec
05aea72a3c moved some functions from misc to text
moved text-related functions from utils/misc to utils/text
2022-10-13 09:16:16 +02:00
Martin Pulec
17056959f6 dummy: documentation
+ added indent_paragraph function
2022-10-13 09:16:07 +02:00
Martin Pulec
7d62474c77 print_module_usage: align key to right
It perhaps looks better to avoid potentially huge spaces between option
and description.
2022-10-12 12:05:24 +02:00
Martin Pulec
4cc08d18f2 unit_evaluate_dbl: check if a number was given 2022-10-05 16:24:25 +02:00
Martin Pulec
8f677978eb unit_evaluate_dbl: accept also <1 SI suffixes 2022-10-05 16:24:24 +02:00
Martin Pulec
ca0ec1f2b6 print_module_usage fullhelp support
Added support for optional parameters that are shown only with
":fullhelp".

+ use it in Syphon
+ Doxygen documentation
2022-10-04 11:03:07 +02:00
Martin Pulec
e0816158cc fixed another macOS warnings 2022-10-03 16:01:57 +02:00
Martin Pulec
d6d51df3a8 audio capture: color usage
+ created a generic function for usage printout
2022-09-13 16:36:34 +02:00
Martin Pulec
faa1afb720 added some missing includes
Added includes that are missing if config.h was not included.
2022-08-17 17:27:43 +02:00
Martin Piatka
c63412767b misc: tokenize(): Support for delimiter escaping 2022-08-16 09:56:32 +02:00
Martin Pulec
517c27fa18 format_in_si_units: don't take parameter suffix
This is perhaps unneeded -- caller can append the units by itself.
2022-07-29 11:48:48 +02:00
Martin Pulec
c69fd8a076 lavc: print bitrate using SI-prefix
With SI-prefix, the value is human readable.
2022-07-29 10:53:30 +02:00
Martin Pulec
5ca1ed3730 RTSP cap.: get rid of glib dependency
It was needed only for base64 decode, which is perhaps needless
overhead.
2022-05-02 16:12:32 +02:00
Martin Pulec
e879f0e44b convert tool compilation fixes 2022-02-25 12:09:22 +01:00
Martin Pulec
f62e04d15f fixed replace_all()
In response to Coverity CID 383367 - it is perhaps false positive but
there has been another small bug - the step should be length of to, not
from (which may be longer).

+ written a test for it
2022-02-21 15:32:00 +01:00
Martin Pulec
eae4c79844 DeckLink disp.: set signal as progressive (not-PsF)
Set signal as progressive (not-PsF) by default - previously the value
was not touched which may be a bit misleading when DeckLink outputs
actually interlaced signal.

Issue warning that the option is set and keep user opt out from setting
this value.
2022-01-20 09:27:30 +01:00
Martin Piatka
2bab7f22ac utils/misc: Add string_view tokenizer
Useful as a C++ non-destructive replacement for strtok
2021-12-20 16:14:25 +01:00