octoshape.osa2.listeners
Interface MultiStreamInfoListener


public interface MultiStreamInfoListener

Listens for multistream and basestream information from a StreamPlayer.

See Also:
StreamPlayer.setMultiStreamInfoListener(MultiStreamInfoListener)

Method Summary
 void gotBaseStreamInfo(java.lang.String streamName, int rateset)
          Receives information on the currently playing basestream.
 void gotMultiStreamInfo(java.lang.String[] baseStreamNames, int[] baseStreamRates)
          Receives information on how the multistream is configured in the Octoshape system.
 

Method Detail

gotMultiStreamInfo

void gotMultiStreamInfo(java.lang.String[] baseStreamNames,
                        int[] baseStreamRates)
Receives information on how the multistream is configured in the Octoshape system.

This will normally be called right before the first call to StreamPlayerListener#gotUrl(String, long, boolean) and then not be called again. In some cases, particularly if the StreamPlayer dispatched a non-normal problem, this might be called again. To get this information without playing the stream, use the StreamPlayer.initialize(boolean) method with a true argument.

This is only called if the stream is a multi-stream.

Parameters:
baseStreamNames - Holds the names of the contained base streams.
baseStreamRates - Holds the bit-rates of the contained base streams (using the same ordering as the baseStreamNames array).

gotBaseStreamInfo

void gotBaseStreamInfo(java.lang.String streamName,
                       int rateset)
Receives information on the currently playing basestream.

Listening for this information might be especially useful when playing a multistream, as this will then identify the base stream currently playing. Note that this may be called with null and -1 values when the current stream is about to, or has stopped playing (for instance if a new play request call is made).

Parameters:
streamName - An Octoshape base stream name, or null if no stream is currently playing.
rateset - The bitrate this base stream is configured to have, or -1 if unknown.