javazoom.jlgui.basicplayer
Interface BasicPlayerListener

All Known Implementing Classes:
BasicPlayerTest

public interface BasicPlayerListener

This interface defines callbacks methods that will be notified for all registered BasicPlayerListener of BasicPlayer.


Method Summary
 void opened(java.lang.Object stream, java.util.Map properties)
          Open callback, stream is ready to play.
 void progress(int bytesread, long microseconds, byte[] pcmdata, java.util.Map properties)
          Progress callback while playing.
 void setController(BasicController controller)
          A handle to the BasicPlayer, plugins may control the player through the controller (play, stop, ...)
 void stateUpdated(BasicPlayerEvent event)
          Notification callback for basicplayer events such as opened, eom ...
 

Method Detail

opened

void opened(java.lang.Object stream,
            java.util.Map properties)
Open callback, stream is ready to play. properties map includes audio format dependant features such as bitrate, duration, frequency, channels, number of frames, vbr flag, id3v2/id3v1 (for MP3 only), comments (for Ogg Vorbis), ...

Parameters:
stream - could be File, URL or InputStream
properties - audio stream properties.

progress

void progress(int bytesread,
              long microseconds,
              byte[] pcmdata,
              java.util.Map properties)
Progress callback while playing. This method is called severals time per seconds while playing. properties map includes audio format features such as instant bitrate, microseconds position, current frame number, ...

Parameters:
bytesread - from encoded stream.
microseconds - elapsed (reseted after a seek !).
pcmdata - PCM samples.
properties - audio stream parameters.

stateUpdated

void stateUpdated(BasicPlayerEvent event)
Notification callback for basicplayer events such as opened, eom ...

Parameters:
event -

setController

void setController(BasicController controller)
A handle to the BasicPlayer, plugins may control the player through the controller (play, stop, ...)

Parameters:
controller - : a handle to the player