[libbluray-devel] BDJ: simplify HDMV title selection
hpi1
git at videolan.org
Tue Mar 3 13:05:11 CET 2015
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Tue Mar 3 13:52:49 2015 +0200| [39ce13f64100444049e80a165176f8d1c6de566c] | committer: hpi1
BDJ: simplify HDMV title selection
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=39ce13f64100444049e80a165176f8d1c6de566c
---
src/libbluray/bdj/java/org/videolan/BDJLoader.java | 2 +-
src/libbluray/bdj/java/org/videolan/Libbluray.java | 16 +++-------------
2 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/src/libbluray/bdj/java/org/videolan/BDJLoader.java b/src/libbluray/bdj/java/org/videolan/BDJLoader.java
index 6edffbc..9b368d4 100644
--- a/src/libbluray/bdj/java/org/videolan/BDJLoader.java
+++ b/src/libbluray/bdj/java/org/videolan/BDJLoader.java
@@ -122,7 +122,7 @@ public class BDJLoader {
if (!ti.isBdj()) {
logger.info("Not BD-J title - requesting HDMV title start");
unloadN();
- return Libbluray.selectTitle(title);
+ return Libbluray.selectHdmvTitle(title.getTitleNum());
}
try {
diff --git a/src/libbluray/bdj/java/org/videolan/Libbluray.java b/src/libbluray/bdj/java/org/videolan/Libbluray.java
index 7f118eb..231eae5 100644
--- a/src/libbluray/bdj/java/org/videolan/Libbluray.java
+++ b/src/libbluray/bdj/java/org/videolan/Libbluray.java
@@ -272,19 +272,9 @@ public class Libbluray {
selectPlaylistN(nativePointer, -1, -1, -1, -1);
}
- protected static boolean selectTitle(TitleImpl title) {
- TitleInfo ti = title.getTitleInfo();
- if (ti.isBdj()) {
- try {
- ((TitleContext)ServiceContextFactory.getInstance().getServiceContext(null)).select(title);
- return true;
- } catch (Exception e) {
- System.err.println("selectTitle() failed: " + e + "\n" + Logger.dumpStack(e));
- return false;
- }
- }
-
- return selectTitleN(nativePointer, title.getTitleNum()) == 1 ? true : false;
+ /* called by BDJLoader to select HDMV title */
+ protected static boolean selectHdmvTitle(int title) {
+ return selectTitleN(nativePointer, title) == 1 ? true : false;
}
public static boolean selectAngle(int angle) {
More information about the libbluray-devel
mailing list