Skip to content

Commit d4aca1d

Browse files
authored
Merge branch 'CESNET:master' into master
2 parents ebc5631 + 3ae6252 commit d4aca1d

37 files changed

+568
-190
lines changed

.github/scripts/environment.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,6 @@ case "$RUNNER_OS" in
105105
--enable-libbacktrace \
106106
--enable-syphon \
107107
"
108-
macos_major=$(sw_vers -productVersion | cut -d. -f1)
109-
if [ "$macos_major" -ge 15 ]; then
110-
FEATURES="$FEATURES --disable-screen"
111-
fi
112108
;;
113109
Windows)
114110
FEATURES="$FEATURES $CUDA_FEATURES --enable-dshow --enable-spout --enable-wasapi"

.github/workflows/arm-build.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ jobs:
4141
- name: Fetch SDKs ETags
4242
id: etags
4343
run: |
44-
echo "ndi=$($GITHUB_WORKSPACE/.github/scripts/get-etags.sh https://downloads.ndi.tv/SDK/NDI_SDK_Linux/Install_NDI_SDK_v5_Linux.tar.gz)" >> $GITHUB_OUTPUT
44+
$GITHUB_WORKSPACE/.github/scripts/get-etag.sh ndi\
45+
https://downloads.ndi.tv/SDK/NDI_SDK_Linux/\
46+
Install_NDI_SDK_v6_Linux.tar.gz >> $GITHUB_OUTPUT
4547
- name: Run actions/cache for NDI
4648
id: cache-ndi
4749
uses: actions/cache@main
@@ -51,7 +53,7 @@ jobs:
5153
- name: Download NDI
5254
if: steps.cache-ndi.outputs.cache-hit != 'true'
5355
run: "curl -Lf https://downloads.ndi.tv/SDK/NDI_SDK_Linux/\
54-
Install_NDI_SDK_v5_Linux.tar.gz -o /var/tmp/Install_NDI_SDK_Linux.tar.gz"
56+
Install_NDI_SDK_v6_Linux.tar.gz -o /var/tmp/Install_NDI_SDK_Linux.tar.gz"
5557

5658
- name: Run actions/cache for ARM Chroot
5759
id: cache-bootstrap

configure.ac

Lines changed: 50 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,9 @@ fi
155155

156156
if test $system = MacOSX; then
157157
MACOS_LEGACY=no
158-
os_version_major=`uname -r |cut -d . -f 1`
159-
if test $os_version_major -lt 19; then # Darwin 19.0.0 is macOS 10.15
158+
macos_major=$(sw_vers -productVersion | cut -d. -f1)
159+
macos_minor=$(sw_vers -productVersion | cut -d. -f2)
160+
if test ${macos_major?} -eq 10 && test ${macos_minor?} -lt 15; then
160161
MACOS_LEGACY=yes
161162
fi
162163
CFLAGS="$CFLAGS $COMMON_OSX_FLAGS"
@@ -447,7 +448,8 @@ AC_ARG_VAR([AJA_DIRECTORY], [Directory to AJA NTV2 SDK.])
447448
AC_ARG_VAR([BLUE_LATEST_SDK], [Placement of Bluefish444 SDK.])
448449
AC_ARG_VAR([CINEFORM_DIRECTORY], [Directory to Cineform SDK.])
449450
AC_ARG_VAR([CUDA_FLAGS], [Flags to be passed to CUDA compiler, eg. -arch=native; alterntatively CUDAFLAGS])
450-
AC_ARG_VAR([CUDA_PATH], [Directory of your Nvidia toolkit instalation.])
451+
AC_ARG_VAR([CUDA_PATH], [Directory of your Nvidia toolkit instalation.]dnl
452+
[Alternative: CUDACXX (path to nvcc executable)])
451453
AC_ARG_VAR([DELTACAST_DIRECTORY], [Placement of VideoMasterHD directory (Deltacast).])
452454
AC_ARG_VAR([DVS_DIRECTORY], [Path to DVS installation.])
453455
AC_ARG_VAR([GENICAM_GENTL64_PATH], [XIMEA SDK library path])
@@ -520,7 +522,7 @@ if test $cuda_req != no; then
520522
# nvcc is intentional here
521523
AC_PATH_PROG(NVCC, nvcc, [], [$CUDA_PATH_SEP$PATH]dnl
522524
[$PATH_SEPARATOR/opt/cuda/bin$PATH_SEPARATOR/usr/local/cuda/bin])
523-
if -z "$NVCC" && -e "$CUDACXX"; then
525+
if test -z "$NVCC" && test -x "$CUDACXX"; then
524526
NVCC=$CUDACXX
525527
fi
526528
fi
@@ -2210,23 +2212,43 @@ sc_details=
22102212

