@@ -685,41 +685,43 @@ MOQT Message {
685
685
~~~
686
686
{: # moq-transport-message-format title="MOQT Message"}
687
687
688
- |-------|----------------------------------------------------|
689
- | ID | Messages |
690
- |------:|:---------------------------------------------------|
691
- | 0x0 | OBJECT_STREAM ({{object-message-formats}}) |
692
- |-------|----------------------------------------------------|
693
- | 0x3 | SUBSCRIBE ({{message-subscribe-req}}) |
694
- |-------|----------------------------------------------------|
695
- | 0x4 | SUBSCRIBE_OK ({{message-subscribe-ok}}) |
696
- |-------|----------------------------------------------------|
697
- | 0x5 | SUBSCRIBE_ERROR ({{message-subscribe-error}}) |
698
- |-------|----------------------------------------------------|
699
- | 0x6 | ANNOUNCE ({{message-announce}}) |
700
- |-------|----------------------------------------------------|
701
- | 0x7 | ANNOUNCE_OK ({{message-announce-ok}}) |
702
- |-------|----------------------------------------------------|
703
- | 0x8 | ANNOUNCE_ERROR ({{message-announce-error}}) |
704
- |-------|----------------------------------------------------|
705
- | 0x9 | UNANNOUNCE ({{message-unannounce}}) |
706
- |-------|----------------------------------------------------|
707
- | 0xA | UNSUBSCRIBE ({{message-unsubscribe}}) |
708
- |-------|----------------------------------------------------|
709
- | 0xB | SUBSCRIBE_FIN ({{message-subscribe-fin}}) |
710
- |-------|----------------------------------------------------|
711
- | 0xC | SUBSCRIBE_RST ({{message-subscribe-rst}}) |
712
- |-------|----------------------------------------------------|
713
- | 0x10 | GOAWAY ({{message-goaway}}) |
714
- |-------|----------------------------------------------------|
715
- | 0x40 | CLIENT_SETUP ({{message-setup}}) |
716
- |-------|----------------------------------------------------|
717
- | 0x41 | SERVER_SETUP ({{message-setup}}) |
718
- |-------|----------------------------------------------------|
719
- | 0x50 | STREAM_HEADER_TRACK ({{multi-object-streams}}) |
720
- |-------|----------------------------------------------------|
721
- | 0x51 | STREAM_HEADER_GROUP ({{multi-object-streams}}) |
722
- |-------|----------------------------------------------------|
688
+ |-------|-----------------------------------------------------|
689
+ | ID | Messages |
690
+ |------:|:----------------------------------------------------|
691
+ | 0x0 | OBJECT_STREAM ({{object-message-formats}}) |
692
+ |-------|-----------------------------------------------------|
693
+ | 0x1 | OBJECT_PREFER_DATAGRAM ({{object-message-formats}}) |
694
+ |-------|-----------------------------------------------------|
695
+ | 0x3 | SUBSCRIBE ({{message-subscribe-req}}) |
696
+ |-------|-----------------------------------------------------|
697
+ | 0x4 | SUBSCRIBE_OK ({{message-subscribe-ok}}) |
698
+ |-------|-----------------------------------------------------|
699
+ | 0x5 | SUBSCRIBE_ERROR ({{message-subscribe-error}}) |
700
+ |-------|-----------------------------------------------------|
701
+ | 0x6 | ANNOUNCE ({{message-announce}}) |
702
+ |-------|-----------------------------------------------------|
703
+ | 0x7 | ANNOUNCE_OK ({{message-announce-ok}}) |
704
+ |-------|-----------------------------------------------------|
705
+ | 0x8 | ANNOUNCE_ERROR ({{message-announce-error}}) |
706
+ |-------|-----------------------------------------------------|
707
+ | 0x9 | UNANNOUNCE ({{message-unannounce}}) |
708
+ |-------|-----------------------------------------------------|
709
+ | 0xA | UNSUBSCRIBE ({{message-unsubscribe}}) |
710
+ |-------|-----------------------------------------------------|
711
+ | 0xB | SUBSCRIBE_FIN ({{message-subscribe-fin}}) |
712
+ |-------|-----------------------------------------------------|
713
+ | 0xC | SUBSCRIBE_RST ({{message-subscribe-rst}}) |
714
+ |-------|-----------------------------------------------------|
715
+ | 0x10 | GOAWAY ({{message-goaway}}) |
716
+ |-------|-----------------------------------------------------|
717
+ | 0x40 | CLIENT_SETUP ({{message-setup}}) |
718
+ |-------|-----------------------------------------------------|
719
+ | 0x41 | SERVER_SETUP ({{message-setup}}) |
720
+ |-------|-----------------------------------------------------|
721
+ | 0x50 | STREAM_HEADER_TRACK ({{multi-object-streams}}) |
722
+ |-------|-----------------------------------------------------|
723
+ | 0x51 | STREAM_HEADER_GROUP ({{multi-object-streams}}) |
724
+ |-------|-----------------------------------------------------|
723
725
724
726
# # Parameters {#params}
725
727
@@ -889,14 +891,16 @@ group.
889
891
{{send-order}} or priority {{ordering-by-priorities}} value.
890
892
891
893
* 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.
894
+ object. The preferences are Track, Group, Object and Datagram . An Object MUST
895
+ be sent according to its `Object Forwarding Preference`, described below.
894
896
895
897
* Object Payload: An opaque payload intended for the consumer and SHOULD
896
898
NOT be processed by a relay.
897
899
898
900
# ## Object Message Formats
899
901
902
+ **Object Stream Message**
903
+
900
904
An `OBJECT_STREAM` message carries a single object on a stream. There is no
901
905
explicit length of the payload; it is determined by the end of the stream. An
902
906
` OBJECT_STREAM` message MUST be the first and only message on a unidirectional
@@ -931,6 +935,36 @@ the receiver MUST close the session with a Protocol Violation.
931
935
932
936
* Other fields: As described in {{canonical-object-fields}}.
933
937
938
+ **Object Prefer Datagram Message**
939
+
940
+ An `OBJECT_PREFER_DATAGRAM` message carries a single object in a datagram or
941
+ a stream. There is no explicit length of the payload; it is determined by the
942
+ length of the datagram or stream. If this message appears on a stream, it MUST
943
+ be the only message on a unidirectional stream.
944
+
945
+ An Object received in an `OBJECT_PREFER_DATAGRAM` message has an `Object
946
+ Forwarding Preference` = `Datagram`.
947
+
948
+ To send an Object with `Object Forwarding Preference` = `Datagram`, determine
949
+ the length of the fields and payload, and compare the length with the maximum
950
+ datagram size of the session. If the object size is less than or equal maximum
951
+ datagram size, send the serialized data as a datagram. Otherwise, open a
952
+ stream, send the serialized data and terminate the stream. An implementation
953
+ SHOULD NOT send an Object with `Object Forwarding Preference` = `Datagram` on a
954
+ stream if it is possible to send it as a datagram.
955
+
956
+ ~~~
957
+ OBJECT_PREFER_DATAGRAM Message {
958
+ Subscription ID (i),
959
+ Track Alias (i),
960
+ Group ID (i),
961
+ Object ID (i),
962
+ Object Send Order (i),
963
+ Object Payload (...),
964
+ }
965
+ ~~~
966
+ {: # object-datagram-format title="MOQT OBJECT_PREFER_DATAGRAM Message"}
967
+
934
968
# ## Multi-Object Streams
935
969
936
970
When multiple objects are sent on a stream, the stream begins with a stream
@@ -944,6 +978,8 @@ same stream header message type and fields.
944
978
945
979
TODO : figure out how a relay closes these streams
946
980
981
+ **Stream Header Track**
982
+
947
983
When a stream begins with `STREAM_HEADER_TRACK`, all objects on the stream
948
984
belong to the track requested in the Subscribe message identified by `Subscribe
949
985
ID`. All objects on the stream have the `Object Send Order` specified in the
@@ -976,6 +1012,8 @@ stream that is associated with the subscription, or open a new one and send the
976
1012
~~~
977
1013
{: # object-track-format title="MOQT Track Stream Object Fields"}
978
1014
1015
+ **Stream Header Group**
1016
+
979
1017
A sender MUST NOT send an Object on a stream if its Group ID is less than a
980
1018
previously sent Group ID on that stream, or if its Object ID is less than or
981
1019
equal to a previously sent Object ID within a given group on that stream.
0 commit comments