mirror of
https://github.com/lhns/steam-frame-nix.git
synced 2026-10-06 04:04:16 +02:00
Jellyfin Desktop hard-sets mpv's hwdec=auto-copy, whose probe list leaves out V4L2 M2M, and the Flatpak can't see the Frame's V4L2 decoder. An LD_PRELOAD shim (preloaded straight from the store, only that path exposed read-only) rewrites hwdec to v4l2m2m-copy,auto-copy; devices=all makes the decoder visible. Overrides via nix-flatpak, or a home-manager-owned override file without it.
10 lines
503 B
Nix
10 lines
503 B
Nix
# The mpv hwdec shim (mpv-hwdec-shim.c) as lib/mpv-hwdec-shim.so. It runs
|
|
# against the Flatpak runtime's glibc, so it links only libc (no rpath) and
|
|
# must not need symbols newer than GLIBC_2.34 (dlsym's version; see check.nix).
|
|
{ runCommandCC, patchelf }:
|
|
runCommandCC "mpv-hwdec-shim" { nativeBuildInputs = [ patchelf ]; } ''
|
|
mkdir -p $out/lib
|
|
$CC -shared -fPIC -O2 -Wall -Wextra -Werror -o $out/lib/mpv-hwdec-shim.so ${./mpv-hwdec-shim.c}
|
|
patchelf --remove-rpath $out/lib/mpv-hwdec-shim.so
|
|
''
|