From OpenHome
(Difference between revisions)
(→Message Format) |
(→Zone Handling) |
||
Line 122: | Line 122: | ||
|} | |} | ||
- | == Zone Handling == | + | == Zone Id Handling == |
+ | |||
+ | Each participating Sender must have a unique Zone Id. This Id is often derived from the Sender's MAC address, but any other network-unique Id is acceptable. | ||
+ | |||
+ | The OHZ URI for a Sender is: | ||
+ | |||
+ | ohz://239.255.255.250:51972/ZoneId | ||
+ | |||
+ | In orderIf a Receiver is |
Revision as of 10:19, 10 May 2011
Contents |
Songcast OHZ Protocol Specification (Version 1.0)
Introduction
OHZ, together with OHM and OHU, form the Songcast family of OpenHome protocols for transporting audio around a home network.
OHZ provides the ability for a uniquely identified Songcast Sender to redirect its Receivers to different OHM or OHU URIs.
How does a Songcast Sender use OHZ?
In order to use OHZ, a Songcast Sender must:
- Publish an OHZ URI instead of an OHM or OHU URI
- Broadcast the OHM or OHU URI associated with this OHZ URI whenever it is requested by a Receiver (solicited broadcast)
- Broadcast the OHM or OHU URI associated with this OHZ URI whenever it changes (unsolicited broadcast)
Why would a Songcast Sender use OHZ?
There are two known reasons for the use of OHZ.
- To allow devices that are both Senders and Receivers to manage complicated patterns of one-to-many communication, such as a Receiver listening to a Sender that is itself listening to another Sender. In this instance, the intermediate Sender can redirect its Receivers to the root Sender rather than rebroadcast Audio messages, which would accumulate network delays.
- In order to allow a Receiver to continue listening to a Sender even though the configuration of the Sender has changed from Unicast to Multicast, or vice versa. Or when the Multicast channel is changed while the Sender is in Multicast mode.
Message Format
The OHZ protocol has the following message format.
Bytes | Name | Description |
---|---|---|
Header | ||
4 | Signature | 0x6f, 0x68, 0x7a, 0x20 ('ohz ') |
1 | Version | 1 |
1 | Type | The type of message |
0 - Zone Query | ||
1 - Zone Uri | ||
2 - Preset Query | ||
3 - Preset Info | ||
2 | Length | The length in bytes of the whole message including this header |
Minimum | 8 | |
Maximum | 5000 | |
Zone Query | ||
4 | QueryZoneLength | The length in bytes of the zone |
n | QueryZone | The queried zone, where n = QueryZoneLength |
Zone Uri | ||
4 | ZoneLength | The length in bytes of the zone |
4 | UriLength | The length in bytes of the URI |
p | Zone | The zone, where p = ZoneLength |
q | Uri | The URI, where q = UriLength |
Preset Query | ||
4 | QueryPreset | The queried preset number |
Preset Info | ||
4 | Preset | The preset number |
4 | MetadataLength | The length in bytes of the metadata |
r | Metadata | The metadata in DIDL-Lite format, where r = MetadataLength |
Zone Id Handling
Each participating Sender must have a unique Zone Id. This Id is often derived from the Sender's MAC address, but any other network-unique Id is acceptable.
The OHZ URI for a Sender is:
ohz://239.255.255.250:51972/ZoneId
In orderIf a Receiver is