[libbluray-devel] BDJActionQueue: actions are always executed in context-specific queue

hpi1 git at videolan.org
Sat Dec 21 08:52:26 CET 2013


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Thu Dec 19 14:05:02 2013 +0200| [382d4c9e1bc89207e8e137ffa0c20c6765e16c46] | committer: hpi1

BDJActionQueue: actions are always executed in context-specific queue

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

 src/libbluray/bdj/java/org/videolan/BDJAction.java      |   10 ----------
 src/libbluray/bdj/java/org/videolan/BDJActionQueue.java |   12 ++----------
 2 files changed, 2 insertions(+), 20 deletions(-)

diff --git a/src/libbluray/bdj/java/org/videolan/BDJAction.java b/src/libbluray/bdj/java/org/videolan/BDJAction.java
index 3e9d1f3..a4be70e 100644
--- a/src/libbluray/bdj/java/org/videolan/BDJAction.java
+++ b/src/libbluray/bdj/java/org/videolan/BDJAction.java
@@ -20,15 +20,6 @@ package org.videolan;
 
 public abstract class BDJAction {
     public BDJAction() {
-        this(BDJXletContext.getCurrentContext());
-    }
-
-    public BDJAction(BDJXletContext context) {
-        this.context = context;
-    }
-
-    public BDJXletContext getContext() {
-        return context;
     }
 
     public int getState() {
@@ -77,7 +68,6 @@ public abstract class BDJAction {
 
     protected abstract void doAction();
 
-    private BDJXletContext context;
     private int state = NOT_PROCESSED;
 
     public static final int NOT_PROCESSED = 0;
diff --git a/src/libbluray/bdj/java/org/videolan/BDJActionQueue.java b/src/libbluray/bdj/java/org/videolan/BDJActionQueue.java
index 2bdd9a6..41969fc 100644
--- a/src/libbluray/bdj/java/org/videolan/BDJActionQueue.java
+++ b/src/libbluray/bdj/java/org/videolan/BDJActionQueue.java
@@ -20,17 +20,13 @@ package org.videolan;
 
 import java.util.LinkedList;
 
-public class BDJActionQueue implements Runnable {
+class BDJActionQueue implements Runnable {
     public BDJActionQueue() {
-        group = new BDJThreadGroup("ActionQueue", null);
-        thread = new Thread(group, this);
-        thread.setDaemon(true);
-        thread.start();
+        this(null);
     }
 
     public BDJActionQueue(BDJThreadGroup threadGroup) {
         /* run all actions in given thread group / xlet context */
-        group = null;
         thread = new Thread(threadGroup, this);
         thread.setDaemon(true);
         thread.start();
@@ -60,9 +56,6 @@ public class BDJActionQueue implements Runnable {
             if (action == null)
                 return;
             try {
-                if (group != null) {
-                    group.setContext(((BDJAction)action).getContext());
-                }
                 ((BDJAction)action).process();
             } catch (Throwable e) {
                 e.printStackTrace();
@@ -79,7 +72,6 @@ public class BDJActionQueue implements Runnable {
         }
     }
 
-    private BDJThreadGroup group;
     private Thread thread;
     private LinkedList actions = new LinkedList();
 }



More information about the libbluray-devel mailing list