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

jvlc: make the medialistplayer a property of the jvlc instance

parent f66de63b
......@@ -50,16 +50,23 @@ public class JVLC
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)
......@@ -177,4 +184,14 @@ public class JVLC
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