A single object can be conveyed in a datagram. The Track Alias field (Section 10.1) indicates the track this Datagram belongs to. If an endpoint receives a datagram with an unknown Track Alias, it MAY drop the datagram or choose to buffer it for a brief period to handle reordering with the control message that establishes the Track Alias.
An Object received in an OBJECT_DATAGRAM message has an Object Forwarding
Preference = Datagram.
To send an Object with Object Forwarding Preference = Datagram, determine
the length of the header and payload and send the Object as datagram. When the
total size is larger than the maximum datagram size for the session, the Object
will be dropped without any explicit notification.
Each session along the path between the Original Publisher and End Subscriber might have different maximum datagram sizes. Additionally, Object Properties (Section 10.2.1.2) can be added to Objects as they pass through the MOQT network, increasing the size of the Object and the chances it will exceed the maximum datagram size of a downstream session and be dropped.
10.3.1. Object Datagram
An OBJECT_DATAGRAM carries a single object in a datagram.
OBJECT_DATAGRAM {
Type (i) = 0x00..0x0F / 0x20..0x21 / 0x24..0x25 /
0x28..0x29 / 0x2C..0x2D,
Track Alias (vi64),
Group ID (vi64),
[Object ID (vi64),]
[Publisher Priority (8),]
[Properties (..),]
[Object Status (vi64),]
[Object Payload (..),]
}
The Type field in the OBJECT_DATAGRAM takes the form 0b00X0XXXX (or the set of values from 0x00 to 0x0F, 0x20 to 0x2F). However, not all Type values in this range are valid. The four low-order bits and bit 5 of the Type field determine which fields are present in the datagram:
-
The PROPERTIES bit (0x01) indicates when the Properties field is present. When set to 1, the Object Properties structure defined in Section 10.2.1.2 is present. When set to 0, the field is absent. If an endpoint receives a datagram with the PROPERTIES bit set and an Properties Length of 0, it MUST close the session with a
PROTOCOL_VIOLATION. -
The END_OF_GROUP bit (0x02) indicates End of Group. When set to 1, this indicates that no Object with the same Group ID and an Object ID greater than the Object ID in this datagram exists.
-
The ZERO_OBJECT_ID bit (0x04) indicates when the Object ID field is present. When set to 1, the Object ID field is omitted and the Object ID is
-
When set to 0, the Object ID field is present.
-
-
The DEFAULT_PRIORITY bit (0x08) indicates when the Priority field is present. When set to 1, the Priority field is omitted and this Object inherits the Publisher Priority specified in the control message that established the subscription. When set to 0, the Priority field is present.
-
The STATUS bit (0x20) indicates whether the datagram contains an Object Status or Object Payload. When set to 1, the Object Status field is present and there is no Object Payload. When set to 0, the Object Payload is present and the Object Status field is omitted. There is no explicit length field for the Object Payload; the entirety of the transport datagram following the Object header contains the payload.
The following Type values are invalid. If an endpoint receives a datagram with
any of these Type values, it MUST close the session with a PROTOCOL_VIOLATION:
-
Type values with both the STATUS bit (0x20) and END_OF_GROUP bit (0x02) set: 0x22, 0x23, 0x26, 0x27, 0x2A, 0x2B, 0x2E, 0x2F. An object status message cannot signal end of group.
-
Type values that do not match the form 0b00X0XXXX (i.e., Type values outside the ranges 0x00..0x0F and 0x20..0x2F).
If an Object Datagram includes both the STATUS bit and PROPERTIES bit, and the
Object Status is not Normal (0x0), the endpoint MUST close the session with a
PROTOCOL_VIOLATION, because only Normal Objects can have Properties.