[libbluray-devel] TitleContextImpl: post SelectionFailedEvent when selection fails

hpi1 git at videolan.org
Thu Oct 9 12:11:56 CEST 2014


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Thu Oct  9 13:09:54 2014 +0300| [a2928ad9b43aeae1c228c6a8273d3d5b42edbc82] | committer: hpi1

TitleContextImpl: post SelectionFailedEvent when selection fails

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

 .../bdj/java/org/bluray/ti/selection/TitleContextImpl.java        |    5 +++++
 1 file changed, 5 insertions(+)

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 e56d1c9..cd89eff 100644
--- a/src/libbluray/bdj/java/org/bluray/ti/selection/TitleContextImpl.java
+++ b/src/libbluray/bdj/java/org/bluray/ti/selection/TitleContextImpl.java
@@ -27,6 +27,7 @@ import javax.tv.service.Service;
 import javax.tv.service.selection.InvalidServiceComponentException;
 import javax.tv.service.selection.NormalContentEvent;
 import javax.tv.service.selection.PresentationTerminatedEvent;
+import javax.tv.service.selection.SelectionFailedEvent;
 import javax.tv.service.selection.ServiceContentHandler;
 import javax.tv.service.selection.ServiceContextDestroyedEvent;
 import javax.tv.service.selection.ServiceContextEvent;
@@ -120,6 +121,8 @@ public class TitleContextImpl implements TitleContext {
                 context.title = title;
                 context.state = STATE_STARTED;
                 context.postEvent(new NormalContentEvent(context));
+            } else {
+                context.postEvent(new SelectionFailedEvent(context, SelectionFailedEvent.OTHER));
             }
         }
 
@@ -139,6 +142,8 @@ public class TitleContextImpl implements TitleContext {
                     context.postEvent(new ServiceContextDestroyedEvent(context));
                 else
                     context.state = STATE_STOPPED;
+            } else {
+                context.postEvent(new SelectionFailedEvent(context, SelectionFailedEvent.OTHER));
             }
         }
 



More information about the libbluray-devel mailing list