[libbluray-devel] BD-J player: post javax.media.StopTimeChange event
hpi1
git at videolan.org
Fri Apr 15 12:19:09 CEST 2016
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Thu Apr 14 23:23:32 2016 +0300| [6a14a40b6d7ba13aa6cce8870a0141bff5e698df] | committer: hpi1
BD-J player: post javax.media.StopTimeChange event
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=6a14a40b6d7ba13aa6cce8870a0141bff5e698df
---
.../bdj/java/org/videolan/media/content/BDHandler.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/libbluray/bdj/java/org/videolan/media/content/BDHandler.java b/src/libbluray/bdj/java/org/videolan/media/content/BDHandler.java
index 9180610..ac00191 100644
--- a/src/libbluray/bdj/java/org/videolan/media/content/BDHandler.java
+++ b/src/libbluray/bdj/java/org/videolan/media/content/BDHandler.java
@@ -44,6 +44,7 @@ import javax.media.RealizeCompleteEvent;
import javax.media.ResourceUnavailableEvent;
import javax.media.StartEvent;
import javax.media.StopByRequestEvent;
+import javax.media.StopTimeChangeEvent;
import javax.media.Time;
import javax.media.TimeBase;
import javax.media.TransitionEvent;
@@ -184,6 +185,8 @@ public abstract class BDHandler implements Player, ServiceContentHandler {
checkUnrealized();
// TODO: actually stopping when stop time is hit needs to be implemented
this.stopTime = stopTime;
+
+ postStopTimeChangeEvent();
}
public Time getMediaTime() {
@@ -437,6 +440,10 @@ public abstract class BDHandler implements Player, ServiceContentHandler {
*
*/
+ private void postStopTimeChangeEvent() {
+ notifyListeners(new StopTimeChangeEvent(this, getStopTime()));
+ }
+
private void notifyListeners(ControllerEvent event) {
listeners.putCallback(event);
}
More information about the libbluray-devel
mailing list