22112213
AC_ARG_ENABLE(screen,
22122214
[ --disable-screen disable screen capture (default is auto)]
2213-
[ --enable-screen@<:@=x11,pipewire@:>@ @<:@Linux only@:>@ choose implementation (can be both)]
2214-
[ Requires: none (OSX) x11 or pipewire (Linux) dshow (Win)],
2215+
AS_HELP_STRING([--enable-screen@<:@=x11,pipewire,cg@:>@],
2216+
[choose implementation (Linux: can be both x11 and pipewire; macOS: cg]
2217+
[ - use Core Graphics implementation instead of AV Foundation).]
2218+
[Requires: macOS<15 (cg), AVF (macOS otherwise); X11 or PipeWire (Linux); DShow (Win)]),
22152219
[screen_cap_req=$enableval],
22162220
[screen_cap_req=$build_default]
22172221
)
22182222

2219-
case "$system" in
2220-
MacOSX)
2221-
if test "$os_version_major" -lt 24; then # Darwin 24.0.0 is macOS 15
2222-
screen_cap=yes
2223+
if test "${system?}" = Linux && test "${screen_cap_req?}" = yes; then
2224+
screen_cap_req=pipewire,x11
2225+
fi
2226+
2227+
if test "${system?}" = Windows && test "${screen_cap_req?}" != no; then
2228+
SCREEN_CAP_OBJ="src/video_capture/screen_win.o"
2229+
DLL_LIBS="${DLL_LIBS:+$DLL_LIBS }${srcdir}/data/screen-capture-recorder-x64.dll"
2230+
screen_cap=$dshow
2231+
fi
2232+
2233+
if test "${system?}" = MacOSX && test "${screen_cap_req?}" != no; then
2234+
if test "${avfoundation?}" = no || test "${screen_cap_req?}" = cg; then
2235+
if test "${macos_major?}" -ge 15; then
2236+
AC_MSG_WARN([Core Graphics screen capture]dnl
2237+
[unsupported since macOS 15!])
2238+
else
2239+
SCREEN_CAP_OBJ="src/video_capture/screen_osx.o"
22232240
SCREEN_CAP_LIB="-framework CoreFoundation"
2241+
screen_modules="Core Graphics"
2242+
screen_cap=yes
22242243
fi
2225-
;;
2226-
Windows)
2227-
screen_cap=$dshow
2228-
;;
2229-
esac
2244+
else
2245+
if test "${avfoundation?}" = yes; then
2246+
SCREEN_CAP_OBJ="src/video_capture/screen_avf.o"
2247+
screen_modules="AV Foundation"
2248+
screen_cap=yes
2249+
fi
2250+
fi
2251+
fi
22302252

22312253
# X11
22322254
screen_cap_x11=no
@@ -2260,7 +2282,8 @@ fi
22602282
# PipeWire
22612283
found_screen_screen_pw_deps=no
22622284
screen_cap_pw=no
2263-
if test $screen_cap_req != no && test $screen_cap_req != x11; then
2285+
if test ${system?} = Linux && test ${screen_cap_req?} != no &&
2286+
test ${screen_cap_req} != x11; then
22642287
PKG_CHECK_MODULES([SCREEN_PW_DEPS], [glib-2.0 gobject-2.0 gio-unix-2.0 ], [found_screen_screen_pw_deps=yes], [found_screen_screen_pw_deps=no])
22652288
fi
22662289

@@ -2283,23 +2306,22 @@ fi
22832306

22842307
if test $screen_cap_req != no && test $screen_cap = yes
22852308
then
2286-
if test $system = MacOSX; then
2287-
SCREEN_CAP_OBJ="src/video_capture/screen_osx.o"
2288-
elif test $system = Linux; then
2309+
if test $system = Linux; then
22892310
SCREEN_CAP_OBJ="src/video_capture/screen_linux.o"
2290-
else
2291-
SCREEN_CAP_OBJ="src/video_capture/screen_win.o"
2292-
DLL_LIBS="${DLL_LIBS:+$DLL_LIBS }${srcdir}/data/screen-capture-recorder-x64.dll"
22932311
fi
22942312
add_module vidcap_screen "$SCREEN_CAP_OBJ" "$SCREEN_CAP_LIB"
22952313
else
22962314
screen_cap=no
22972315
fi
22982316

2299-
if { test $screen_cap_req = yes && { test $screen_cap = no || { test $system = Linux && { test $screen_cap_x11 = no || test $screen_cap_pw = no; }; }; }; } \
2300-
|| { test $screen_cap_req = x11 && test $screen_cap_x11 = no; } || { test $screen_cap_req = pipewire && test $screen_cap_pw = no; }
2301-
then
2302-
AC_MSG_ERROR([Screen capture not found]);
2317+
ENSURE_FEATURE_PRESENT([$screen_cap_req], [$screen_cap], [Screen capture not found])
2318+
2319+
if { expr "x${screen_cap_req?}" : "x.*x11" >/dev/null &&
2320+
test "${screen_cap_x11?}" = no; } ||
2321+
{ expr "x${screen_cap_req?}" : "x.*pipewire" >/dev/null &&
2322+
test "${screen_cap_pw?}" = no; }; then
2323+
AC_MSG_ERROR([Desired screen capture implementation not found!]
2324+
[Wanted: ${screen_cap_req?}])
23032325
fi
23042326

