Difference between revisions of "Developer:Davaar:RadioService"

From LinnDocs
Jump to: navigation, search
(Actions)
m
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
= Architecture Overview =
+
See http://wiki.openhome.org/wiki/Av:Developer:RadioService
The Radio Service provides the means for controlling a Radio source. If a product's [[Developer:Davaar:ProductService|Product Service]] reports a source of type 'Radio', then the device that bears that [[Developer:Cara:ProductService|Product Service]] is guaranteed to also bears the Radio service.
 
 
 
The heart of the Radio Service is the '''SetChannel''' action. Call '''SetChannel''' with a particular Uri and Metadata, then call '''Play''' and the media at the given Uri is played. If the media is an internet radio stream, it will play forever. If it is of finite length, it will play to the end and then stop.
 
 
 
Call the '''Channel''' action to report the Uri and Metadata of the current Channel.
 
 
 
The Radio Source also stores a list of channel presets. These can be presented to the user as a list of numbered channels that can easily be selected and played.
 
 
 
This array of channel presets is accessed using an id array mechanism similar to that used in the [[Developer:Davaar:PlaylistService|Playlist Service]]. The only difference is that the Radio service's id array is a constant length and may contain entries that are zero, which represent empty presets.
 
 
 
= Actions =
 
==Channel==
 
Report the Uri and Metadata of the current Channel.
 
 
 
==Set Channel==
 
Set the Uri and Metadata of the current Channel.
 
 
 
==IdArray==
 
Report the current id array. The id array contains 100 presets, but this may change (see IdsMax).
 
 
 
The IdArray is an ordered, constant length, array of ids. The first element contains the id for channel preset 1, the second element contains the id for channel Preset 2, etc. If an element is set to zero, then the corresponding channel preset is empty.
 
 
 
This action also reports an IdArrayToken, which can be used to quickly detect if the id array has changed since it was last read (see IdArrayChanged).
 
 
 
==IdArrayChanged==
 
Check to see if the id array has changed since gathering the specified IdArrayToken.
 
This IdArrayToken must have been previously collected from the IdArray action.
 
 
 
This mechanism is provided specifically for clients unable to partake in UPnP eventing.
 
 
 
==SetId==
 
The the current Channel using the channel preset represented by the given Id, and using the provided Uri.
 
 
 
It is usual for a Control Point to inspect the res elements of the Channel Metadata and select the appropriate Uri by matching to the renderer's ProtocolInfo.
 
 
 
==Id==
 
Report the Id of the current Channel if it is in the Channel Preset list. If the current Channel is not a channel preset, the Id reported is zero.
 
 
 
==ProtocolInfo==
 
Report the Radio Source protocol info.
 
 
 
==Read==
 
Given a channel preset Id, report its associated Metadata.
 
 
 
==ReadList==
 
Given a space separated list of channel preset Ids, report their associated Metadata.
 
 
 
==TransportState==
 
 
 
Report the current transport state, which can be: 'Playing', 'Paused', 'Stopped', or 'Buffering'.
 
 
 
==Play==
 
Play the current channel
 
 
 
==Pause==
 
Pause the current channel. This will be converted to Stop if the channel cannot be paused e.g. internet radio.
 
 
 
==Stop==
 
Stop the current Channel
 
 
 
==SeekSecondsAbsolute==
 
Seek to an absolute second within the current media. This is only available if the current media has a finite length.
 
 
 
==SeekSecondsRelative==
 
Seek to a relative second within the current media.  This is only available if the current media has a finite length.
 
 
 
= Technical Details =
 
<code>
 
    Domain  : av.openhome.org
 
    Name    : Radio
 
    Version : 1
 
</code>
 
[http://oss.linn.co.uk/trac/browser/Main/LibUpnpCil/Services/Openhome/Radio1.xml Radio Service Description (XML)]
 
 
 
= Migration Guide From Cara =
 
 
 
The domain for the Radio service has changed to av.openhome.org
 
 
 
== Actions ==
 
 
 
===Channel===
 
 
 
===ChannelsMax==
 
 
 
===Set Channel===
 
 
 
===IdArray===
 
 
 
===IdArrayChanged===
 
 
 
===SetId===
 
 
 
===Id===
 
 
 
===ProtocolInfo===
 
 
 
===Read===
 
 
 
===ReadList===
 
 
 
===TransportState===
 
 
 
===Play===
 
 
 
===Pause===
 
 
 
===Stop===
 
 
 
===SeekSecondsAbsolute===
 
 
 
===SeekSecondsRelative===
 
 
 
=== Time ===
 
The arguments have changed their names as follows:
 
 
 
* aTrackCount -> TrackCount
 
* aDuration -> Duration
 
* aSeconds -> Seconds
 

Latest revision as of 08:42, 21 November 2018