@@ -566,6 +566,8 @@ code, as defined below:
566566|------|---------------------------|
567567| 0x6 | Too Many Subscribes |
568568|------|---------------------------|
569+ | 0x7 | Invalid Subscribe ID |
570+ |------|---------------------------|
569571| 0x10 | GOAWAY Timeout |
570572|------|---------------------------|
571573
@@ -585,7 +587,10 @@ code, as defined below:
585587* Too Many Subscribes: The session was closed because the subscriber used
586588 a Subscribe ID equal or larger than the current Maximum Subscribe ID.
587589
588- * GOAWAY Timeout: The session was closed because the peer took too long to
590+ * Invalid Subscribe ID: The session was closed because the subscriber sent
591+ a Joining Fetch with a Subscribe ID that does not exist.
592+
593+ * GOAWAY Timeout: The session was closed because the client took too long to
589594 close the session in response to a GOAWAY ({{message-goaway}}) message.
590595 See session migration ({{session-migration}}).
591596
@@ -1405,6 +1410,20 @@ objects within a track. The publisher responding to a FETCH is responsible for r
14051410all available Objects. If there are gaps between Objects, the publisher omits them from the
14061411fetch response. All omitted objects have status Object Not Available.
14071412
1413+ **Fetch Types**
1414+
1415+ There are two types of Fetch messages :
1416+
1417+ Standalone Fetch (0x1) : A Fetch of Objects performed independently of any Subscribe.
1418+
1419+ Joining Fetch (0x2) : A Fetch joined together with a Subscribe. A Joining Fetch
1420+ shares the same Subscribe ID as an already-sent Subscribe. A publisher receiving a Joining
1421+ Fetch should use properties of the associated Subscribe to determine the Track Namespace,
1422+ Track, StartGroup, StartObject, EndGroup, and EndObject for the Joining Fetch such that it is
1423+ contiguous with the associated Subscribe and begins Previous Group Count prior.
1424+
1425+ A Fetch Type other than the above MUST be treated as an error.
1426+
14081427A publisher responds to a FETCH request with either a FETCH_OK or a FETCH_ERROR
14091428message. If it responds with FETCH_OK, the publisher creates a new unidirectional
14101429stream that is used to send the Objects. A relay MAY start sending objects immediately
@@ -1424,34 +1443,48 @@ FETCH Message {
14241443 Type (i) = 0x16,
14251444 Length (i),
14261445 Subscribe ID (i),
1427- Track Namespace (tuple),
1428- Track Name Length (i),
1429- Track Name (..),
14301446 Subscriber Priority (8),
1431- Group Order (8),
1432- StartGroup (i),
1433- StartObject (i),
1434- EndGroup (i),
1435- EndObject (i),
1447+ Fetch Type (i),
1448+ [Track Namespace (tuple),
1449+ Track Name Length (i),
1450+ Track Name (..),
1451+ Group Order (8),
1452+ StartGroup (i),
1453+ StartObject (i),
1454+ EndGroup (i),
1455+ EndObject (i),]
1456+ [Previous Group Count (i),]
14361457 Number of Parameters (i),
14371458 Parameters (..) ...
14381459}
14391460~~~
14401461{: # moq-transport-fetch-format title="MOQT FETCH Message"}
14411462
1463+ Fields common to all Fetch Types :
1464+
14421465* Subscribe ID: The Subscribe ID identifies a given fetch request. Subscribe ID
14431466is a variable length integer that MUST be unique and monotonically increasing
1444- within a session.
1467+ within a session. For a Standalone Fetch a new Subscribe ID MUST be used. For
1468+ a Joining Fetch, the Subscribe ID MUST correspond to a Subscribe which has already
1469+ been sent. If a publisher receives a Joining Fetch with a Subscribe ID that does
1470+ not correspond to an existing Subscribe, it MUST close the session with an
1471+ Invalid Subscribe ID error.
1472+
1473+ * Subscriber Priority: Specifies the priority of a fetch request relative to
1474+ other subscriptions or fetches in the same session. Lower numbers get higher
1475+ priority. See {{priorities}}.
1476+
1477+ * Fetch Type: Identifies the type of Fetch, whether joining or standalone.
1478+
1479+ * Parameters: The parameters are defined in {{version-specific-params}}.
1480+
1481+ Fields present only for Standalone Fetch (0x1) :
14451482
14461483* Track Namespace: Identifies the namespace of the track as defined in
14471484({{track-name}}).
14481485
14491486* Track Name: Identifies the track name as defined in ({{track-name}}).
14501487
1451- * Subscriber Priority: Specifies the priority of a fetch request relative to
1452- other subscriptions or fetches in the same session. Lower numbers get higher
1453- priority. See {{priorities}}.
1454-
14551488* Group Order: Allows the subscriber to request Objects be delivered in
14561489Ascending (0x1) or Descending (0x2) order by group. See {{priorities}}.
14571490A value of 0x0 indicates the original publisher's Group Order SHOULD be
@@ -1466,8 +1499,9 @@ used. Values larger than 0x2 are a protocol error.
14661499* EndObject: The end Object ID, plus 1. A value of 0 means the entire group is
14671500requested.
14681501
1469- * Parameters: The parameters are defined in {{version-specific-params}}.
1502+ Field present only for Joining Fetch (0x2) :
14701503
1504+ * Previous Group Count: The number of groups to Fetch prior to the StartGroup of the corresponding Subscribe
14711505
14721506Objects that are not yet published will not be retrieved by a FETCH.
14731507The latest available Object is indicated in the FETCH_OK, and is the last
@@ -1485,6 +1519,23 @@ A publisher MUST send fetched groups in group order, either ascending or
14851519descending. Within each group, objects are sent in Object ID order;
14861520subgroup ID is not used for ordering.
14871521
1522+ A publisher which receives a Fetch message with a Fetch Type of 0x2 should treat it as a Fetch
1523+ with the following fields dynamically determined from the corresponding Subscribe :
1524+
1525+ * Track Namespace: Same as in the corresponding Subscribe
1526+
1527+ * Track Name: Same as in the corresponding SUBSCRIBE
1528+
1529+ * StartGroup: LatestGroup as determined for the SUBSCRIBE minus PreviousGroups from the JOIN
1530+
1531+ * StartObject: Always 0
1532+
1533+ * EndGroup: StartGroup of the corresponding SUBSCRIBE minus 1 (double check minus 1)
1534+
1535+ * EndObject: StartObject of the corresponding SUBSCRIBE minus 1 (double check minus 1)
1536+
1537+ A Joining Fetch MUST be sent in ascending group order.
1538+
14881539# # FETCH_CANCEL {#message-fetch-cancel}
14891540
14901541A subscriber issues a `FETCH_CANCEL` message to a publisher indicating it is no
0 commit comments