2.2.3.1.2 MMS Data Packet

The MMS data packet structure (also referred to as "MMS Packet"), is a part of the $D (Data) (section 2.2.3.3), $H (Header) (section 2.2.3.5), and $M (Metadata) (section 2.2.3.6) packet types. The header portion of the MMS data packet is sometimes referred to as AF_HEADER_TYPE0.

The maximum size of an MMS data packet is 65,535 bytes. If the object being transferred would cause this size limit to be exceeded, it MUST be transferred as multiple MMS packets. For example, if the size of an ASF header is 100,000 bytes, it MUST be transferred using at least two $H packets. If the first $H packet contains a 65,535-byte MMS packet, the second $H packet would contain a 34,481-byte MMS packet. The preservation of byte boundaries is not a requirement when fragmenting ASF headers.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

LocationId

Incarnation

AFFlags

PacketSize

Payload (variable)

...

LocationId (4 bytes): A 32-bit unsigned integer field that specifies the index of the Payload field into the complete object that is being transferred. For $M and $H packets, which can be split across multiple packet payloads, the LocationId MUST be 0 for the first payload and MUST increment by 1 for each subsequent payload. For $D packets, the entire ASF file is considered the object that is being transferred. Thus, for $D packets, this field MUST be set to the payload's ASF packet number. The first ASF packet in an ASF file MUST have LocationId 0, the second ASF packet in the file MUST have LocationId 1, and so on. Note that since a server MAY skip ASF packets, the value of the LocationId field might not be sequential from one MMS data packet to the next. If the server does not have access to the ASF file (for example, in case of "live" content), the server MUST assume a "virtual" ASF file, incrementing LocationId (or decrementing it, when rewinding the content) exactly as if a real ASF file existed.

Incarnation (1 byte): An 8-bit sequence number. The initial value of this field SHOULD be 0. Sections 3.2.5.6 and 3.2.5.9 specify details about how this field is assigned. This field can be ignored by clients.

AFFlags (1 byte): An 8-bit unsigned integer field. For $D packets, the field MUST be treated as a sequence number. The initial value MUST be 0 and it MUST increment by 1 for each $D packet that is transmitted. If the most recently transmitted $D packet had an AFFlags field value of 254, and the server receives a Play (section 2.2.2.6) or PlayNextEntry (section 2.2.2.7) request, then the first $D packet transmitted in the response SHOULD have the AFFlags field set to 0. For $M and $H packets the following rules apply: The AFFlags field MUST be set to 0x00 unless otherwise specified in this document. The AFFlags field MUST be set to 0x04 if the object being transferred is split into multiple MMS packets, and this is the first MMS data packet in the sequence. AFFlags MUST be set to 0x08 if this is the last MMS data packet in the sequence, and AFFlags MUST be set to 0x0C if this is both the first and the last packet in the sequence (that is, the object is fully contained in the Payload field of the current MMS data packet).

PacketSize (2 bytes): A 16-bit unsigned integer field. This field MUST be set to the total size of the MMS packet, in bytes.

Payload (variable): A variable size block of bytes. The content of this field is different for each packet type. For more information, see all packets from $C (Stream Change Notification) (section 2.2.3.2) through $T (Test Data Notification) (section 2.2.3.8).