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