From 5bb3dd23348bdd4d11fb9806bf399d890da2e0ed Mon Sep 17 00:00:00 2001 From: gx Date: Sun, 24 May 2026 08:43:43 +0100 Subject: [PATCH] =?UTF-8?q?50-libcuframes:=20pin=20SCRIPT=5FCOMMIT=20main?= =?UTF-8?q?=20=E2=86=92=20v0.3.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reproducibility: full ffmpeg-builds rebuild теперь fetches explicit cuframes tag, не moving main. Bump tag (v0.3.2, v0.4.0 etc.) когда нужна новая lib. cuframes v0.3.1 includes: - per-slot CUDA events (TOCTOU race fix, v0.3.0) - per-subscriber monitor thread (bitmap leak fix, v0.3.1) Co-Authored-By: Claude Opus 4.7 --- scripts.d/50-libcuframes.sh | 44 +++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 scripts.d/50-libcuframes.sh diff --git a/scripts.d/50-libcuframes.sh b/scripts.d/50-libcuframes.sh new file mode 100644 index 0000000..c236462 --- /dev/null +++ b/scripts.d/50-libcuframes.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +# cuframes — CUDA IPC zero-copy frames library + FFmpeg input demuxer. +# Static build для FFmpeg-Builds pipeline. +# +# Подключается через FFmpeg демуксер cuframesdec.c (требует patched FFmpeg — +# см. addins/cuframes.sh). + +SCRIPT_REPO="https://git.goldix.org/gx/cuframes.git" +# Pinned tag — explicit version для reproducibility builds. Bump для use new lib. +SCRIPT_COMMIT="v0.3.1" + +ffbuild_enabled() { + # Включаем только если addin cuframes активен (он экспортирует FFBUILD_HAS_CUFRAMES) + [[ -n "${FFBUILD_HAS_CUFRAMES:-}" ]] +} + +ffbuild_dockerbuild() { + git clone --depth 1 --branch "$SCRIPT_COMMIT" "$SCRIPT_REPO" cuframes + cd cuframes + + # Static-only build чтобы FFmpeg линковал .a (не .so) + cmake -B build -S . -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" \ + -DBUILD_TESTING=OFF \ + -DBUILD_EXAMPLES=OFF \ + -DBUILD_TOOLS=OFF \ + -DBUILD_FFMPEG_FILTER=OFF \ + -DBUILD_PYTHON_BINDINGS=OFF + cmake --build build -j"$(nproc)" + cmake --install build + + # Удаляем shared библиотеки — FFmpeg должен линковать только static + rm -f "$FFBUILD_PREFIX"/lib*/libcuframes.so* +} + +ffbuild_configure() { + echo --enable-libcuframes +} + +ffbuild_unconfigure() { + echo --disable-libcuframes +}