libbluray | branch: master | hpi1 <[email protected]> | Thu Oct 29 13:47:27 2015 +0200| [aa7675c4eee2ab69def5d1be8e34b0b40940252a] | committer: hpi1
TitleContextImpl: add logging > http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=aa7675c4eee2ab69def5d1be8e34b0b40940252a --- .../java/org/bluray/ti/selection/TitleContextImpl.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/libbluray/bdj/java/org/bluray/ti/selection/TitleContextImpl.java b/src/libbluray/bdj/java/org/bluray/ti/selection/TitleContextImpl.java index 256e88e..48d70be 100644 --- a/src/libbluray/bdj/java/org/bluray/ti/selection/TitleContextImpl.java +++ b/src/libbluray/bdj/java/org/bluray/ti/selection/TitleContextImpl.java @@ -38,9 +38,11 @@ import javax.tv.service.selection.ServiceContextPermission; import org.bluray.ti.Title; import org.bluray.ti.TitleImpl; + import org.videolan.BDJLoader; import org.videolan.BDJLoaderCallback; import org.videolan.BDJListeners; +import org.videolan.Logger; import org.videolan.media.content.PlayerManager; public class TitleContextImpl implements TitleContext { @@ -71,16 +73,20 @@ public class TitleContextImpl implements TitleContext { } public void start(Title title, boolean restart) throws SecurityException { + logger.info("start(" + title.getName() + ", restart=" + restart + ")"); + SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new SelectPermission(title.getLocator(), "own")); } - - if (state == STATE_DESTROYED) + if (state == STATE_DESTROYED) { + logger.error("start() failed: Title Context already destroyed"); throw new IllegalStateException(); + } if (!restart && (this.title == null || !title.equals(this.title))) { /* force restarting of service bound Xlets when title changes */ + logger.info("start(): title changed, force restart"); restart = true; } @@ -90,6 +96,7 @@ public class TitleContextImpl implements TitleContext { } public void select(Service service) throws SecurityException { + logger.info("select(" + service.getName() + ")"); start((Title)service, true); } @@ -102,6 +109,8 @@ public class TitleContextImpl implements TitleContext { } public void stop() throws SecurityException { + logger.info("stop()"); + SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new ServiceContextPermission("stop", "own")); @@ -193,4 +202,6 @@ public class TitleContextImpl implements TitleContext { private BDJListeners listeners = new BDJListeners(); private TitleImpl title = null; private int state = STATE_STOPPED; + + private static final Logger logger = Logger.getLogger(TitleContextImpl.class.getName()); } _______________________________________________ libbluray-devel mailing list [email protected] https://mailman.videolan.org/listinfo/libbluray-devel
