Files
marfrit-packages/arch/daedalus-v4l2/PKGBUILD
T
claude-noether c9a4b82f2c daedalus-v4l2: 5d8b436 -> 77e14e5 — picks up #12 (LOW_DELAY) + #13 (daedalus-fourier linkage)
Daemon-only bump (no daedalus-v4l2-dkms change needed; PROTO_VERSION
stays at 0).

#12 (LOW_DELAY half-measure): daemon sets AV_CODEC_FLAG_LOW_DELAY on
the H.264 AVCodecContext so libavcodec emits frames in decode order
~99% of the time (a few stragglers at GOP boundaries when the
stream's SPS num_reorder_frames overrides the flag).  Visible
improvement vs the 2-1-4-3 pair-swap on Firefox + mpv playback;
not the permanent fix — see daedalus-v4l2#11 for the architectural
plan to substitute daedalus-fourier kernels for libavcodec's
pixel math one cycle at a time.

#13 (daedalus-fourier linkage): daemon now pkg-config-links against
the daedalus-fourier kernel library (marfrit/daedalus-fourier) and
logs substrate availability at startup.  No kernels dispatched yet
— this is the build-time foundation for the substitution work.

build-deb.sh updated to fetch + build + install daedalus-fourier
(pinned at d87239d, marfrit/daedalus-fourier PR #1) into a per-
build temp prefix before invoking the daemon's cmake, exposing it
via PKG_CONFIG_PATH.  Static-linked, so the resulting .deb has no
new runtime deps.  Requires libvulkan-dev + glslang-tools on the
CI runner.

Arch PKGBUILD bumped to the same upstream commit but Arch packaging
for daedalus-fourier itself is a follow-up; until that lands the
Arch build expects daedalus-fourier installed by the user (AUR-style).
Debian-side is end-to-end self-contained via build-deb.sh.

Refs:
  * reauktion/daedalus-v4l2#12
  * reauktion/daedalus-v4l2#13
  * reauktion/daedalus-v4l2#11
  * marfrit/daedalus-fourier#1
2026-05-21 18:39:22 +02:00

121 lines
5.0 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Maintainer: Markus Fritsche <fritsche.markus@gmail.com>
#
# daedalus-v4l2 — userspace daemon + V4L2 m2m test tools.
#
# Pair to daedalus-v4l2-dkms (kernel module). Together they expose
# /dev/videoNN + /dev/mediaNN as a V4L2 stateless decoder shim on Pi 5 /
# CM5, decoding VP9 / AV1 / H.264 via dlopen'd FFmpeg in a single-
# threaded daemon and shipping decoded NV12 / P010 back through dmabuf.
# Consumed end-to-end by libva-v4l2-request-fourier (>= 1.0.0.r376) so
# `ffmpeg -hwaccel vaapi` against vp9_small.ivf produces byte-exact NV12.
#
# Project: https://git.reauktion.de/reauktion/daedalus-v4l2
# Sibling kernel package: daedalus-v4l2-dkms
# Sibling consumer: libva-v4l2-request-fourier
pkgname=daedalus-v4l2
_upstreampkg=daedalus-v4l2
# 77e14e5 = post-revert state plus daedalus-v4l2 PRs #12 (LOW_DELAY
# half-measure for the H.264 display-reorder visual) and #13 (daemon
# now links daedalus-fourier and logs substrate availability at
# startup). Daemon now needs `daedalus-fourier` at build time —
# Arch packaging for that sibling library is a follow-up; until it
# lands as an AUR-style PKGBUILD, this Arch build expects
# daedalus-fourier installed to /usr/local (or equivalent) by the
# user. See debian/daedalus-v4l2/build-deb.sh for the Debian-side
# in-build fetch-and-install of daedalus-fourier.
_commit=77e14e5a192f0eef0b41dd1140205e29d13d4d58
# 0.1.0 (pre-1.0) + commit count + short sha. Bump the .Y on each
# Phase 8.x close. pkgver() recomputes at build time.
pkgver=0.1.0.r37.77e14e5
pkgrel=1 # reset for new upstream pin (77e14e5 — daedalus-fourier linkage)
pkgdesc="Userspace daemon for the daedalus-v4l2 V4L2 stateless decoder shim (VP9/AV1/H.264 on Pi 5 / CM5)"
arch=('aarch64')
url="https://git.reauktion.de/reauktion/daedalus-v4l2"
license=('BSD-2-Clause' 'GPL-2.0-or-later')
# Daemon dlopens libavformat.so.61 / libavcodec.so.61 / libavutil.so.59
# at runtime (Option γ — see daemon/src/ffmpeg_loader.h). ffmpeg
# provides those; we don't link them.
depends=('ffmpeg' 'libdrm')
# Headers from libav*-dev needed at compile time for type-safe function
# pointer signatures; pkg-config locates them.
makedepends=('cmake' 'ninja' 'pkgconf' 'git' 'ffmpeg')
optdepends=('daedalus-v4l2-dkms: kernel module providing /dev/video0 + /dev/daedalus-v4l2'
'libva-v4l2-request-fourier: VA-API consumer routing through this daemon')
install="${pkgname}.install"
source=("git+https://git.reauktion.de/reauktion/daedalus-v4l2.git#commit=${_commit}"
"${pkgname}.install")
sha256sums=('SKIP'
'SKIP')
pkgver() {
cd "${srcdir}/${_upstreampkg}"
printf '0.1.0.r%s.%s' \
"$(git rev-list --count HEAD)" \
"$(git rev-parse --short=7 HEAD)"
}
build() {
cd "${srcdir}/${_upstreampkg}/daemon"
cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr
cmake --build build
cd "${srcdir}/${_upstreampkg}/tools"
make
}
package() {
cd "${srcdir}/${_upstreampkg}"
# Daemon binary
install -Dm755 daemon/build/daedalus_v4l2_daemon \
"${pkgdir}/usr/bin/daedalus_v4l2_daemon"
# Test tools (under /usr/libexec to keep them out of the default PATH
# — they're for verification, not daily use).
install -Dm755 tools/test_chardev_pingpong \
"${pkgdir}/usr/libexec/daedalus-v4l2/test_chardev_pingpong"
install -Dm755 tools/test_m2m_decode \
"${pkgdir}/usr/libexec/daedalus-v4l2/test_m2m_decode"
install -Dm755 tools/test_m2m_stream \
"${pkgdir}/usr/libexec/daedalus-v4l2/test_m2m_stream"
# Shared wire-protocol header (kernel ↔ daemon); useful for
# third-party clients of the chardev.
install -Dm644 include/daedalus_v4l2_proto.h \
"${pkgdir}/usr/include/daedalus_v4l2_proto.h"
# systemd unit + module autoload — without these the daemon never
# starts and the libva/VAAPI consumer's REQ_DECODE has nobody on
# the other end of /dev/daedalus-v4l2.
install -Dm644 packaging/systemd/daedalus-v4l2.service \
"${pkgdir}/usr/lib/systemd/system/daedalus-v4l2.service"
install -Dm644 packaging/systemd/daedalus-v4l2.modules-load \
"${pkgdir}/usr/lib/modules-load.d/daedalus-v4l2.conf"
# Documentation
install -Dm644 README.md \
"${pkgdir}/usr/share/doc/${pkgname}/README.md"
for d in docs/*.md; do
install -Dm644 "$d" "${pkgdir}/usr/share/doc/${pkgname}/$(basename "$d")"
done
# Licenses: BSD-2-Clause for daemon/tools, GPL for the kernel proto
# header; the SPDX headers in src/ are the canonical declaration but
# ship a short note here for package-manager-driven license queries.
install -dm755 "${pkgdir}/usr/share/licenses/${pkgname}"
cat > "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" <<'EOF'
daedalus-v4l2 userspace components are BSD-2-Clause licensed.
The shared kernel↔daemon wire protocol header
(/usr/include/daedalus_v4l2_proto.h) is GPL-2.0-or-later WITH
Linux-syscall-note for kernel-side compatibility. See SPDX
headers on individual source files for the canonical
per-file declaration.
EOF
}