Commit 0bf6d260 authored by Filippo Carone's avatar Filippo Carone

jvlc: make the medialistplayer a property of the jvlc instance

parent f66de63b
...@@ -49,17 +49,24 @@ public class JVLC ...@@ -49,17 +49,24 @@ public class JVLC
private VLM vlm; private VLM vlm;
private volatile boolean released; private volatile boolean released;
private MediaListPlayer mediaListPlayer;
public JVLC() public JVLC()
{ {
String[] args = new String[] {}; String[] args = new String[] {};
instance = createInstance(args); instance = createInstance(args);
mediaList = new MediaList(this); mediaList = new MediaList(this);
mediaListPlayer = new MediaListPlayer(this);
mediaListPlayer.setMediaList(mediaList);
} }
public JVLC(String[] args) public JVLC(String[] args)
{ {
instance = createInstance(args); instance = createInstance(args);
mediaList = new MediaList(this);
mediaListPlayer = new MediaListPlayer(this);
mediaListPlayer.setMediaList(mediaList);
} }
public JVLC(String args) public JVLC(String args)
...@@ -79,10 +86,10 @@ public class JVLC ...@@ -79,10 +86,10 @@ public class JVLC
public MediaPlayer play(String media) public MediaPlayer play(String media)
{ {
MediaDescriptor mediaDescriptor = new MediaDescriptor(this, media); MediaDescriptor mediaDescriptor = new MediaDescriptor(this, media);
MediaPlayer mediaInstance = new MediaPlayer(mediaDescriptor); MediaPlayer mediaPlayer = new MediaPlayer(mediaDescriptor);
mediaInstance.play(); mediaPlayer.play();
mediaDescriptor.release(); mediaDescriptor.release();
return mediaInstance; return mediaPlayer;
} }
public void setVideoOutput(Canvas canvas) public void setVideoOutput(Canvas canvas)
...@@ -176,5 +183,15 @@ public class JVLC ...@@ -176,5 +183,15 @@ public class JVLC
release(); release();
super.finalize(); super.finalize();
} }
/**
* Returns the mediaListPlayer.
* @return the mediaListPlayer
*/
public MediaListPlayer getMediaListPlayer()
{
return mediaListPlayer;
}
} }
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