@@ -592,6 +592,9 @@ terminates the track with a SUBSCRIBE_FIN
592592(see {{message-subscribe-fin}}) or a SUBSCRIBE_RST
593593(see {{message-subscribe-rst}}).
594594
595+ A relay MUST not reorder or drop objects received on a multi-object stream when
596+ forwarding to subscribers, unless it has application specific information.
597+
595598Relays MAY aggregate authorized subscriptions for a given track when
596599multiple subscribers request the same track. Subscription aggregation
597600allows relays to make only a single forward subscription for the
@@ -649,7 +652,8 @@ congestion response.
649652# # Relay Object Handling
650653
651654MOQT encodes the delivery information for a stream via OBJECT headers
652- ({{message-object}}).
655+ ({{message-object}}). A relay MUST NOT modify Object properties when
656+ forwarding.
653657
654658A relay MUST treat the object payload as opaque. A relay MUST NOT
655659combine, split, or otherwise modify object payloads. A relay SHOULD
@@ -684,11 +688,9 @@ MOQT Message {
684688|-------|----------------------------------------------------|
685689| ID | Messages |
686690|------:|:---------------------------------------------------|
687- | 0x0 | OBJECT with payload length ({{message-object}}) |
688- |-------|----------------------------------------------------|
689- | 0x2 | OBJECT without payload length ({{message-object}}) |
691+ | 0x0 | OBJECT_STREAM ({{object-message-formats}}) |
690692|-------|----------------------------------------------------|
691- | 0x3 | SUBSCRIBE ({{message-subscribe-req}}) |
693+ | 0x3 | SUBSCRIBE ({{message-subscribe-req}}) |
692694|-------|----------------------------------------------------|
693695| 0x4 | SUBSCRIBE_OK ({{message-subscribe-ok}}) |
694696|-------|----------------------------------------------------|
@@ -714,6 +716,10 @@ MOQT Message {
714716|-------|----------------------------------------------------|
715717| 0x41 | SERVER_SETUP ({{message-setup}}) |
716718|-------|----------------------------------------------------|
719+ | 0x50 | STREAM_HEADER_TRACK ({{multi-object-streams}}) |
720+ |-------|----------------------------------------------------|
721+ | 0x51 | STREAM_HEADER_GROUP ({{multi-object-streams}}) |
722+ |-------|----------------------------------------------------|
717723
718724# # Parameters {#params}
719725
@@ -862,30 +868,17 @@ the `query` portion of the URI to the parameter.
862868
863869# # OBJECT {#message-object}
864870
865- A OBJECT message contains a range of contiguous bytes from from the
871+ An OBJECT message contains a range of contiguous bytes from from the
866872specified track, as well as associated metadata required to deliver,
867- cache, and forward it. There are two subtypes of this message. When the
868- message type is 0x00, the optional Object Payload Length field is
869- present. When the message type is 0x02, the field is not present.
873+ cache, and forward it.
870874
871- The format of the OBJECT message is as follows :
875+ # ## Canonical Object Fields
872876
873- ~~~
874- OBJECT Message {
875- Track Alias (i),
876- Group ID (i),
877- Object ID (i),
878- Object Send Order (i),
879- [Object Payload Length (i)],
880- Object Payload (b),
881- }
882- ~~~
883- {: # moq-transport-object-format title="MOQT OBJECT Message"}
877+ A canonical MoQ Object has the following information :
884878
885- * Track Alias :The track identifier as specified in the
886- SUBSCRIBE message {{message-subscribe-req}}.
879+ * Track Namespace and Track Name: The track this object belongs to.
887880
888- * Group ID : The object is a member of the indicated group ID
881+ * Group ID: The object is a member of the indicated group ID
889882{{model-group}} within the track.
890883
891884* Object ID: The order of the object within the group. The
@@ -895,12 +888,190 @@ group.
895888* Object Send Order: An integer indicating the object send order
896889{{send-order}} or priority {{ordering-by-priorities}} value.
897890
898- * Object Payload Length: The length of the following Object Payload. If this
899- field is absent, the object payload continues to the end of the stream.
891+ * Object Forwarding Preference: An enumeration indicating how a sender sends an
892+ object. The preferences are Track, Group, and Object. An Object MUST be sent
893+ according to its `Object Forwarding Preference`, described below.
900894
901895* Object Payload: An opaque payload intended for the consumer and SHOULD
902896NOT be processed by a relay.
903897
898+ # ## Object Message Formats
899+
900+ An `OBJECT_STREAM` message carries a single object on a stream. There is no
901+ explicit length of the payload; it is determined by the end of the stream. An
902+ ` OBJECT_STREAM` message MUST be the first and only message on a unidirectional
903+ stream.
904+
905+ An Object received in an `OBJECT_STREAM` message has an `Object Forwarding
906+ Preference` = `Object`.
907+
908+ To send an Object with `Object Forwarding Preference` = `Object`, open a stream,
909+ serialize object fields below, and terminate the stream.
910+
911+ ~~~
912+ OBJECT_STREAM Message {
913+ Subscribe ID (i),
914+ Track Alias (i),
915+ Group ID (i),
916+ Object ID (i),
917+ Object Send Order (i),
918+ Object Payload (...),
919+ }
920+ ~~~
921+ {: # moq-transport-object-stream-format title="MOQT OBJECT_STREAM Message"}
922+
923+ * Subscribe ID: Subscription Identifer as defined in {{message-subscribe-req}}.
924+
925+ * Track Alias: Identifies the Track Namespace and Track Name as defined in
926+ {{message-subscribe-req}}.
927+
928+ If the Track Namespace and Track Name identified by the Track Alias are
929+ different from those specified in the subscription identified by Subscribe ID,
930+ the receiver MUST close the session with a Protocol Violation.
931+
932+ * Other fields: As described in {{canonical-object-fields}}.
933+
934+ # ## Multi-Object Streams
935+
936+ When multiple objects are sent on a stream, the stream begins with a stream
937+ header message and is followed by one or more sets of serialized object fields.
938+ If a stream ends gracefully in the middle of a serialized Object, terminate the
939+ session with a Protocol Violation.
940+
941+ A sender SHOULD NOT open more than one multi-object stream at a time with the
942+ same stream header message type and fields.
943+
944+
945+ TODO : figure out how a relay closes these streams
946+
947+ When a stream begins with `STREAM_HEADER_TRACK`, all objects on the stream
948+ belong to the track requested in the Subscribe message identified by `Subscribe
949+ ID`. All objects on the stream have the `Object Send Order` specified in the
950+ stream header.
951+
952+
953+ ~~~
954+ STREAM_HEADER_TRACK Message {
955+ Subscribe ID (i)
956+ Track Alias (i),
957+ Object Send Order (i),
958+ }
959+ ~~~
960+ {: # stream-header-track-format title="MOQT STREAM_HEADER_TRACK Message"}
961+
962+ All Objects received on a stream opened with STREAM_HEADER_TRACK have an `Object
963+ Forwarding Preference` = `Track`.
964+
965+ To send an Object with `Object Forwarding Preference` = `Track`, find the open
966+ stream that is associated with the subscription, or open a new one and send the
967+ ` STREAM_HEADER_TRACK` if needed, then serialize the the following object fields.
968+
969+ ~~~
970+ {
971+ Group ID (i),
972+ Object ID (i),
973+ Object Payload Length (i),
974+ Object Payload (...),
975+ }
976+ ~~~
977+ {: # object-track-format title="MOQT Track Stream Object Fields"}
978+
979+ A sender MUST NOT send an Object on a stream if its Group ID is less than a
980+ previously sent Group ID on that stream, or if its Object ID is less than or
981+ equal to a previously sent Object ID within a given group on that stream.
982+
983+ When a stream begins with `STREAM_HEADER_GROUP`, all objects on the stream
984+ belong to the track requested in the Subscribe message identified by `Subscribe
985+ ID` and the group indicated by `Group ID`. All objects on the stream
986+ have the `Object Send Order` specified in the stream header.
987+
988+ ~~~
989+ STREAM_HEADER_GROUP Message {
990+ Subscribe ID (i),
991+ Track Alias (i),
992+ Group ID (i)
993+ Object Send Order (i)
994+ }
995+ ~~~
996+ {: # stream-header-group-format title="MOQT STREAM_HEADER_GROUP Message"}
997+
998+ All Objects received on a stream opened with `STREAM_HEADER_GROUP` have an
999+ ` Object Forwarding Preference` = `Group`.
1000+
1001+ To send an Object with `Object Forwarding Preference` = `Group`, find the open
1002+ stream that is associated with the subscription, `Group ID` and `Object
1003+ Send Order`, or open a new one and send the `STREAM_HEADER_GROUP` if needed,
1004+ then serialize the following fields.
1005+
1006+ ~~~
1007+ {
1008+ Object ID (i),
1009+ Object Payload Length (i),
1010+ Object Payload (...),
1011+ }
1012+ ~~~
1013+ {: # object-group-format title="MOQT Group Stream Object Fields"}
1014+
1015+ A sender MUST NOT send an Object on a stream if its Object ID is less than a
1016+ previously sent Object ID within a given group in that stream.
1017+
1018+ # ## Examples:
1019+
1020+ Sending a track on one stream :
1021+
1022+ ~~~
1023+ STREAM_HEADER_TRACK {
1024+ Subscribe ID = 1
1025+ Track Alias = 1
1026+ Object Send Order = 0
1027+ }
1028+ {
1029+ Group ID = 0
1030+ Object ID = 0
1031+ Object Payload Length = 4
1032+ Payload = "abcd"
1033+ }
1034+ {
1035+ Group ID = 1
1036+ Object ID = 0
1037+ Object Payload Length = 4
1038+ Payload = "efgh"
1039+ }
1040+ ~~~
1041+
1042+ Sending a group on one stream, with a unordered object in the group appearing
1043+ on its own stream.
1044+
1045+ ~~~
1046+ Stream = 2
1047+
1048+ STREAM_HEADER_GROUP {
1049+ Subscribe ID = 2
1050+ Track Alias = 2
1051+ Group ID = 0
1052+ Object Send Order = 0
1053+ }
1054+ {
1055+ Object ID = 0
1056+ Object Payload Length = 4
1057+ Payload = "abcd"
1058+ }
1059+ {
1060+ Object ID = 1
1061+ Object Payload Length = 4
1062+ Payload = "efgh"
1063+ }
1064+
1065+ Stream = 6
1066+
1067+ OBJECT_STREAM {
1068+ Subscribe ID = 2
1069+ Track Alias = 2
1070+ Group ID = 0
1071+ Object ID = 1
1072+ Payload = "moqrocks"
1073+ }
1074+ ~~~
9041075
9051076# # SUBSCRIBE {#message-subscribe-req}
9061077
0 commit comments