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

@ -0,0 +1,80 @@
# Copyright (C) 2022 John Törnblom
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING. If not see
# <http://www.gnu.org/licenses/>.
DISC_LABEL := helloworld
#
# Host tools
#
MAKEFILE_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
BDJSDK_HOME ?= $(MAKEFILE_DIR)/../../
BDSIGNER := $(BDJSDK_HOME)/host/bin/bdsigner
MAKEFS := $(BDJSDK_HOME)/host/bin/makefs
JAVA8_HOME ?= $(BDJSDK_HOME)/host/jdk8
JAVAC := $(JAVA8_HOME)/bin/javac
JAR := $(JAVA8_HOME)/bin/jar
export JAVA8_HOME
#
# Compilation artifacts
#
CLASSPATH := $(BDJSDK_HOME)/target/lib/enhanced-stubs.zip
SOURCES := $(wildcard src/org/homebrew/*.java)
JFLAGS := -Xlint:-options -source 1.3 -target 1.3
#
# Disc files
#
TMPL_DIRS := $(shell find $(BDJSDK_HOME)/resources/AVCHD/ -type d)
TMPL_FILES := $(shell find $(BDJSDK_HOME)/resources/AVCHD/ -type f)
DISC_DIRS := $(patsubst $(BDJSDK_HOME)/resources/AVCHD%,discdir%,$(TMPL_DIRS)) \
discdir/BDMV/JAR
DISC_FILES := $(patsubst $(BDJSDK_HOME)/resources/AVCHD%,discdir%,$(TMPL_FILES)) \
discdir/BDMV/JAR/00000.jar
all: $(DISC_LABEL).iso
discdir:
mkdir -p $(DISC_DIRS)
discdir/BDMV/JAR/00000.jar: discdir $(SOURCES)
$(JAVAC) $(JFLAGS) -cp $(CLASSPATH) $(SOURCES)
$(JAR) cf $@ -C src/ .
$(BDSIGNER) -keystore $(BDJSDK_HOME)/resources/sig.ks $@
discdir/%: discdir
cp $(BDJSDK_HOME)/resources/AVCHD/$* $@
$(DISC_LABEL).iso: $(DISC_FILES)
$(MAKEFS) -m 16m -t udf -o T=bdre,v=2.50,L=$(DISC_LABEL) $@ discdir
clean:
rm -rf META-INF $(DISC_LABEL).iso discdir src/org/homebrew/*.class
test: $(DISC_LABEL).iso
vlc $<