org.dvb.spi.selection
Interface SelectionSession


public interface SelectionSession

A session for presentation of one or more services over a period of time by a SelectionProvider. The first operation on a new session will always be selection of a service in a service context, and all subsequent operations will pertain to the same service context.

Since:
MHP 1.1.3

Method Summary
 void destroy()
          Called by the platform when the service bound to this session is no longer being used by the implementation.
 Locator select()
          Sets up delivery of a stream representing the service, and delivers a locator for reception of that stream.
 void selectionReady()
          Called when the implementation is ready to receive content on the locator returned by the select method.
 long setPosition(long position)
          Set the position within the media.
 float setRate(float newRate)
          Sets the speed of playback.
 

Method Detail

select

Locator select()
Sets up delivery of a stream representing the service, and delivers a locator for reception of that stream. For example, either a unicast locator or a frequency locator might be returned, under the apprlpriate circumstances.

Returns:
a locator for where the stream can be found

destroy

void destroy()
Called by the platform when the service bound to this session is no longer being used by the implementation. The selection provider should do any needed clean-up here, e.g. informing a server that the service is not needed any more. Once destroy is called, the terminal implementation discards the SelectionSession.


selectionReady

void selectionReady()
Called when the implementation is ready to receive content on the locator returned by the select method. When using unicast protocols where the content must only be sent when the GEM terminal is ready, it is now safe to request the content be sent.

A SelectionSession might be destroyed after a select, but before this method is called. In this case, this method may not be called. Applications should therefore not expect this method to be called after destroy() is called on this session.

See Also:
destroy()

setRate

float setRate(float newRate)
Sets the speed of playback. If this session does not support trick modes, this method returns 1 and has no effect. Calling this method with the value 1.0f shall always succeed, and shall result in a return value of 1.0f.

Parameters:
newRate - New playback rate. Implementations shall make a best effort to approximate this rate.
Returns:
The new rate, if known. If not known, the value java.lang.Float.NEGATIVE_INFINITY is returned.

setPosition

long setPosition(long position)
Set the position within the media. If this session does not support trick modes, this method returns -1 and has no effect.

Parameters:
position - The position within the program, in milliseconds
Returns:
The new position, or -1 if position setting isn't supported.