org.videolan.jvlc
Class Playlist

java.lang.Object
  extended by org.videolan.jvlc.Playlist
All Implemented Interfaces:
PlaylistIntf

public class Playlist
extends java.lang.Object
implements PlaylistIntf


Constructor Summary
Playlist(long _libvlcInstance)
           
 
Method Summary
 int add(java.lang.String uri, java.lang.String name)
          TODO: document the kind of items that can be added.
 int add(java.lang.String uri, java.lang.String name, java.lang.String[] options)
           
 void addExtended()
          Currently not implemented
 void clear()
          Clear the playlist which becomes empty after this call.
 void deleteItem(int itemID)
           
 long getInstance()
           
 boolean isRunning()
          This function returns true if the current item has not been stopped.
 int itemsCount()
          TODO: this should return the number of items added with add, with no respect to videolan internal playlist.
 void next()
          Move to next item in the playlist and play it.
 void play()
          Plays the current item in the playlist.
 void play(int id, java.lang.String[] options)
          Plays the item specified in id, with options.
 void prev()
          Move to previous item in the playlist and play it.
 void setPause(boolean pause)
          Pauses the currently playing item if pause value is true.
 void stop()
          Stops the currently playing item.
 void togglePause()
          Toggles pause for the current item.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Playlist

public Playlist(long _libvlcInstance)
Method Detail

play

public void play(int id,
                 java.lang.String[] options)
          throws VLCException
Description copied from interface: PlaylistIntf
Plays the item specified in id, with options. At the moment options has no effect and can be safely set to null.

Specified by:
play in interface PlaylistIntf
Parameters:
id - The ID to play
options - Options to play the item with
Throws:
VLCException

play

public void play()
          throws VLCException
Description copied from interface: PlaylistIntf
Plays the current item in the playlist.

Specified by:
play in interface PlaylistIntf
Throws:
VLCException

togglePause

public void togglePause()
                 throws VLCException
Description copied from interface: PlaylistIntf
Toggles pause for the current item.

Specified by:
togglePause in interface PlaylistIntf
Throws:
VLCException

stop

public void stop()
          throws VLCException
Description copied from interface: PlaylistIntf
Stops the currently playing item. Differently from pause, stopping an item destroys any information related to the item.

Specified by:
stop in interface PlaylistIntf
Throws:
VLCException

isRunning

public boolean isRunning()
                  throws VLCException
Description copied from interface: PlaylistIntf
This function returns true if the current item has not been stopped.

Specified by:
isRunning in interface PlaylistIntf
Returns:
True if the current item has not been stopped
Throws:
VLCException

itemsCount

public int itemsCount()
               throws VLCException
Description copied from interface: PlaylistIntf
TODO: this should return the number of items added with add, with no respect to videolan internal playlist. Returns the number of items in the playlist. Beware that this number could be bigger than the number of times add() has been called.

Specified by:
itemsCount in interface PlaylistIntf
Returns:
Current number of items in the playlist
Throws:
VLCException

next

public void next()
          throws VLCException
Description copied from interface: PlaylistIntf
Move to next item in the playlist and play it.

Specified by:
next in interface PlaylistIntf
Throws:
VLCException

prev

public void prev()
          throws VLCException
Description copied from interface: PlaylistIntf
Move to previous item in the playlist and play it.

Specified by:
prev in interface PlaylistIntf
Throws:
VLCException

clear

public void clear()
           throws VLCException
Description copied from interface: PlaylistIntf
Clear the playlist which becomes empty after this call.

Specified by:
clear in interface PlaylistIntf
Throws:
VLCException

add

public int add(java.lang.String uri,
               java.lang.String name,
               java.lang.String[] options)
        throws VLCException
Throws:
VLCException

add

public int add(java.lang.String uri,
               java.lang.String name)
        throws VLCException
Description copied from interface: PlaylistIntf
TODO: document the kind of items that can be added. Add a new item in the playlist.

Specified by:
add in interface PlaylistIntf
Parameters:
uri - Location of the item
name - Name of the item
Returns:
The item ID
Throws:
VLCException

addExtended

public void addExtended()
Description copied from interface: PlaylistIntf
Currently not implemented

Specified by:
addExtended in interface PlaylistIntf

deleteItem

public void deleteItem(int itemID)
                throws VLCException
Throws:
VLCException

getInstance

public long getInstance()
                 throws VLCException
Throws:
VLCException

setPause

public void setPause(boolean pause)
              throws VLCException
Description copied from interface: PlaylistIntf
Pauses the currently playing item if pause value is true. Plays it otherwise. If you set pause to true and the current item is already playing, this has no effect.

Specified by:
setPause in interface PlaylistIntf
Throws:
VLCException