Files
marfrit-packages/arch/daedalus-v4l2-dkms/PKGBUILD
T
claude-noether f21c1ff80a daedalus-v4l2{,-dkms}: f0d4186 -> 79256dc — H.264 B-frame reorder + menu ctrls
Lock-step bump of both packages to daedalus-v4l2#7 + #4.  PROTO_VERSION
bumps 0 → 1 at the daemon ↔ kernel chardev wire: REQ_DECODE adds
__u64 src_pts (the OUTPUT vb2 timestamp); RESP_FRAME adds __u32 flags
(HAS_PIXELS / SRC_CONSUMED) + __u64 output_src_pts (= frame->pts on
drain).  Both .debs must be installed atomically or the chardev
handshake rejects the version mismatch.

  * daedalus-v4l2: daemon's send_packet → receive_frame loop now
    stamps pkt->pts = req->src_pts and looks up the cookie for each
    drained frame via frame->pts.  chardev_client emits multiple
    RESP_FRAME messages per REQ_DECODE when libavcodec's display-
    order DPB releases an earlier frame on receipt of a later
    bitstream — fixes the "2 1 4 3 6 5" pair-swap on H.264 streams
    with B-frames.

  * daedalus-v4l2-dkms: kernel device_run mirrors src_buf timestamp
    into REQ_DECODE.src_pts.  Completion path splits HAS_PIXELS /
    SRC_CONSUMED: src is released as soon as send_packet succeeds
    (so the m2m scheduler moves on), dst stays parked until the
    matching frame is drained later.  TIMESTAMP_COPY's auto src→dst
    pairing no longer applies once lifecycles decouple — dst is
    stamped explicitly from inflight->src_pts at HAS_PIXELS time.

  * daedalus-v4l2-dkms also carries forward the -2 multi-kernel
    postinst fix (#64) from the prior PKGREL.  PKGREL resets to 1 on
    the new upstream pin.

The daedalus-v4l2#4 H.264 DECODE_MODE + START_CODE menu controls (a
cosmetic warning fix that PR landed alongside #7) is also subsumed —
"Unable to set control(s) error_idx=2/2" no longer fires.

Refs:
  * reauktion/daedalus-v4l2#7
  * reauktion/daedalus-v4l2#4
  * reauktion/daedalus-v4l2#6
2026-05-21 12:41:12 +02:00

74 lines
2.8 KiB
Bash

# Maintainer: Markus Fritsche <fritsche.markus@gmail.com>
#
# daedalus-v4l2-dkms — DKMS package for the daedalus_v4l2 out-of-tree
# kernel module (V4L2 stateless decoder shim for Pi 5 / CM5).
#
# Pair to daedalus-v4l2 (userspace daemon). When loaded, the module
# registers /dev/videoNN (V4L2 m2m) + /dev/mediaNN (media controller) +
# /dev/daedalus-v4l2 (chardev to the userspace daemon). Userspace
# clients drive the V4L2 m2m + request API path; the daemon does the
# actual FFmpeg-backed decode on /dev/daedalus-v4l2.
#
# Project: https://git.reauktion.de/reauktion/daedalus-v4l2
# Sibling userspace package: daedalus-v4l2
# Sibling consumer: libva-v4l2-request-fourier
pkgname=daedalus-v4l2-dkms
_module=daedalus_v4l2
# Same pin as arch/daedalus-v4l2 — keep kernel module + daemon
# bit-versioned together so the chardev wire protocol stays in sync.
# PROTO_VERSION 0 → 1 at this pin (H.264 B-frame reorder fix); must
# install both packages atomically.
_commit=79256dc7ef41f83873ca9c23db20f5888858e65d
pkgver=0.1.0.r28.79256dc
pkgrel=1 # reset for new upstream pin (79256dc — H.264 B-frame reorder fix)
pkgdesc="V4L2 stateless decoder shim kernel module (DKMS) — Pi 5 / CM5"
arch=('any')
url="https://git.reauktion.de/reauktion/daedalus-v4l2"
license=('GPL-2.0-or-later')
depends=('dkms')
makedepends=('git')
install="${pkgname}.install"
source=("git+https://git.reauktion.de/reauktion/daedalus-v4l2.git#commit=${_commit}"
"dkms.conf"
"${pkgname}.install")
sha256sums=('SKIP'
'SKIP'
'SKIP')
pkgver() {
cd "${srcdir}/daedalus-v4l2"
printf '0.1.0.r%s.%s' \
"$(git rev-list --count HEAD)" \
"$(git rev-parse --short=7 HEAD)"
}
package() {
local _src="${pkgdir}/usr/src/${_module}-${pkgver}"
install -dm755 "${_src}"
# Install the kernel/ subdir and embed the shared proto header in
# the same tree. The in-tree Makefile uses
# `ccflags-y += -I$(src)/../include` (assuming the parent
# daedalus-v4l2 layout); for DKMS we flatten by copying the header
# into kernel/include/ and patching the Makefile to point there.
cp -r "${srcdir}/daedalus-v4l2/kernel/." "${_src}/"
install -Dm644 "${srcdir}/daedalus-v4l2/include/daedalus_v4l2_proto.h" \
"${_src}/include/daedalus_v4l2_proto.h"
sed -i 's|-I\$(src)/\.\./include|-I$(src)/include|' "${_src}/Makefile"
# dkms.conf at the root of the source tree (DKMS convention).
# Substitute #MODULE_VERSION# placeholder with the actual pkgver
# so dkms install/uninstall match what's on disk.
install -Dm644 "${srcdir}/dkms.conf" "${_src}/dkms.conf"
sed -i "s/#MODULE_VERSION#/${pkgver}/" "${_src}/dkms.conf"
# License
install -Dm644 "${srcdir}/daedalus-v4l2/kernel/daedalus_v4l2_main.c" \
"${pkgdir}/usr/share/licenses/${pkgname}/SPDX-HEADER"
}