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:
parent
48c172cb80
commit
4c270b744f
10 changed files with 362 additions and 25 deletions
6
vendor/bdj-sdk/samples/helloworld/.gitignore
vendored
Normal file
6
vendor/bdj-sdk/samples/helloworld/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
*~
|
||||
*.class
|
||||
discdir
|
||||
META-INF
|
||||
*.iso
|
||||
|
||||
80
vendor/bdj-sdk/samples/helloworld/Makefile
vendored
Normal file
80
vendor/bdj-sdk/samples/helloworld/Makefile
vendored
Normal 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 $<
|
||||
82
vendor/bdj-sdk/samples/helloworld/src/org/homebrew/LoggingUI.java
vendored
Normal file
82
vendor/bdj-sdk/samples/helloworld/src/org/homebrew/LoggingUI.java
vendored
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
package org.homebrew;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Container;
|
||||
import java.awt.Font;
|
||||
import java.awt.Graphics;
|
||||
import java.io.StringWriter;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class LoggingUI extends Container {
|
||||
private final Font font = new Font(null, Font.PLAIN, 14);
|
||||
private final Color fontColor = new Color(240, 240, 240);
|
||||
private final Color bgColor = new Color(5, 5, 5);
|
||||
private final ArrayList rows = new ArrayList();
|
||||
private static LoggingUI instance = null;
|
||||
|
||||
private LoggingUI() {
|
||||
}
|
||||
|
||||
public static LoggingUI getInstance() {
|
||||
if(instance == null) {
|
||||
instance = new LoggingUI();
|
||||
}
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
public void paint(Graphics g) {
|
||||
g.setFont(font);
|
||||
g.setColor(bgColor);
|
||||
g.fillRect(20, 20, getWidth() - 40, getHeight() - 40);
|
||||
g.setColor(fontColor);
|
||||
|
||||
for(int i=0; i<rows.size(); i++) {
|
||||
String row = (String)rows.get(i);
|
||||
int len = g.getFontMetrics().stringWidth(row);
|
||||
g.drawString(row, 30, 40 + (i*15));
|
||||
}
|
||||
}
|
||||
|
||||
public void log(String msg) {
|
||||
rows.add(msg);
|
||||
if(rows.size() > 45) {
|
||||
rows.remove(0);
|
||||
}
|
||||
repaint();
|
||||
}
|
||||
|
||||
public void log(Throwable t) {
|
||||
StringWriter sw = new StringWriter();
|
||||
PrintWriter pw = new PrintWriter(sw);
|
||||
StringBuffer sb = new StringBuffer();
|
||||
|
||||
t.printStackTrace(pw);
|
||||
String st = sw.toString();
|
||||
|
||||
for(int i=0; i<st.length(); i++) {
|
||||
char ch = st.charAt(i);
|
||||
|
||||
switch(ch) {
|
||||
case '\t':
|
||||
sb.append(" ");
|
||||
break;
|
||||
|
||||
case '\n':
|
||||
log(sb.toString());
|
||||
sb = new StringBuffer();
|
||||
break;
|
||||
|
||||
default:
|
||||
sb.append(ch);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(sb.length() > 0) {
|
||||
log(sb.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
46
vendor/bdj-sdk/samples/helloworld/src/org/homebrew/MyXlet.java
vendored
Normal file
46
vendor/bdj-sdk/samples/helloworld/src/org/homebrew/MyXlet.java
vendored
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
package org.homebrew;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import javax.tv.xlet.Xlet;
|
||||
import javax.tv.xlet.XletContext;
|
||||
import org.havi.ui.HScene;
|
||||
import org.havi.ui.HSceneFactory;
|
||||
|
||||
public class MyXlet extends Thread implements Xlet {
|
||||
private HScene scene;
|
||||
private LoggingUI logUI;
|
||||
|
||||
public void initXlet(XletContext context) {
|
||||
logUI = LoggingUI.getInstance();
|
||||
logUI.setSize(1280, 720);
|
||||
|
||||
scene = HSceneFactory.getInstance().getDefaultHScene();
|
||||
scene.add(logUI, BorderLayout.CENTER);
|
||||
scene.validate();
|
||||
scene.repaint();
|
||||
}
|
||||
|
||||
public void startXlet() {
|
||||
logUI.setVisible(true);
|
||||
scene.setVisible(true);
|
||||
start();
|
||||
}
|
||||
|
||||
public void pauseXlet() {
|
||||
logUI.setVisible(false);
|
||||
}
|
||||
|
||||
public void destroyXlet(boolean unconditional) {
|
||||
interrupt();
|
||||
logUI.setVisible(false);
|
||||
scene.remove(logUI);
|
||||
scene = null;
|
||||
}
|
||||
|
||||
public void run() {
|
||||
logUI.log("Hello, World!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
12
vendor/bdj-sdk/samples/helloworld/src/org/homebrew/bluray.MyXlet.perm
vendored
Normal file
12
vendor/bdj-sdk/samples/helloworld/src/org/homebrew/bluray.MyXlet.perm
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<n:permissionrequestfile xmlns:n="urn:BDA:bdmv;PRF" orgid="0x56789abc" appid="0x4000">
|
||||
<file value="true"></file>
|
||||
<applifecyclecontrol value="true"></applifecyclecontrol>
|
||||
<servicesel value="true"></servicesel>
|
||||
<userpreferences read="true" write="true"></userpreferences>
|
||||
<bd-vfs value="true"></bd-vfs>
|
||||
<network>
|
||||
<host action="connect,resolve,listen">*</host>
|
||||
</network>
|
||||
<bd-bindingunitarea value="true" />
|
||||
</n:permissionrequestfile>
|
||||
Loading…
Add table
Add a link
Reference in a new issue