[vlc-devel] commit: jvlc: make the medialistplayer a property of the jvlc instance ( Filippo Carone )

git version control git at videolan.org
Mon Dec 22 10:07:24 CET 2008


vlc | branch: master | Filippo Carone <littlejohn at videolan.org> | Mon Dec 22 10:05:48 2008 +0100| [0bf6d26080f67e9b727c2227fe60bb0f8b974d7f] | committer: Filippo Carone 

jvlc: make the medialistplayer a property of the jvlc instance

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0bf6d26080f67e9b727c2227fe60bb0f8b974d7f
---

 .../core/src/main/java/org/videolan/jvlc/JVLC.java |   23 +++++++++++++++++--
 1 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/bindings/java/core/src/main/java/org/videolan/jvlc/JVLC.java b/bindings/java/core/src/main/java/org/videolan/jvlc/JVLC.java
index 6c82623..803d856 100644
--- a/bindings/java/core/src/main/java/org/videolan/jvlc/JVLC.java
+++ b/bindings/java/core/src/main/java/org/videolan/jvlc/JVLC.java
@@ -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;
+    }
     
 }




More information about the vlc-devel mailing list