[libbluray-devel] [Git][videolan/libbluray][master] 2 commits: Simplify (remove unused return)
Petri Hintukainen (@hpi)
gitlab at videolan.org
Mon Jun 8 19:31:07 UTC 2026
Petri Hintukainen pushed to branch master at VideoLAN / libbluray
Commits:
eb682131 by Petri Hintukainen at 2026-06-08T21:45:18+03:00
Simplify (remove unused return)
- - - - -
8b4fb6e2 by Petri Hintukainen at 2026-06-08T22:17:26+03:00
BD-J: TitleImpl: lazy load .bdjo file
- - - - -
4 changed files:
- src/libbluray/bdj/java/org/bluray/ti/TitleImpl.java
- src/libbluray/bdj/java/org/havi/ui/HActionableHelper.java
- src/libbluray/bdj/java/org/havi/ui/HGraphicButton.java
- src/libbluray/bdj/java/org/havi/ui/HTextButton.java
Changes:
=====================================
src/libbluray/bdj/java/org/bluray/ti/TitleImpl.java
=====================================
@@ -18,15 +18,10 @@ public class TitleImpl implements Title {
this.ti = Libbluray.getTitleInfo(titleNum);
if (ti == null)
throw new SIException("Title " + titleNum + " does not exist in disc index");
- if (ti.isBdj()) {
- bdjo = Libbluray.getBdjo(ti.getBdjoName());
- if (bdjo == null)
- throw new SIException("title " + titleNum + ": Failed loading " + ti.getBdjoName() + ".bdjo");
- }
}
public PlayList[] getPlayLists() {
- if (bdjo == null)
+ if (!getBdjo())
return new PlayList[0];
org.videolan.bdjo.PlayListTable plt = bdjo.getAccessiblePlaylists();
@@ -60,7 +55,7 @@ public class TitleImpl implements Title {
}
public boolean hasAutoPlayList() {
- if (bdjo == null)
+ if (!getBdjo())
return false;
return bdjo.getAccessiblePlaylists().isAutostartFirst();
}
@@ -128,6 +123,16 @@ public class TitleImpl implements Title {
return ti;
}
+ private boolean getBdjo() {
+ if (ti.isBdj() && bdjo == null) {
+ bdjo = Libbluray.getBdjo(ti.getBdjoName());
+ if (bdjo == null) {
+ org.videolan.Logger.getLogger(TitleImpl.class.getName()).error("title " + titleNum + ": Failed loading " + ti.getBdjoName() + ".bdjo");
+ }
+ }
+ return bdjo != null;
+ }
+
private int titleNum;
private TitleInfo ti;
private Bdjo bdjo = null;
=====================================
src/libbluray/bdj/java/org/havi/ui/HActionableHelper.java
=====================================
@@ -96,10 +96,7 @@ public final class HActionableHelper {
* @param evt The HActionEvent to process
* @return The current interaction state (unchanged by action events)
*/
- public int processHActionEvent(HActionEvent evt) {
- // Get current state - action events don't change the state
- int state = hVisible.getInteractionState();
-
+ public void processHActionEvent(HActionEvent evt) {
// Play action sound
if (actionSound != null) {
actionSound.play();
@@ -109,8 +106,6 @@ public final class HActionableHelper {
if (hActionListener != null) {
hActionListener.actionPerformed(evt);
}
-
- return state;
}
/**
=====================================
src/libbluray/bdj/java/org/havi/ui/HGraphicButton.java
=====================================
@@ -96,12 +96,7 @@ public class HGraphicButton extends HIcon implements HActionable {
}
public void processHActionEvent(HActionEvent evt) {
- int state = getInteractionState();
- int newState = actionHelper.processHActionEvent(evt);
-
- if (state != newState) {
- setInteractionState(newState);
- }
+ actionHelper.processHActionEvent(evt);
}
public String getActionCommand() {
=====================================
src/libbluray/bdj/java/org/havi/ui/HTextButton.java
=====================================
@@ -98,12 +98,7 @@ public class HTextButton extends HText implements HActionable {
}
public void processHActionEvent(HActionEvent evt) {
- int state = getInteractionState();
- int newState = actionHelper.processHActionEvent(evt);
-
- if (state != newState) {
- setInteractionState(newState);
- }
+ actionHelper.processHActionEvent(evt);
}
public String getActionCommand() {
View it on GitLab: https://code.videolan.org/videolan/libbluray/-/compare/db77318fc4cb4720187983e67b689bdbae033eeb...8b4fb6e2562bb86601ea5a2c4140af6d8f3f1cf4
--
View it on GitLab: https://code.videolan.org/videolan/libbluray/-/compare/db77318fc4cb4720187983e67b689bdbae033eeb...8b4fb6e2562bb86601ea5a2c4140af6d8f3f1cf4
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the libbluray-devel
mailing list