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