|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
---|---|
SelectionProvider | A provider of service selection. |
SelectionProviderContext | Platform implementations that wish to receive notifications from a
SelectionProvider register an instance that implements
this interface with the SelectionProvider . |
SelectionSession | A session for presentation of one or more services over a period of time by a SelectionProvider. |
ServiceDescription | Represents the description of a service. |
Class Summary | |
---|---|
KnownServiceReference | A reference to a service that is reached with the mediation of a SelectionProvider. |
LocatorScheme | This class is used to represent a locator scheme that is supported by a SelectionProvider. |
SelectionService | A service that is reachable through a SelectionProvider. |
ServiceReference | A reference to a service that is reached with the mediation of a SelectionProvider. |
This package defines an SPI for selection of services and service components. The providers defined in this package allow the presentation of services whose location is not announced using standard signalling. One a SelectionProvider has been installed, the standard GEM APIs, such as the JavaTV service selection API, can be used to present those services.
The following table shows the sequence of API calls involved in a service selection operation, both API calls between an application and the implementation and between the implementation and a SelectionProvider.
The table covers both the case when the service location is known and when the location is unknown. The first column indicates if the step applies when the service location is unknown. The second column indicates whether the step applies when the service location is known. Most steps either apply in both cases at the same point in the sequence or only apply when the service location is unknown. Two steps apply in both cases but at different points in the sequence.
Unknown Service Location |
Known Service Location |
Step |
API call by application |
API call to/from provider |
|
Y | Y | Provider is installed | ProviderRegistry.registerSystemBound |
Provider.providerRegistered |
|
Y | Y | Provider is initialised | None | SelectionProvider.init |
|
Y | Y | Implementation asks provider for supported services | None | SelectionProvider.getServiceList() |
|
Y | Y | Each supported service is merged into the service list of the receiver | None | Methods on each ServiceReference returned from SelectionProvider.getServiceList() |
|
N | Y | Extract tuning information for service | None | For GEM, FrequencyLocator.getDeliverySystemDescriptor() |
|
Some time later |
|||||
Y | Y | Application obtains service object corresponding to locator of service | SIManager.getService(LocatorFactory.createLocator( "dvb://'movie-channel-1.broadcaster-b.com'") | None | |
Y | Y | Application asks for service to be presented | ServiceContext.select(Service) | None | |
Y | N | Create session for the presentation of the requested service. | None | 1) new ServiceReference(..) | |
Y | N | Implementation asks provider to present channel. | None | SelectionSession.select |
|
Y | N | Provider asks head-end for channel | None | Existing java.net APIs | |
Y | N | Head-end returns reference to channel location | None | Existing java.net APIs | |
Y | N | Provider passes on reference to channel location to implementation | None | 1a) For GEM, new FrequencyLocator(...)
1b) For OCAP, new OCAPLocator(int frequency, int programNumber,int modulationFormat, ...) 2) Return from call to |
|
Y | N | Extract tuning information for service | None | For GEM, FrequencyLocator.getDeliverySystemDescriptor() |
|
Y | Y | Implementation tunes to appropriate frequency etc | None | None | |
N | Y | Create session for the presentation of the requested service. | None | 1) new ServiceReference(..) | |
Y | N | Inform provider that implementation is ready to receive content | None | SelectionSession.selectionReady |
|
Y | N | Provider tells server to send content | Provider sends message to switched digital server | Existing java.net APIs | |
Y | Y | Content arrives | 1) new NormalContentEvent 2) ServiceContextListener.receiveServiceContextEvent(..) |
None | |
Some time later |
|||||
Y | Y | Content stops being presented (change to new channel, ...) | Either none or ServiceContext.select() with a different service. | SelectionSession.destroy |
|
Y | Y | Content may stop being delivered | Provider may tell head-end that this content is no longer needed if the head-end is counting the number of users of the content | Existing java.net APIs |
Step |
API call by application |
API call to/from provider |
Notes |
Provider is installed | ProviderRegistry.registerSystemBound |
Provider.providerRegistered |
|
Provider is initialised | None | SelectionProvider.init |
|
Provider registers locator schemes it can select | None | Implementation calls SelectionProvider.getSupportedLocatorSchemes() which returns new
org.dvb.spi.selection.LocatorScheme("rtsp", true) |
|
Some time later |
|||
Application decides which content is to be played back | new RTSPLocator( ... ) | None | |
Application asks for content to be presented | SIManager.getService(Locator) ServiceContext.select(Service) |
None | |
Implementation decides whether to use built-in RTSP implementation or provider. | None | LocatorScheme.getProviderFirst() |
|
Create session for the presentation of the requested content. | None | New ServiceReference(..) | |
Provider negotiates RTSP session with server. | None | Provider uses existing java.net APIs to issue SETUP command including GEM terminal IP address and UDP port chosen by the provider to receive the MPEG stream from the RTSP server | |
Provider tells implementation which port will be used for incoming content |
None | Provider returns new UnicastLocator from call to
SelectionSession.select() |
|
Implementation listens on port identified by the UDPLocator returned from the provider and sets up MPEG demux / decoder chain as appropriate |
None | None | |
Server sends content when GEM terminal is ready to receive it. | None | Implementation calls SelectionSession.selectionReady()
Provider uses existing java.net APIs to send PLAY command to server |
|
Content arrives | 1) new NormalContentEvent
2) ServiceContextListener.receiveServiceContextEvent(..) |
None | |
Some time later |
|||
Application wants to pause playback | Player.setRate(0) | Implementation calls SelectionSession.setRate(float)
Provider uses existing java.net APIs to send RTSP pause command to server. |
|
Some time later |
|||
Application wants to resume playback | Player.setRate(1.0) | Implementation calls SelectionSession.setRate(float)
Provider uses existing java.net APIs to send RTSP PLAY command to server. |
|
Some time later |
|||
Application wants playback to jump to new location | Player.setMediaTime() | Implementation calls SelectionSession.setPosition(long) Provider uses existing java.net APIs to send PLAY command specifying new starting offset. |
|
Some time later |
|||
Application wants playback to switch into fast forwards | Player.setRate() | Implementation calls SelectionSession.setRate(float)
Provider uses existing java.net APIs to send PLAY command with desired playscale |
|
Some time later |
|||
Content stops being presented (change to new channel, ...) | Either none or ServiceContext.select() with a different service. | SelectionSession.destroy() |
|
Provider sends TEARDOWN command to server and closes session | None | Existing java.net APIs |
|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |