]> git.sesse.net Git - vlc/commitdiff
jvlc: make the medialistplayer a property of the jvlc instance
authorFilippo Carone <littlejohn@videolan.org>
Mon, 22 Dec 2008 09:05:48 +0000 (10:05 +0100)
committerFilippo Carone <littlejohn@videolan.org>
Mon, 22 Dec 2008 09:07:08 +0000 (10:07 +0100)
bindings/java/core/src/main/java/org/videolan/jvlc/JVLC.java

index 6c826234a1961616a5627e0a0c93cb05bfbbcafa..803d85616d26362ee60923b4968e5a55dead7324 100644 (file)
@@ -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;
+    }
     
 }