|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gstreamer.media.AbstractMediaPlayer
public abstract class AbstractMediaPlayer
Provides a partial implementation of MediaPlayer that handles MediaListener
and playlist management.
Field Summary | |
---|---|
protected java.util.concurrent.Executor |
eventExecutor
|
protected java.util.Queue<java.net.URI> |
playList
|
Constructor Summary | |
---|---|
protected |
AbstractMediaPlayer(java.util.concurrent.Executor eventExecutor)
|
Method Summary | |
---|---|
void |
addMediaListener(MediaListener listener)
Adds a MediaListener that will be notified of media events. |
void |
enqueue(java.util.Collection<java.net.URI> playlist)
Adds a list of media files to the playlist. |
void |
enqueue(java.net.URI uri)
Adds a uri to the playlist |
protected void |
fireEndOfMediaEvent(EndOfMediaEvent ev)
|
protected void |
firePauseEvent(PauseEvent ev)
|
protected void |
fireStartEvent(StartEvent ev)
|
protected void |
fireStopEvent(StopEvent ev)
|
protected java.util.List<MediaListener> |
getMediaListeners()
Gets the current list of media listeners |
void |
remove(java.net.URI uri)
Removes a file from the play list. |
void |
removeMediaListener(MediaListener listener)
Adds a MediaListener that will be notified of media events. |
void |
setPlaylist(java.util.Collection<java.net.URI> playlist)
Replaces the current play list with a new play list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.gstreamer.media.MediaPlayer |
---|
getPipeline, getVolume, isPlaying, pause, play, setAudioSink, setURI, setVideoSink, setVolume, stop |
Field Detail |
---|
protected final java.util.concurrent.Executor eventExecutor
protected final java.util.Queue<java.net.URI> playList
Constructor Detail |
---|
protected AbstractMediaPlayer(java.util.concurrent.Executor eventExecutor)
Method Detail |
---|
protected void fireEndOfMediaEvent(EndOfMediaEvent ev)
protected void fireStartEvent(StartEvent ev)
protected void fireStopEvent(StopEvent ev)
protected void firePauseEvent(PauseEvent ev)
public void enqueue(java.net.URI uri)
enqueue
in interface MediaPlayer
uri
- The uri to add to the playlist.public void enqueue(java.util.Collection<java.net.URI> playlist)
enqueue
in interface MediaPlayer
playlist
- The list of media files to add.public void setPlaylist(java.util.Collection<java.net.URI> playlist)
setPlaylist
in interface MediaPlayer
playlist
- The new playlist.public void remove(java.net.URI uri)
remove
in interface MediaPlayer
uri
- The uri to remove.public void addMediaListener(MediaListener listener)
MediaListener
that will be notified of media events.
addMediaListener
in interface MediaPlayer
listener
- the MediaListener to add.public void removeMediaListener(MediaListener listener)
MediaListener
that will be notified of media events.
removeMediaListener
in interface MediaPlayer
listener
- the MediaListener to add.protected java.util.List<MediaListener> getMediaListeners()
MediaListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |