diff --git a/src/aja_win32_stub.cpp b/src/aja_win32_stub.cpp index 7a18722a5..5f3548388 100644 --- a/src/aja_win32_stub.cpp +++ b/src/aja_win32_stub.cpp @@ -6,7 +6,7 @@ * would be otherwise referenced directly (audio_capture_channels). */ /* - * Copyright (c) 2017-2023 CESNET z.s.p.o. + * Copyright (c) 2017-2026 CESNET, zájmové sdružení právnických osob * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -43,14 +43,14 @@ #include "video_display.h" extern "C" { -__declspec(dllimport) int vidcap_aja_init(struct vidcap_params *params, void **state); +__declspec(dllimport) int vidcap_aja_init(const struct vidcap_params *params, void **state); __declspec(dllimport) void vidcap_aja_done(void *state); __declspec(dllimport) struct video_frame *vidcap_aja_grab(void *state, struct audio_frame **audio); __declspec(dllimport) void vidcap_aja_probe(struct device_info **available_cards, int *count, void (**deleter)(void *)); __declspec(dllimport) unsigned int *aja_audio_capture_channels; } -static int vidcap_aja_init_proxy(struct vidcap_params *params, void **state) { +static int vidcap_aja_init_proxy(const struct vidcap_params *params, void **state) { aja_audio_capture_channels = &audio_capture_channels; return vidcap_aja_init(params, state); } diff --git a/src/video_capture.h b/src/video_capture.h index d5199da04..7492c0c77 100644 --- a/src/video_capture.h +++ b/src/video_capture.h @@ -12,7 +12,7 @@ * @ingroup vidcap */ /* - * Copyright (c) 2005-2024 CESNET + * Copyright (c) 2005-2026 CESNET, zájmové sdružení právnických osob * Copyright (c) 2002 University of Southern California * * Redistribution and use in source and binary forms, with or without @@ -106,7 +106,7 @@ #include "types.h" #include "video_capture_params.h" -#define VIDEO_CAPTURE_ABI_VERSION 13 +#define VIDEO_CAPTURE_ABI_VERSION 14 #ifdef __cplusplus extern "C" { @@ -136,7 +136,7 @@ struct video_capture_info { * @param[out] state returned capture state * @returns one of @ref vidcap_retval */ - int (*init) (struct vidcap_params *param, void **state); + int (*init) (const struct vidcap_params *param, void **state); void (*done) (void *state); struct video_frame *(*grab) (void *state, struct audio_frame **audio); const char *generic_fps_indicator_prefix; ///< display name, eg. "[gl] ", diff --git a/src/video_capture/DirectShowGrabber.cpp b/src/video_capture/DirectShowGrabber.cpp index 62da96478..183259144 100644 --- a/src/video_capture/DirectShowGrabber.cpp +++ b/src/video_capture/DirectShowGrabber.cpp @@ -824,7 +824,7 @@ static void vidcap_dshow_should_exit(void *state) { WakeConditionVariable(&s->grabWaitCV); } -static int vidcap_dshow_init(struct vidcap_params *params, void **state) { +static int vidcap_dshow_init(const struct vidcap_params *params, void **state) { #define HANDLE_ERR(msg, ...) \ HANDLE_ERR_ACTION(res, goto error, \ "vidcap_dshow_init: " msg __VA_OPT__(, ) __VA_ARGS__) diff --git a/src/video_capture/aggregate.c b/src/video_capture/aggregate.c index b78360c66..1a22a4d0d 100644 --- a/src/video_capture/aggregate.c +++ b/src/video_capture/aggregate.c @@ -5,7 +5,7 @@ * @brief Aggregate video capture driver */ /* - * Copyright (c) 2012-2023 CESNET z.s.p.o. + * Copyright (c) 2012-2026 CESNET, zájmové sdružení právnických osob * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -88,7 +88,7 @@ static void vidcap_aggregate_probe(struct device_info **cards, int *count, void } static int -vidcap_aggregate_init(struct vidcap_params *params, void **state) +vidcap_aggregate_init(const struct vidcap_params *params, void **state) { struct vidcap_aggregate_state *s; @@ -113,7 +113,7 @@ vidcap_aggregate_init(struct vidcap_params *params, void **state) s->devices_cnt = 0; - struct vidcap_params *tmp = params; + const struct vidcap_params *tmp = params; while((tmp = vidcap_params_get_next(tmp))) { if (vidcap_params_get_driver(tmp) != NULL) s->devices_cnt++; @@ -125,12 +125,16 @@ vidcap_aggregate_init(struct vidcap_params *params, void **state) tmp = params; for (int i = 0; i < s->devices_cnt; ++i) { tmp = vidcap_params_get_next(tmp); + struct vidcap_params *copy = vidcap_params_copy(tmp); if (vidcap_params_get_flags(tmp) == 0 && vidcap_params_get_flags(params) != 0) { - vidcap_params_set_flags(tmp, vidcap_params_get_flags(params)); + vidcap_params_set_flags(copy, vidcap_params_get_flags(params)); } - int ret = initialize_video_capture(vidcap_params_get_parent(params), (struct vidcap_params *) tmp, &s->devices[i]); + const int ret = initialize_video_capture( + vidcap_params_get_parent(params), + (struct vidcap_params *) copy, &s->devices[i]); + vidcap_params_free_struct(copy); if(ret != 0) { fprintf(stderr, "[aggregate] Unable to initialize device %d (%s:%s).\n", i, vidcap_params_get_driver(tmp), diff --git a/src/video_capture/aja.cpp b/src/video_capture/aja.cpp index 0c933bc62..3e884d2a1 100644 --- a/src/video_capture/aja.cpp +++ b/src/video_capture/aja.cpp @@ -5,7 +5,7 @@ * Based on AJA samples ntv2framegrabber, ntv2capture and ntv2llburn (Ping-Pong) */ /* - * Copyright (c) 2015-2024 CESNET + * Copyright (c) 2015-2026 CESNET, zájmové sdružení právnických osob * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -1090,7 +1090,7 @@ static void show_help() { col() << "\n"; } -LINK_SPEC int vidcap_aja_init(struct vidcap_params *params, void **state) +LINK_SPEC int vidcap_aja_init(const struct vidcap_params *params, void **state) { unordered_map parameters_map; char *tmp = strdup(vidcap_params_get_fmt(params)); diff --git a/src/video_capture/avfoundation.mm b/src/video_capture/avfoundation.mm index 211f5de38..15025f62b 100644 --- a/src/video_capture/avfoundation.mm +++ b/src/video_capture/avfoundation.mm @@ -773,7 +773,7 @@ parse_fmt(char *fmt) return init_params; } -static int vidcap_avfoundation_init(struct vidcap_params *params, void **state) +static int vidcap_avfoundation_init(const struct vidcap_params *params, void **state) { @autoreleasepool { if (avfoundation_usage(vidcap_params_get_fmt(params))) { diff --git a/src/video_capture/bitflow.cpp b/src/video_capture/bitflow.cpp index eb5c60f8b..f88e8dd01 100644 --- a/src/video_capture/bitflow.cpp +++ b/src/video_capture/bitflow.cpp @@ -3,7 +3,7 @@ * @author Martin Pulec */ /* - * Copyright (c) 2017-2025 CESNET + * Copyright (c) 2017-2026 CESNET, zájmové sdružení právnických osob * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -135,7 +135,7 @@ static float get_fps(struct vidcap_state_bitflow *s) { return 0; } -static int vidcap_bitflow_init(struct vidcap_params *params, void **state) +static int vidcap_bitflow_init(const struct vidcap_params *params, void **state) { if (vidcap_params_get_flags(params) & VIDCAP_FLAG_AUDIO_ANY) { return VIDCAP_INIT_AUDIO_NOT_SUPPORTED; diff --git a/src/video_capture/bluefish444.cpp b/src/video_capture/bluefish444.cpp index 837b31dda..296d202a0 100644 --- a/src/video_capture/bluefish444.cpp +++ b/src/video_capture/bluefish444.cpp @@ -3,7 +3,7 @@ * @author Martin Pulec */ /* - * Copyright (c) 2015-2023 CESNET, z. s. p. o. + * Copyright (c) 2015-2026 CESNET, zájmové sdružení právnických osob * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -764,7 +764,7 @@ static void parse_fmt(struct vidcap_bluefish444_state *s, char *fmt) { } static int -vidcap_bluefish444_init(struct vidcap_params *params, void **state) +vidcap_bluefish444_init(const struct vidcap_params *params, void **state) { struct vidcap_bluefish444_state *s; ULONG InputChannels[4] = { diff --git a/src/video_capture/decklink.cpp b/src/video_capture/decklink.cpp index ab2a2a354..a796e5d3d 100644 --- a/src/video_capture/decklink.cpp +++ b/src/video_capture/decklink.cpp @@ -1457,7 +1457,7 @@ bool device_state::init(struct vidcap_decklink_state *s, struct tile *t, BMDAudi } static int -vidcap_decklink_init(struct vidcap_params *params, void **state) +vidcap_decklink_init(const struct vidcap_params *params, void **state) { const char *fmt = vidcap_params_get_fmt(params); diff --git a/src/video_capture/deltacast.cpp b/src/video_capture/deltacast.cpp index 19194ebfd..23706c39e 100644 --- a/src/video_capture/deltacast.cpp +++ b/src/video_capture/deltacast.cpp @@ -8,7 +8,7 @@ * @sa deltacast_common.hpp for common DELTACAST information */ /* - * Copyright (c) 2011-2025 CESNET + * Copyright (c) 2011-2026 CESNET, zájmové sdružení právnických osob * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -428,7 +428,7 @@ static bool parse_fmt(struct vidcap_deltacast_state *s, char *init_fmt, } static int -vidcap_deltacast_init(struct vidcap_params *params, void **state) +vidcap_deltacast_init(const struct vidcap_params *params, void **state) { #define HANDLE_ERROR vidcap_deltacast_done(s); return VIDCAP_INIT_FAIL; struct vidcap_deltacast_state *s = nullptr; diff --git a/src/video_capture/deltacast_dvi.cpp b/src/video_capture/deltacast_dvi.cpp index b48b74b8b..4fc14b029 100644 --- a/src/video_capture/deltacast_dvi.cpp +++ b/src/video_capture/deltacast_dvi.cpp @@ -484,7 +484,7 @@ static bool load_custom_edid(const char *filename, BYTE *pEEDIDBuffer, ULONG *pE } static int -vidcap_deltacast_dvi_init(struct vidcap_params *params, void **state) +vidcap_deltacast_dvi_init(const struct vidcap_params *params, void **state) { struct vidcap_deltacast_dvi_state *s; ULONG Width = 0, Height = 0, RefreshRate = 0; diff --git a/src/video_capture/dvs.c b/src/video_capture/dvs.c index c6a6e5a7b..c60dd1928 100644 --- a/src/video_capture/dvs.c +++ b/src/video_capture/dvs.c @@ -10,7 +10,7 @@ * Ian Wesley-Smith * * Copyright (c) 2001-2003 University of Southern California - * Copyright (c) 2005-2023 CESNET z.s.p.o. + * Copyright (c) 2005-2026 CESNET, zájmové sdružení právnických osob * * Redistribution and use in source and binary forms, with or without * modification, is permitted provided that the following conditions @@ -230,7 +230,7 @@ static void show_help(void) /* External API ***********************************************************************************/ -static int vidcap_dvs_init(struct vidcap_params *params, void **state) +static int vidcap_dvs_init(const struct vidcap_params *params, void **state) { struct vidcap_dvs_state *s; int i; diff --git a/src/video_capture/file.c b/src/video_capture/file.c index ce632525c..4637892d7 100644 --- a/src/video_capture/file.c +++ b/src/video_capture/file.c @@ -5,7 +5,7 @@ * Libavformat demuxer and decompress */ /* - * Copyright (c) 2019-2025 CESNET + * Copyright (c) 2019-2026 CESNET, zájmové sdružení právických osob * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -771,7 +771,7 @@ static int get_ach_count(int file_channels) { } #define CHECK(call) { int ret = call; if (ret != 0) abort(); } -static int vidcap_file_init(struct vidcap_params *params, void **state) { +static int vidcap_file_init(const struct vidcap_params *params, void **state) { bool opportunistic_audio = false; // do not fail if audio requested but not found int rc = 0; char errbuf[1024] = ""; diff --git a/src/video_capture/gpustitch.cpp b/src/video_capture/gpustitch.cpp index 5e3436cfd..1e58c4c88 100644 --- a/src/video_capture/gpustitch.cpp +++ b/src/video_capture/gpustitch.cpp @@ -510,7 +510,7 @@ static void stop_grab_workers(vidcap_gpustitch_state *s){ } static int -vidcap_gpustitch_init(struct vidcap_params *params, void **state) +vidcap_gpustitch_init(const struct vidcap_params *params, void **state) { printf("vidcap_gpustitch_init\n"); diff --git a/src/video_capture/import.c b/src/video_capture/import.c index 37afcf8fe..05a43b54c 100644 --- a/src/video_capture/import.c +++ b/src/video_capture/import.c @@ -3,7 +3,7 @@ * @author Martin Pulec */ /* - * Copyright (c) 2012-2023 CESNET, z. s. p. o. + * Copyright (c) 2012-2026 CESNET, zájmové sdružení právických osob * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -507,7 +507,7 @@ static bool initialize_import(struct vidcap_import_state *s, char *tmp, FILE **i } static int -vidcap_import_init(struct vidcap_params *params, void **state) +vidcap_import_init(const struct vidcap_params *params, void **state) { char *tmp = strdup(vidcap_params_get_fmt(params)); if (strlen(tmp) == 0 || strcmp(tmp, "help") == 0) { diff --git a/src/video_capture/ndi.cpp b/src/video_capture/ndi.cpp index d120571de..22f7d287b 100644 --- a/src/video_capture/ndi.cpp +++ b/src/video_capture/ndi.cpp @@ -177,7 +177,7 @@ static void show_help(struct vidcap_state_ndi *s) { s->NDIlib->find_destroy(pNDI_find); } -static int vidcap_ndi_init(struct vidcap_params *params, void **state) +static int vidcap_ndi_init(const struct vidcap_params *params, void **state) { NDI_PRINT_COPYRIGHT(void); using namespace std::string_literals; diff --git a/src/video_capture/null.c b/src/video_capture/null.c index a9ef373aa..fc744178a 100644 --- a/src/video_capture/null.c +++ b/src/video_capture/null.c @@ -6,7 +6,7 @@ * hardware or do not wish to transmit. This fits the interface of the other * capture devices, but never produces any video. * - * Copyright (c) 2005-2025 CESNET + * Copyright (c) 2005-2026 CESNET, zájmové sdružení právických osob * Copyright (c) 2004 University of Glasgow * Copyright (c) 2003 University of Southern California * @@ -62,7 +62,7 @@ struct vidcap_params; static int capture_state = 0; -static int vidcap_null_init(struct vidcap_params *params, void **state) +static int vidcap_null_init(const struct vidcap_params *params, void **state) { if (vidcap_params_get_flags(params) & VIDCAP_FLAG_AUDIO_ANY) { return VIDCAP_INIT_AUDIO_NOT_SUPPORTED; diff --git a/src/video_capture/pipewire.cpp b/src/video_capture/pipewire.cpp index 4e71f4972..affb0b7ad 100644 --- a/src/video_capture/pipewire.cpp +++ b/src/video_capture/pipewire.cpp @@ -4,7 +4,7 @@ * @author Martin Piatka */ /* - * Copyright (c) 2023 CESNET z.s.p.o. + * Copyright (c) 2023-2026 CESNET, zájmové sdružení právických osob * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -499,7 +499,7 @@ static void show_generic_help(){ } -static int parse_params(struct vidcap_params *params, vcap_pw_state *s) { +static int parse_params(const struct vidcap_params *params, vcap_pw_state *s) { if(const char *fmt = vidcap_params_get_fmt(params)) { std::istringstream params_stream(fmt); @@ -543,7 +543,7 @@ static int parse_params(struct vidcap_params *params, vcap_pw_state *s) { } #ifdef HAVE_DBUS_SCREENCAST -static int vidcap_screen_pw_init(struct vidcap_params *params, void **state) +static int vidcap_screen_pw_init(const struct vidcap_params *params, void **state) { if (vidcap_params_get_flags(params) & VIDCAP_FLAG_AUDIO_ANY) { return VIDCAP_INIT_AUDIO_NOT_SUPPORTED; @@ -585,7 +585,7 @@ static int vidcap_screen_pw_init(struct vidcap_params *params, void **state) } #endif -static int vidcap_pw_init(struct vidcap_params *params, void **state) +static int vidcap_pw_init(const struct vidcap_params *params, void **state) { if (vidcap_params_get_flags(params) & VIDCAP_FLAG_AUDIO_ANY) { return VIDCAP_INIT_AUDIO_NOT_SUPPORTED; diff --git a/src/video_capture/rtsp.c b/src/video_capture/rtsp.c index 8e22eddbc..8708405fd 100644 --- a/src/video_capture/rtsp.c +++ b/src/video_capture/rtsp.c @@ -3,7 +3,7 @@ * Martin German * * Copyright (c) 2005-2010 Fundació i2CAT, Internet I Innovació Digital a Catalunya - * Copyright (c) 2015-2025 CESNET + * Copyright (c) 2015-2026 CESNET, zájmové sdružení právických osob * * Redistribution and use in source and binary forms, with or without * modification, is permitted provided that the following conditions @@ -588,7 +588,7 @@ check_uri(size_t uri_len, char *uri) return VIDCAP_INIT_FAIL; static int -vidcap_rtsp_init(struct vidcap_params *params, void **state) { +vidcap_rtsp_init(const struct vidcap_params *params, void **state) { char fmt[STR_LEN]; snprintf(fmt, sizeof fmt, "%s", vidcap_params_get_fmt(params)); if (strcmp(fmt, "help") == 0 || strcmp(fmt, "fullhelp") == 0) { diff --git a/src/video_capture/screen_avf.c b/src/video_capture/screen_avf.c index 3648a28b2..02cd663d0 100644 --- a/src/video_capture/screen_avf.c +++ b/src/video_capture/screen_avf.c @@ -102,7 +102,7 @@ contains_dev_spec(char *fmt) } static int -vidcap_screen_avf_init(struct vidcap_params *params, void **state) +vidcap_screen_avf_init(const struct vidcap_params *params, void **state) { const char *fmt = vidcap_params_get_fmt(params); diff --git a/src/video_capture/screen_linux.c b/src/video_capture/screen_linux.c index b306c1b93..9709f0ffd 100644 --- a/src/video_capture/screen_linux.c +++ b/src/video_capture/screen_linux.c @@ -5,7 +5,7 @@ * X11/PipeWire screen capture abstraction */ /* - * Copyright (c) 2023-2025 CESNET + * Copyright (c) 2023-2026 CESNET, zájmové sdružení právických osob * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -62,7 +62,7 @@ static void vidcap_screen_linux_probe(struct device_info **cards, int *count, vo } static int -vidcap_screen_linux_init(struct vidcap_params *params, void **state) +vidcap_screen_linux_init(const struct vidcap_params *params, void **state) { struct vidcap *device = NULL; diff --git a/src/video_capture/screen_osx.c b/src/video_capture/screen_osx.c index 0231fdcfc..f2a18a564 100644 --- a/src/video_capture/screen_osx.c +++ b/src/video_capture/screen_osx.c @@ -143,7 +143,7 @@ static void vidcap_screen_osx_probe(struct device_info **available_cards, int *c } } -static int vidcap_screen_osx_init(struct vidcap_params *params, void **state) +static int vidcap_screen_osx_init(const struct vidcap_params *params, void **state) { struct vidcap_screen_osx_state *s; diff --git a/src/video_capture/screen_win.c b/src/video_capture/screen_win.c index 36889f8da..060335be4 100644 --- a/src/video_capture/screen_win.c +++ b/src/video_capture/screen_win.c @@ -9,7 +9,7 @@ * - load the dll even if working directory is not the dir with the DLL */ /* - * Copyright (c) 2019-2025 CESNET + * Copyright (c) 2019-2026 CESNET, zájmové sdružení právických osob * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -461,7 +461,7 @@ static int run_child_process() { return ret; } -static int vidcap_screen_win_init(struct vidcap_params *params, void **state) +static int vidcap_screen_win_init(const struct vidcap_params *params, void **state) { const char *cfg = vidcap_params_get_fmt(params); bool child = false; // to prevent fork bombs if error diff --git a/src/video_capture/screen_x11.c b/src/video_capture/screen_x11.c index 7f92efbd3..1752d20e6 100644 --- a/src/video_capture/screen_x11.c +++ b/src/video_capture/screen_x11.c @@ -3,7 +3,7 @@ * @author Martin Pulec */ /* - * Copyright (c) 2012-2025 CESNET, zájmové sdružení právnických osob + * Copyright (c) 2012-2026 CESNET, zájmové sdružení právnických osob * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -323,7 +323,7 @@ static _Bool parse_fmt(struct vidcap_screen_x11_state *s, char *fmt) { return 1; } -static int vidcap_screen_x11_init(struct vidcap_params *params, void **state) +static int vidcap_screen_x11_init(const struct vidcap_params *params, void **state) { printf("vidcap_screen_init\n"); diff --git a/src/video_capture/spout.cpp b/src/video_capture/spout.cpp index 178a5f838..b9f1112a4 100644 --- a/src/video_capture/spout.cpp +++ b/src/video_capture/spout.cpp @@ -148,7 +148,7 @@ check_lib() printf("SpoutLibrary vtable doesn't seem to be corrupted.\n"); } -static int vidcap_spout_init(struct vidcap_params *params, void **state) +static int vidcap_spout_init(const struct vidcap_params *params, void **state) { if ((vidcap_params_get_flags(params) & VIDCAP_FLAG_AUDIO_ANY) != 0U) { return VIDCAP_INIT_AUDIO_NOT_SUPPORTED; diff --git a/src/video_capture/switcher.c b/src/video_capture/switcher.c index 1db72c25d..6d3d59e64 100644 --- a/src/video_capture/switcher.c +++ b/src/video_capture/switcher.c @@ -178,7 +178,7 @@ parse_fmt(struct vidcap_switcher_state *s, char *cfg) } static int -vidcap_switcher_init(struct vidcap_params *params, void **state) +vidcap_switcher_init(const struct vidcap_params *params, void **state) { verbose_msg("vidcap_switcher_init\n"); @@ -203,7 +203,7 @@ vidcap_switcher_init(struct vidcap_params *params, void **state) s->mod.cls = MODULE_CLASS_DATA; module_register(&s->mod, vidcap_params_get_parent(params)); s->devices_cnt = 0; - struct vidcap_params *tmp = params; + const struct vidcap_params *tmp = params; while((tmp = vidcap_params_get_next(tmp))) { if (vidcap_params_get_driver(tmp) == NULL) { break; @@ -232,11 +232,13 @@ vidcap_switcher_init(struct vidcap_params *params, void **state) continue; } - if (vidcap_params_get_flags(tmp) == 0 && vidcap_params_get_flags(params) != 0) { - vidcap_params_set_flags(tmp, vidcap_params_get_flags(params)); + struct vidcap_params *copy = vidcap_params_copy(tmp); + if (vidcap_params_get_flags(copy) == 0 && vidcap_params_get_flags(params) != 0) { + vidcap_params_set_flags(copy, vidcap_params_get_flags(params)); } - int ret = initialize_video_capture(&s->mod, tmp, &s->devices[i]); + int ret = initialize_video_capture(&s->mod, copy, &s->devices[i]); + vidcap_params_free_struct(copy); if(ret != 0) { MSG(ERROR, "Unable to initialize device %d (%s:%s).\n", @@ -246,7 +248,7 @@ vidcap_switcher_init(struct vidcap_params *params, void **state) } } - s->params = params; + s->params = vidcap_params_copy(tmp); vidcap_switcher_register_keyboard_ctl(s); @@ -276,6 +278,7 @@ vidcap_switcher_done(void *state) module_done(&s->mod); free(s->devices); free(s->device_names); + vidcap_params_free_struct(s->params); free(s); } diff --git a/src/video_capture/swmix.c b/src/video_capture/swmix.c index 34e846125..d6a9e4892 100644 --- a/src/video_capture/swmix.c +++ b/src/video_capture/swmix.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2023 CESNET z.s.p.o. + * Copyright (c) 2012-2026 CESNET, zájmové sdružení právických osob * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -1083,7 +1083,7 @@ static bool parse(struct vidcap_swmix_state *s, struct video_desc *desc, char *f } static int -vidcap_swmix_init(struct vidcap_params *params, void **state) +vidcap_swmix_init(const struct vidcap_params *params, void **state) { GLenum format; diff --git a/src/video_capture/syphon.m b/src/video_capture/syphon.m index 0edce8cb9..8249dd7bf 100644 --- a/src/video_capture/syphon.m +++ b/src/video_capture/syphon.m @@ -3,7 +3,7 @@ * @author Martin Pulec */ /* - * Copyright (c) 2017-2023 CESNET, z. s. p. o. + * Copyright (c) 2017-2026 CESNET, zájmové sdružení právických osob * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -442,7 +442,7 @@ static int vidcap_syphon_init_common(char *opts, struct state_vidcap_syphon **ou return VIDCAP_INIT_OK; } -static int vidcap_syphon_init(struct vidcap_params *params, void **state) +static int vidcap_syphon_init(const struct vidcap_params *params, void **state) { if ((vidcap_params_get_flags(params) & VIDCAP_FLAG_AUDIO_ANY) != 0U) { return VIDCAP_INIT_AUDIO_NOT_SUPPORTED; diff --git a/src/video_capture/testcard.c b/src/video_capture/testcard.c index 34bf2a5ac..20890ba74 100644 --- a/src/video_capture/testcard.c +++ b/src/video_capture/testcard.c @@ -12,7 +12,7 @@ */ /* * Copyright (c) 2005-2006 University of Glasgow - * Copyright (c) 2005-2025 CESNET + * Copyright (c) 2005-2026 CESNET, zájmové sdružení právických osob * * Redistribution and use in source and binary forms, with or without * modification, is permitted provided that the following conditions @@ -505,7 +505,7 @@ validate_settings(struct testcard_state *s, struct video_desc desc) return true; } -static int vidcap_testcard_init(struct vidcap_params *params, void **state) +static int vidcap_testcard_init(const struct vidcap_params *params, void **state) { struct testcard_state *s = NULL; char *filename = NULL; diff --git a/src/video_capture/testcard2.c b/src/video_capture/testcard2.c index 731be2509..92d6e8405 100644 --- a/src/video_capture/testcard2.c +++ b/src/video_capture/testcard2.c @@ -6,7 +6,7 @@ * Merge to mainline testcard. */ /* - * Copyright (c) 2011-2025 CESNET, zájmové sdružení právnických osob + * Copyright (c) 2011-2026 CESNET, zájmové sdružení právnických osob * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -314,7 +314,7 @@ get_sdl_render_font() } #endif -static int vidcap_testcard2_init(struct vidcap_params *params, void **state) +static int vidcap_testcard2_init(const struct vidcap_params *params, void **state) { if (vidcap_params_get_fmt(params) == NULL || strcmp(vidcap_params_get_fmt(params), "help") == 0) { usage(); diff --git a/src/video_capture/ug_input.cpp b/src/video_capture/ug_input.cpp index 10c831192..21a99eedb 100644 --- a/src/video_capture/ug_input.cpp +++ b/src/video_capture/ug_input.cpp @@ -3,7 +3,7 @@ * @author Martin Pulec */ /* - * Copyright (c) 2014-2023 CESNET, z. s. p. o. + * Copyright (c) 2014-2026 CESNET, zájmové sdružení právických osob * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -138,7 +138,7 @@ parse_fmt(char *fmt, uint16_t *port, codec_t *decode_to) return true; } -static int vidcap_ug_input_init(struct vidcap_params *cap_params, void **state) +static int vidcap_ug_input_init(const struct vidcap_params *cap_params, void **state) { uint16_t port = 5004; codec_t decode_to = VIDEO_CODEC_NONE; diff --git a/src/video_capture/v4l2.c b/src/video_capture/v4l2.c index 89cc944d6..6562d4e8c 100644 --- a/src/video_capture/v4l2.c +++ b/src/video_capture/v4l2.c @@ -5,7 +5,7 @@ * @author Martin Pulec */ /* - * Copyright (c) 2012-2025 CESNET + * Copyright (c) 2012-2026 CESNET, zájmové sdružení právických osob * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -586,7 +586,7 @@ parse_fmt(char *fmt, struct parsed_opts *opts) return true; } -static int vidcap_v4l2_init(struct vidcap_params *params, void **state) +static int vidcap_v4l2_init(const struct vidcap_params *params, void **state) { struct parsed_opts opts = { .buffer_count = DEFAULT_BUF_COUNT }; diff --git a/src/video_capture/ximea.c b/src/video_capture/ximea.c index 063f80c61..10fdc7fa7 100644 --- a/src/video_capture/ximea.c +++ b/src/video_capture/ximea.c @@ -3,7 +3,7 @@ * @author Martin Pulec */ /* - * Copyright (c) 2019-2025 CESNET + * Copyright (c) 2019-2026 CESNET, zájmové sdružení právických osob * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -231,7 +231,7 @@ static int vidcap_ximea_parse_params(struct state_vidcap_ximea *s, char *cfg) { goto error; \ } \ } while(0) -static int vidcap_ximea_init(struct vidcap_params *params, void **state) +static int vidcap_ximea_init(const struct vidcap_params *params, void **state) { if (vidcap_params_get_flags(params) & VIDCAP_FLAG_AUDIO_ANY) { return VIDCAP_INIT_AUDIO_NOT_SUPPORTED;