[libbluray-devel] Implement getServiceContentHandlers()
hpi1
git at videolan.org
Tue Apr 7 13:30:09 CEST 2015
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Tue Apr 7 14:26:43 2015 +0300| [08740117e6217e1f8a528e9edc136882429face5] | committer: hpi1
Implement getServiceContentHandlers()
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=08740117e6217e1f8a528e9edc136882429face5
---
.../java/org/bluray/ti/selection/TitleContextImpl.java | 14 +++++++++-----
.../java/org/videolan/media/content/PlayerManager.java | 6 ++++++
2 files changed, 15 insertions(+), 5 deletions(-)
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 e0c72bf..0109d2b 100644
--- a/src/libbluray/bdj/java/org/bluray/ti/selection/TitleContextImpl.java
+++ b/src/libbluray/bdj/java/org/bluray/ti/selection/TitleContextImpl.java
@@ -41,7 +41,7 @@ import org.bluray.ti.TitleImpl;
import org.videolan.BDJLoader;
import org.videolan.BDJLoaderCallback;
import org.videolan.BDJListeners;
-import org.videolan.media.content.playlist.Handler;
+import org.videolan.media.content.PlayerManager;
public class TitleContextImpl implements TitleContext {
public Service getService() {
@@ -59,11 +59,15 @@ public class TitleContextImpl implements TitleContext {
if (state == STATE_STOPPED)
return new ServiceContentHandler[0];
- org.videolan.Logger.unimplemented("TitleContextImpl", "getServiceContentHandlers");
+ ServiceContentHandler player = PlayerManager.getInstance().getPlaylistPlayer();
+ if (player != null) {
+ ServiceContentHandler[] handler = new ServiceContentHandler[1];
+ handler[0] = player;
+ return handler;
+ }
- ServiceContentHandler[] handler = new ServiceContentHandler[1];
- handler[0] = new Handler();
- return handler;
+ System.err.println("getServiceContentHandlers(): none found");
+ return new ServiceContentHandler[0];
}
public void start(Title title, boolean restart) throws SecurityException {
diff --git a/src/libbluray/bdj/java/org/videolan/media/content/PlayerManager.java b/src/libbluray/bdj/java/org/videolan/media/content/PlayerManager.java
index 3f3ced6..6fa4f40 100644
--- a/src/libbluray/bdj/java/org/videolan/media/content/PlayerManager.java
+++ b/src/libbluray/bdj/java/org/videolan/media/content/PlayerManager.java
@@ -59,6 +59,12 @@ public class PlayerManager {
}
}
+ public BDHandler getPlaylistPlayer() {
+ synchronized (playlistPlayerLock) {
+ return playlistPlayer;
+ }
+ }
+
protected void releaseResource(BDHandler player) {
if (player instanceof org.videolan.media.content.playlist.Handler) {
synchronized (playlistPlayerLock) {
More information about the libbluray-devel
mailing list