[libbluray-devel] Moved xlet thread group to BDJXletContext
hpi1
git at videolan.org
Sun Apr 14 15:08:59 CEST 2013
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Thu Apr 11 21:03:52 2013 +0300| [e3d948148f62f07d92b9a8cafed25e6e9f7938ee] | committer: hpi1
Moved xlet thread group to BDJXletContext
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=e3d948148f62f07d92b9a8cafed25e6e9f7938ee
---
src/libbluray/bdj/java/org/videolan/BDJAppProxy.java | 8 ++------
src/libbluray/bdj/java/org/videolan/BDJXletContext.java | 10 ++++++++++
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/src/libbluray/bdj/java/org/videolan/BDJAppProxy.java b/src/libbluray/bdj/java/org/videolan/BDJAppProxy.java
index 63b2716..3ca8a6c 100644
--- a/src/libbluray/bdj/java/org/videolan/BDJAppProxy.java
+++ b/src/libbluray/bdj/java/org/videolan/BDJAppProxy.java
@@ -33,10 +33,7 @@ public class BDJAppProxy implements DVBJProxy, Runnable {
public BDJAppProxy(BDJXletContext context) {
this.context = context;
state = NOT_LOADED;
- threadGroup = new BDJThreadGroup((String)context.getXletProperty("dvb.org.id") + "." +
- (String)context.getXletProperty("dvb.app.id"),
- context);
- thread = new Thread(threadGroup, this);
+ thread = new Thread(context.getThreadGroup(), this);
thread.setDaemon(true);
thread.start();
@@ -237,7 +234,7 @@ public class BDJAppProxy implements DVBJProxy, Runnable {
if ((state != NOT_LOADED) && (state != LOADED)) {
try {
xlet.destroyXlet(force);
- for (int i = 0; (i < 50) && (threadGroup.activeCount() > 1); i++)
+ for (int i = 0; (i < 50) && (context.getThreadGroup().activeCount() > 1); i++)
Thread.sleep(20L);
String persistent = System.getProperty("dvb.persistent.root") + File.separator +
(String)context.getXletProperty("dvb.org.id") + File.separator +
@@ -357,7 +354,6 @@ public class BDJAppProxy implements DVBJProxy, Runnable {
private int state;
private LinkedList listeners = new LinkedList();
private LinkedList cmds = new LinkedList();
- private BDJThreadGroup threadGroup;
private Thread thread;
private class AppCommand {
diff --git a/src/libbluray/bdj/java/org/videolan/BDJXletContext.java b/src/libbluray/bdj/java/org/videolan/BDJXletContext.java
index 952c785..da98998 100644
--- a/src/libbluray/bdj/java/org/videolan/BDJXletContext.java
+++ b/src/libbluray/bdj/java/org/videolan/BDJXletContext.java
@@ -42,6 +42,11 @@ public class BDJXletContext implements javax.tv.xlet.XletContext, javax.microedi
entry.getClassPathExt(),
entry.getInitialClass());
this.container = container;
+
+ this.threadGroup = new BDJThreadGroup(Integer.toHexString(appid.getOID()) + "." +
+ Integer.toHexString(appid.getAID()) + "." +
+ entry.getInitialClass(),
+ this);
}
public Object getXletProperty(String key) {
@@ -83,6 +88,10 @@ public class BDJXletContext implements javax.tv.xlet.XletContext, javax.microedi
return loader;
}
+ public BDJThreadGroup getThreadGroup() {
+ return threadGroup;
+ }
+
protected void setEventQueue(EventQueue eq) {
eventQueue = eq;
}
@@ -148,4 +157,5 @@ public class BDJXletContext implements javax.tv.xlet.XletContext, javax.microedi
private Container container;
private EventQueue eventQueue = null;
private HSceneFactory sceneFactory = null;
+ private BDJThreadGroup threadGroup = null;
}
More information about the libbluray-devel
mailing list