34972ae9c1
Lock-step downgrade of both packages to the revert tip of daedalus-v4l2 (PR #10 closed PRs #7 + #8). After 0.1.0+r28+g79256dc-1 / 0.1.0+r30+g6ffe92b-1 landed in production, mpv (--hwdec=vaapi-copy) failed pre-playing with "Unable to dequeue buffer: Resource temporarily unavailable" because the daemon parked CAPTURE buffers waiting for libavcodec's display-order reorder, violating libva's V4L2 stateless 1:1 contract. See daedalus-v4l2#9 for the diagnostic, #10 for the revert PR. DAEDALUS_PROTO_VERSION drops 1 → 0; install both .debs in the same apt transaction. Userspace ABI returns to the f0d4186-equivalent behaviour, plus PR #4 (cosmetic H.264 menu controls). The daedalus-v4l2-dkms #64 multi-kernel postinst behaviour stays in build-deb.sh. Visible regression: H.264 B-frame streams in Firefox return to the "2 1 4 3 6 5" pair-swap visual. Proper fix (concurrent in-flight requests in daemon + display-order reorder moved into libva-v4l2- request-fourier) tracked at daedalus-v4l2#11. Refs: * reauktion/daedalus-v4l2#9 * reauktion/daedalus-v4l2#10 (merged) * reauktion/daedalus-v4l2#11
119 lines
4.9 KiB
Bash
119 lines
4.9 KiB
Bash
# 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
|
||
|
||
# Pin the daedalus-v4l2 tip. 5d8b436 = revert of PRs #7 + #8 (the
|
||
# parking design that broke libva's 1:1 contract — see
|
||
# daedalus-v4l2#9 + #10). Tree is content-equivalent to f0d4186
|
||
# plus PR #4 (DECODE_MODE / START_CODE menu controls; cosmetic
|
||
# warning fix). PROTO_VERSION drops 1 → 0 to match — lock-step
|
||
# install with daedalus-v4l2-dkms 0.1.0.r33.5d8b436 REQUIRED.
|
||
# Proper H.264 reorder fix tracked separately at daedalus-v4l2#11.
|
||
_commit=5d8b4369e58ab947d1c56b1f718293c57c6065b5
|
||
|
||
# 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.r33.5d8b436
|
||
pkgrel=1 # reset for new upstream pin (5d8b436 — revert parking design)
|
||
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
|
||
}
|