|
Lizzy v1.1.1 | |||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
---|---|
PlaylistVisitor | A playlist hierarchy visitor. |
SpecificPlaylist | The base definition of a specific playlist implementation. |
SpecificPlaylistProvider | A specific playlist provider manages a given type of playlist (for example ASX or M3U). |
Class Summary | |
---|---|
AbstractPlaylistComponent | The base component of a playlist. |
AbstractTimeContainer | The base definition of time containers. |
BasePlaylistVisitor | A starting point for a playlist visitor. |
Media | The definition of a media content. |
Parallel | A playlist group in which multiple elements can play back at the same time. |
Playlist | The definition of the top-level element: the playlist. |
Sequence | A playlist sequence: the media contents play one after the other. |
SpecificPlaylistFactory | The playlist factory. |
The home of the playlist management API.
You should begin here with SpecificPlaylistFactory
.
You will find below the main steps in order to properly use the API for parsing an existing playlist (exception catching is not performed):
File
file = newFile
("a_playlist_file");SpecificPlaylist
specificPlaylist = SpecificPlaylistFactory.getInstance().readFrom
(file);
if (specificPlaylist == null) { throw new Exception("Invalid playlist format"); }
Playlist
genericPlaylist = specificPlaylist.toPlaylist
();
SpecificPlaylistProvider
provider = SpecificPlaylistFactory.getInstance().findProviderById
("asx");
SpecificPlaylistProvider
provider = SpecificPlaylistFactory.getInstance().findProviderByExtension
(".asx");
The "specific" playlist providers hierarchy is the following: Now convert your generic playlist description to the chosen format:SpecificPlaylistProvider
provider = specificPlaylist.getProvider
();
If everything ran well, you can now flush the result to any output stream:SpecificPlaylist
newSpecificPlaylist = provider.toSpecificPlaylist
(genericPlaylist);
newSpecificPlaylist.writeTo
(System.out, null);
Enjoy!
|
© 2008-2009 Christophe Delory | |||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |