Commit 08740117 authored by Petri Hintukainen's avatar Petri Hintukainen

Implement getServiceContentHandlers()

parent 521673a7
......@@ -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 {
......
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment