Difference between revisions of "Developer:Davaar:RadioService"

From LinnDocs
Jump to: navigation, search
(Created page with '= Architecture Overview = Cara 6 introduces a new source of type 'Radio'. In Cara 6 and later, if a Product Service reports a source of type 'Ra…')
 
(Architecture Overview)
Line 1: Line 1:
 
= Architecture Overview =
 
= Architecture Overview =
Cara 6 introduces a new source of type 'Radio'. In Cara 6 and later, if a [[Developer:Cara:ProductService|Product Service]] reports a source of type 'Radio', then the UPnP device that bears that [[Developer:Cara:ProductService|Product Service]] also bears the Radio Service. The Radio Service provides the means for controlling the Radio Source.
+
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.
 
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.
Line 6: Line 6:
 
Call the '''Channel''' action to report the Uri and Metadata of the current Channel.
 
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.
+
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 the Id Array mechanism previously developed for the [[Developer:Cara:PlaylistService|Playlist Service]]. The only difference is that the Radio Source Id Array is of a constant length and may contain entries that are zero, which represent empty presets.
+
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.
 
 
The Radio Source reports technical information concerning the currently playing Channel through the [[Developer:Cara:InfoService|Info Service]] and time information through the [[Developer:Cara:TimeService|Time Service]]
 
  
 +
= Actions =
 
==Channel==
 
==Channel==
 
Report the Uri and Metadata of the current Channel.
 
Report the Uri and Metadata of the current Channel.
Line 19: Line 18:
  
 
==IdArray==
 
==IdArray==
Report the current Id Array. The Cara 6 Id Array contains 100 presets, but this may change (see IdsMax).
+
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.  
+
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 IdArray has changed since it was last read (see IdArrayChanged).
+
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==
 
==IdArrayChanged==
Check to see if the IdArray has changed since gathering the specified IdArrayToken.
+
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 IdArrayToken must have been previously collected from the IdArray action.
  
This mechanism is provided specifically for clients unable to partake in Upnp eventing.
+
This mechanism is provided specifically for clients unable to partake in UPnP eventing.
  
 
==SetId==
 
==SetId==
The the current Channel using the Channel Preset represented by the given Id, and using the provided Uri.
+
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.
 
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==
 
==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.
+
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==
 
==ProtocolInfo==
Report the Radio Source Protocol Info.
+
Report the Radio Source protocol info.
  
 
==Read==
 
==Read==
Given a Channel Preset Id, report its associated Metadata.
+
Given a channel preset Id, report its associated Metadata.
  
 
==ReadList==
 
==ReadList==
Given a comma separated list of Channel Preset Ids, report on their associated Metadata.
+
Given a space separated list of channel preset Ids, report their associated Metadata.
  
 
==TransportState==
 
==TransportState==
  
Report the current TransportState, which can be: 'Playing', 'Paused', 'Stopped', or 'Buffering'.
+
Report the current transport state, which can be: 'Playing', 'Paused', 'Stopped', or 'Buffering'.
  
 
==Play==
 
==Play==
Play the current Channel
+
Play the current channel
  
 
==Pause==
 
==Pause==
Pause the current Channel. This will be converted to Stop if the Channel cannot be paused e.g. internet radio.
+
Pause the current channel. This will be converted to Stop if the channel cannot be paused e.g. internet radio.
  
 
==Stop==
 
==Stop==

Revision as of 13:13, 23 November 2010

Architecture Overview

The Radio Service provides the means for controlling a Radio source. If a product's Product Service reports a source of type 'Radio', then the device that bears that 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 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.

API Reference

Radio Service Description (XML)

Migration Guide

None.

Upnp Action Name Changes

None.


Obsolete Functions

None.