org.red5.server.stream
Class SimplePlaylistController

java.lang.Object
  extended by org.red5.server.stream.SimplePlaylistController
All Implemented Interfaces:
IPlaylistController

public class SimplePlaylistController
extends Object
implements IPlaylistController

Simple playlist controller implementation


Constructor Summary
SimplePlaylistController()
           
 
Method Summary
 int nextItem(IPlaylist playlist, int itemIndex)
          Get next item to play.
 int previousItem(IPlaylist playlist, int itemIndex)
          Get previous item to play.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimplePlaylistController

public SimplePlaylistController()
Method Detail

nextItem

public int nextItem(IPlaylist playlist,
                    int itemIndex)
Get next item to play.

Specified by:
nextItem in interface IPlaylistController
Parameters:
playlist - The related play list.
itemIndex - The current item index. -1 indicates to retrieve the first item for play.
Returns:
The next item index to play. -1 reaches the end.

previousItem

public int previousItem(IPlaylist playlist,
                        int itemIndex)
Get previous item to play.

Specified by:
previousItem in interface IPlaylistController
Parameters:
playlist - The related play list.
itemIndex - The current item index. IPlaylist.itemSize indicated to retrieve the last item for play.
Returns:
The previous item index to play. -1 reaches the beginning.


Copyright © 2006-2012 The Red5 Project