23052327
if test -n "$screen_modules"; then
@@ -3255,7 +3277,8 @@ ENSURE_FEATURE_PRESENT([$cmpto_j2k_req], [$cmpto_j2k], [Comprimato J2K not found
32553277
# ------------------------------------------------------------------------------
32563278
ndi=no
32573279
AC_ARG_ENABLE(ndi,
3258-
AS_HELP_STRING([--enable-ndi@<:@=ver@:>@], [enables NDI support (default is auto)]),
3280+
AS_HELP_STRING([--enable-ndi@<:@=ver@:>@], [enables NDI support (default is auto).]
3281+
[Set ver to 5 if using NDI 5.]),
32593282
[ndi_req=$enableval],
32603283
[ndi_req=$build_default]
32613284
)

src/audio/audio.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Martin Pulec <martin.pulec@cesnet.cz>
1010
* Ian Wesley-Smith <iwsmith@cct.lsu.edu>
1111
*
12-
* Copyright (c) 2005-2025 CESNET
12+
* Copyright (c) 2005-2026 CESNET, zájmové sdružení právnických osob
1313
*
1414
* Redistribution and use in source and binary forms, with or without
1515
* modification, is permitted provided that the following conditions
@@ -77,6 +77,7 @@
7777
#include "config.h" // for HAVE_SPEEXDSP
7878
#include "debug.h"
7979
#include "host.h"
80+
#include "messaging.h" // for check_message...
8081
#include "module.h"
8182
#include "pdb.h"
8283
#include "rtp/audio_decoders.h"
@@ -90,6 +91,7 @@
9091
#include "ug_runtime_error.hpp"
9192
#include "utils/color_out.h"
9293
#include "utils/net.h"
94+
#include "utils/macros.h" // for STR_LEN, snprintf_ch
9395
#include "utils/misc.h" // for get_stat_color
9496
#include "utils/sdp.h"
9597
#include "utils/string_view_utils.hpp"

src/audio/capture/fluidsynth.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
#include "audio/audio_capture.h" // for AUDIO_CAPTURE_ABI_VERSION, audio_ca...
4848
#include "audio/types.h" // for audio_frame
4949
#include "audio/utils.h" // for mux_channel
50+
#include "compat/c23.h" // for countof
5051
#include "compat/usleep.h" // for usleep
5152
#include "debug.h" // for LOG_LEVEL_ERROR, MSG, log_msg, LOG_...
5253
#include "host.h" // for audio_capture_sample_rate, INIT_NOERR
@@ -56,7 +57,7 @@
5657
#include "types.h" // for device_info
5758
#include "utils/color_out.h" // for color_printf, TBOLD, TRED
5859
#include "utils/fs.h" // for get_install_root, get_temp_file
59-
#include "utils/macros.h" // for IS_KEY_PREFIX, countof
60+
#include "utils/macros.h" // for IS_KEY_PREFIX
6061

6162
struct module;
6263

src/audio/filter/delay.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author Martin Piatka <piatka@cesnet.cz>
44
*/
55
/*
6-
* Copyright (c) 2022 CESNET, z. s. p. o.
6+
* Copyright (c) 2022-2026 CESNET, zájmové sdružení právických osob
77
* All rights reserved.
88
*
99
* Redistribution and use in source and binary forms, with or without
@@ -49,6 +49,7 @@
4949
#include "audio/audio_filter.h"
5050
#include "audio/types.h"
5151
#include "lib_common.h"
52+
#include "messaging.h" // for free_message, new_response
5253
#include "utils/ring_buffer.h"
5354
#include "utils/misc.h"
5455
#include "utils/string_view_utils.hpp"

src/audio/filter_chain.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author Martin Piatka <piatka@cesnet.cz>
44
*/
55
/*
6-
* Copyright (c) 2021 CESNET, z. s. p. o.
6+
* Copyright (c) 2021-2026 CESNET, zájmové sdružení právických osob
77
* All rights reserved.
88
*
99
* Redistribution and use in source and binary forms, with or without
@@ -43,6 +43,7 @@
4343
#include "debug.h"
4444
#include "audio/types.h"
4545
#include "filter_chain.hpp"
46+
#include "messaging.h" // for check_message...
4647
#include "utils/string_view_utils.hpp"
4748

4849
Filter_chain::Filter_chain(struct module *parent) :

src/audio/playback/alsa.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author Martin Pulec <pulec@cesnet.cz>
44
*/
55
/*
6-
* Copyright (c) 2011-2025 CESNET, zájmové sdružení právnických osob
6+
* Copyright (c) 2011-2026 CESNET, zájmové sdružení právnických osob
77
* All rights reserved.
88
*
99
* Redistribution and use in source and binary forms, with or without
@@ -68,6 +68,7 @@
6868
#include "tv.h"
6969
#include "types.h" // for device_info
7070
#include "utils/color_out.h"
71+
#include "utils/macros.h" // for STR_LEN, snprintf_ch
7172

7273
#define BUF_LEN_DEFAULT_MS 60
7374
#define BUF_LEN_DEFAULT_SYNC_MS 200 // default buffer len for sync API

src/audio/portaudio_common.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author Martin Pulec <pulec@cesnet.cz>
44
*/
55
/*
6-
* Copyright (c) 2018-2025 CESNET
6+
* Copyright (c) 2018-2026 CESNET, zájmové sdružení právnických osob
77
* All rights reserved.
88
*
99
* Redistribution and use in source and binary forms, with or without
@@ -48,6 +48,7 @@
4848
#include "portaudio_common.h"
4949
#include "types.h"
5050
#include "utils/color_out.h"
51+
#include "utils/macros.h" // for snprintf_ch
5152

5253
#define MOD_NAME "[PortAudio] "
5354

src/blackmagic_common.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
#include <cstdlib> // for free
5050
#include <cstring> // for strlen, NULL, strdup, memcpy, size_t
5151
#include <iomanip>
52-
#include <iterator> // for pair
52+
#include <iterator> // for pair, size
5353
#include <map>
5454
#include <mutex> // for mutex, lock_guard, unique_lock
5555
#include <sstream>
@@ -66,7 +66,7 @@
6666
#include "tv.h"
6767
#include "utils/color_out.h"
6868
#include "utils/debug.h" // for DEBUG_TIMER_*
69-
#include "utils/macros.h" // for countof
69+
#include "utils/macros.h" // for STR_LEN, snprintf_ch, IS_FCC
7070
#include "utils/string.h" // for DELDEL
7171
#include "utils/windows.h"
7272
#include "utils/worker.h"
@@ -786,12 +786,12 @@ static const struct {
786786
#undef BMDFCC
787787

788788
static string fcc_to_string(uint32_t fourcc) {
789-
for (unsigned i = 0; i < countof(opt_name_map); ++i) {
789+
for (unsigned i = 0; i < std::size(opt_name_map); ++i) {
790790
if (opt_name_map[i].fourcc == fourcc) {
791791
return opt_name_map[i].name;
792792
}
793793
}
794-
for (unsigned i = 0; i < countof(val_name_map); ++i) {
794+
for (unsigned i = 0; i < std::size(val_name_map); ++i) {
795795
if (val_name_map[i].fourcc == fourcc) {
796796
return val_name_map[i].name;
797797
}
@@ -936,7 +936,7 @@ bmd_opt_help()
936936
color_printf("\n");
937937

938938
color_printf("List of keys:\n");
939-
for (unsigned i = 0; i < countof(opt_name_map); ++i) {
939+
for (unsigned i = 0; i < std::size(opt_name_map); ++i) {
940940
if (opt_name_map[i].fourcc == 0) {
941941
color_printf("\n%s:\n", opt_name_map[0].name);
942942
} else {
@@ -952,7 +952,7 @@ bmd_opt_help()
952952
color_printf("\n");
953953
color_printf("Incomplete " TBOLD("(!)") " list of values:\n");
954954
color_printf("(note that the value belongs to its appropriate key)\n");
955-
for (unsigned i = 0; i < countof(val_name_map); ++i) {
955+
for (unsigned i = 0; i < std::size(val_name_map); ++i) {
956956
uint32_t val = htonl(val_name_map[i].fourcc);
957957
color_printf("- " TBOLD("%.4s") " - %s\n", (char *) &val,
958958
val_name_map[i].name);
@@ -1589,7 +1589,7 @@ print_status_item(IDeckLinkStatus *deckLinkStatus, BMDDeckLinkStatusID prop,
15891589
{
15901590
const struct status_property *s_prop = nullptr;
15911591

1592-
for (unsigned i = 0; i < countof(status_map); ++i) {
1592+
for (unsigned i = 0; i < std::size(status_map); ++i) {
15931593
if (status_map[i].prop == prop) {
15941594
s_prop = &status_map[i];
15951595
break;
@@ -1835,7 +1835,7 @@ bmd_print_status_subscribe_notify(IDeckLink *deckLink, const char *log_prefix,
18351835
"Cannot obtain IID_IDeckLinkStatus from DeckLink",
18361836
return nullptr);
18371837
// print status_map values now
1838-
for (unsigned u = 0; u < countof(status_map); ++u) {
1838+
for (unsigned u = 0; u < std::size(status_map); ++u) {
18391839
if (capture && status_map[u].playback_only) {
18401840
continue;
18411841
}

0 commit comments

Comments
 (0)