[libbluray-devel] Use correct event object types

hpi1 git at videolan.org
Mon Apr 6 18:27:23 CEST 2015


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon Apr  6 19:02:29 2015 +0300| [fef4edbd653988b74a1e04a992aac895137cc21b] | committer: hpi1

Use correct event object types

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

 contrib/libudfread                                    |    2 +-
 src/libbluray/bdj/java/org/videolan/BDJListeners.java |   12 +++++++-----
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/contrib/libudfread b/contrib/libudfread
index b09ef7d..f73b9e1 160000
--- a/contrib/libudfread
+++ b/contrib/libudfread
@@ -1 +1 @@
-Subproject commit b09ef7d8e9a886b37084bfd9570a17c1a7e65c27
+Subproject commit f73b9e1ebbf940814cc118c2e9f258e372088595
diff --git a/src/libbluray/bdj/java/org/videolan/BDJListeners.java b/src/libbluray/bdj/java/org/videolan/BDJListeners.java
index f4b481f..77acf4d 100644
--- a/src/libbluray/bdj/java/org/videolan/BDJListeners.java
+++ b/src/libbluray/bdj/java/org/videolan/BDJListeners.java
@@ -18,6 +18,7 @@
  */
 package org.videolan;
 
+import java.util.EventObject;
 import java.util.Iterator;
 import java.util.LinkedList;
 
@@ -50,9 +51,11 @@ import org.davic.resources.ResourceStatusListener;
 
 import org.dvb.application.AppsDatabaseEvent;
 import org.dvb.application.AppsDatabaseEventListener;
+import org.dvb.media.SubtitleAvailableEvent;
 import org.dvb.media.SubtitleListener;
-import java.util.EventObject;
-
+import org.dvb.media.SubtitleNotAvailableEvent;
+import org.dvb.media.SubtitleNotSelectedEvent;
+import org.dvb.media.SubtitleSelectedEvent;
 
 public class BDJListeners {
     private LinkedList listeners = new LinkedList();
@@ -213,9 +216,8 @@ public class BDJListeners {
                     break;
                 }
 
-            /* need to use wrapper if some other callback uses EventObject */
-            } else if (event instanceof EventObject &&
-                       listener instanceof SubtitleListener) {
+            } else if (event instanceof SubtitleAvailableEvent || event instanceof SubtitleNotAvailableEvent ||
+                       event instanceof SubtitleNotSelectedEvent || event instanceof SubtitleSelectedEvent) {
                 ((SubtitleListener)listener).subtitleStatusChanged((EventObject)event);
 
             } else if (event instanceof PSR102Status) {



More information about the libbluray-devel mailing list