[libbluray-devel] BDJLoader: start autoplaylist before starting Xlets

hpi1 git at videolan.org
Fri Dec 4 09:58:38 CET 2015


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Fri Dec  4 10:50:10 2015 +0200| [47a0a954b5726ec793b984e1ac2a260f3395444a] | committer: hpi1

BDJLoader: start autoplaylist before starting Xlets

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=47a0a954b5726ec793b984e1ac2a260f3395444a
---

 src/libbluray/bdj/java/org/videolan/BDJLoader.java |   22 ++++++++++++--------
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/src/libbluray/bdj/java/org/videolan/BDJLoader.java b/src/libbluray/bdj/java/org/videolan/BDJLoader.java
index 59410c5..9c4d398 100644
--- a/src/libbluray/bdj/java/org/videolan/BDJLoader.java
+++ b/src/libbluray/bdj/java/org/videolan/BDJLoader.java
@@ -266,6 +266,19 @@ public class BDJLoader {
             // notify AppsDatabase
             ((BDJAppsDatabase)BDJAppsDatabase.getAppsDatabase()).newDatabase(bdjo, proxys);
 
+            // auto start playlist
+            try {
+                PlayListTable plt = bdjo.getAccessiblePlaylists();
+                if ((plt != null) && (plt.isAutostartFirst())) {
+                    logger.info("Auto-starting playlist");
+                    String[] pl = plt.getPlayLists();
+                    if (pl.length > 0)
+                        Manager.createPlayer(new MediaLocator(new BDLocator("bd://PLAYLIST:" + pl[0]))).start();
+                }
+            } catch (Exception e) {
+                logger.error("loadN(): autoplaylist failed: " + e + "\n" + Logger.dumpStack(e));
+            }
+
             // now run all the xlets
             for (int i = 0; i < appTable.length; i++) {
                 int code = appTable[i].getControlCode();
@@ -282,15 +295,6 @@ public class BDJLoader {
 
             logger.info("Finished initializing and starting xlets.");
 
-            // auto start playlist
-            PlayListTable plt = bdjo.getAccessiblePlaylists();
-            if ((plt != null) && (plt.isAutostartFirst())) {
-                logger.info("Auto-starting playlist");
-                String[] pl = plt.getPlayLists();
-                if (pl.length > 0)
-                    Manager.createPlayer(new MediaLocator(new BDLocator("bd://PLAYLIST:" + pl[0]))).start();
-            }
-
             return true;
 
         } catch (Throwable e) {



More information about the libbluray-devel mailing list