Play feature under the menu; add mpv path; simplify VLC launch

Root causes found this session (all player-side, disc is valid -- bd_info
validates it and mpv plays the ISO's feature directly):

- Plain 'vlc <iso>' can't run ANY BD-J: system Java is 26, and libbluray's BD-J
  needs a JVM where System.setSecurityManager() works (<=21). run-vlc.sh pins
  mise Temurin 8, which is why it gets a menu at all.
- The BD-J VFS-cache 'error creating /tmp/libbluray-bdj-cache' flood is
  libbluray's SecurityManager.canWrite() denying the cache root while an Xlet
  context is active. Fixed by pointing TMPDIR at LIBBLURAY_CACHE_ROOT (buda
  root), which canWrite() allows unconditionally.
- Menu->playback failed with 'blurayReleaseVout: subpicture channel exists':
  VLC botches the background->playlist transition for an idle BD-J menu. Now the
  Xlet starts the feature immediately and draws the menu on top, so VLC stays in
  normal playing mode; MAIN FEATURE just hides the menu, any key brings it back,
  and the feature loops.

Also: drop the redundant tools/vlc-plugins swap (system VLC already ships the
bluray plugin), and add scripts/run-mpv.sh to play the feature with no BD-J/JVM
at all. Vendored the SDK helloworld sample for reference.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
happy 2026-08-25 16:25:42 -04:00
parent 48c172cb80
commit 4c270b744f
10 changed files with 362 additions and 25 deletions

View file

@ -30,20 +30,23 @@ build/adjustments.iso
```
`make run` previews the disc by pointing VLC's Blu-ray access module at the
`build/disc` BDMV **folder**, not the ISO:
`build/disc` BDMV **folder** (a real player reads the same tree from the ISO):
```sh
vlc --bluray-menu bluray:///absolute/path/to/build/disc
```
Why the folder and not the ISO: when libbluray opens a UDF `.iso`, its BD-J
runtime must copy `BDMV/JAR/00000.jar` out of the image into a temp cache dir
before the JVM can load it. On this setup that write is refused by libbluray's
BD-J `SecurityManager`, so the Xlet class is never found and VLC silently falls
back to playing the raw playlist with no menu. Reading the folder lets
libbluray load the JAR directly, so the menu Xlet runs. The ISO is still the
artifact you burn/distribute; real players read the JAR from the disc
filesystem directly and are unaffected.
BD-J cache note: to load the menu Xlet, libbluray copies the disc's JAR and
fonts into a VFS cache under `java.io.tmpdir` (default
`/tmp/libbluray-bdj-cache`). Its BD-J `SecurityManager.canWrite()` allows writes
under the buda/persistent roots unconditionally, but only allows the VFS cache
root when no Xlet context is active on the calling thread -- and that extraction
frequently runs while a context *is* active, so the write is denied and you see
a flood of `error creating .../libbluray-bdj-cache` followed by the Xlet failing
to load (no menu). `scripts/run-vlc.sh` fixes this by pointing `TMPDIR` at the
same directory it gives libbluray as `LIBBLURAY_CACHE_ROOT` (the buda root), so
the cache path is always writable. This is a libbluray/VLC runtime quirk, not a
defect in the authored disc.
The initial menu is a Java Xlet overlay with a few bonus-feature placeholders
and a hidden menu stub. The actual generated video is a short ffmpeg SMPTE bars