5. ASF top-level Data Object

The Data Object contains all of the Data Packets for a file. These Data Packets are organized in terms of increasing send times. A Data Packet can contain interleaved data from several digital media streams. This data can consist of entire objects from one or more streams. Alternatively, it can consist of partial objects (fragmentation).

Capabilities provided within the interleave packet definition include:

The packet definition is the same as that in previous versions of this specification.


5.1 ASF Data Object (mandatory, one only)

The Data Object is represented using the following structure.

Field name

Field type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

File ID

GUID

128

Total Data Packets

QWORD

64

Reserved

WORD

16

Data Packets

See section 5.2

varies

The fields are defined as follows:

Object ID

Specifies the GUID for the Data Object. The value of this field shall be set to ASF_Data_Object.

Object Size

Specifies the size of the Data Object. Valid values are at least 50 bytes. Note that if the Broadcast Flag bit of the Flags field is set on the File Properties Object, then the Object Size field may be 0. This is a special case that indicates the size of the Data Object is unknown. It is not valid to have a value of 0 for the Object Size field if the Broadcast Flag is not set.

File ID

Specifies the unique identifier for this ASF file. The value of this field shall be changed every time the file is modified in any way. The value of this field shall be identical to the value of the File ID field of the Header Object.

Total Data Packets

Specifies the number of ASF Data Packet entries that exist within the Data Object. It must be equal to the Data Packet Count field in the File Properties Object (section 3.2). The value of this field is invalid if the Broadcast Flag field of the File Properties Object is set to 1.

Reserved

Specifies a reserved field. The value of this field shall set to 0x0101.

Data Packets

Specifies a list of Data Packets, as defined in section 5.2.

This structure is immediately followed by one or more Data Packets.


5.2 ASF data packet definition

In general, ASF media types logically consist of subelements that are referred to as media objects. What a media object happens to be in a given digital media stream is entirely stream-dependent (for example, it is a frame within a video stream). An ASF Data Packet is a conveniently sized grouping of complete or fragmented media objects from several digital media streams.

ASF Data Packets are structured as shown in the following diagram:



The following sections detail the content of each block shown in the previous diagram.



5.2.1 Error correction data

ASF Data Packets may start with some error correction data. This is signaled by the high order bit (Error Correction Present bit) of the first byte of the Data Packet being set. If this bit isn’t set, a Data Packet starts with the payload data described in section 5.2.2. If this bit is set to 1, a Data Packet starts with the following error correction data.


Field name

Field type

Size (bits)

Error Correction Flags

BYTE

8

Error Correction Data Length


4 (LSB)

Opaque Data Present


1

Error Correction Length Type


2

Error Correction Present


1

Error Correction Data

BYTE

varies


The fields are defined as follows:


Error Correction Flags

The flags are stored in LSB order.


Error Correction Data Length (bits 0-3)

The value of this field is valid only if the value of the Error Correction Length Type field is 00. If the Error Correction Length Type field is 00, this field represents the size of the Error Correction Data field, in bytes. The value of this field should be set to 0010. If the Error Correction Length Type field is different than 00, this field shall be set to 0000.

Opaque Data Present (bit 4)

Specifies, if set, that the Error Correction Data field is followed by opaque data. The value of this field should be set to 0.

Error Correction Length Type (bits 5-6)

Specifies the number of bits used to code the size of the error correction data. The value of this field should be set to 00, indicating that the size of the error correction data is stored in the Error Correction Data Length field. Values other than 00 are reserved for future use.

Error Correction Present (bit 7)

Specifies, if set, that this Data Packet starts with error correction information. If set, the structure of the Data Packet is as described above. If it is not set, the Data Packet starts with the payload structure, as shown in section 5.2.2.

Error Correction Data

Specifies an array of bytes containing error correction data. The format of this data is based on the presence of the Error Correction Object (see section 3.9), and the value of the Error Correction Type field of the Error Correction Object. In all cases, the format of the first two bytes of Error Correction Data are defined as follows:

Field name

Field type

Size (bits)

First byte – Type

BYTE

8

Type


4 (LSB)

Number


4

Second byte – Cycle

BYTE

8


The fields are defined as follows:

First byte – Type

The type values are stored in LSB order.

Type (bits 0-3)

Specifies the type of the error correction data. The values are defined in the following table.

Value (bits)

Description

0000

The data is uncorrected. If there is no Error Correction Object in the Header Object, this is the value that shall be used for this field.

0001

The type of error correction is XOR data. This field can only be set to this value if there is an Error Correction Object in the Header Object.

0010

The type of error correction is parity data. This field can only be set to this value if there is an Error Correction Object in the Header Object.

Number (bits 4-7)

This number shall be set to 0 if the value of the Type field indicates that the data is uncorrected. If there is an Error Correction Object in the Header Object, this field shall be set to 1.

Second byte – Cycle

Specifies the cycle used by the error correction algorithm. This number shall be set to 0 if the value of the Type field indicates that the data is uncorrected.



5.2.2 Payload parsing information

If any error correction data is present, payload parsing information follows it. Payload parsing information has the following structure.


Field name

Field type

Size (bits)

Length Type Flags

BYTE

8

Multiple Payloads Present


1 (LSB)

Sequence Type


2

Padding Length Type


2

Packet Length Type


2

Error Correction Present


1

Property Flags

BYTE

8

Replicated Data Length Type


2 (LSB)

Offset Into Media Object Length Type


2

Media Object Number Length Type


2

Stream Number Length Type


2

Packet Length

BYTE, WORD or DWORD

0, 8, 16, 32

Sequence

BYTE, WORD or DWORD

0, 8, 16, 32

Padding Length

BYTE, WORD or DWORD

0, 8, 16, 32

Send Time

DWORD

32

Duration

WORD

16



The fields are defined as follows:


Length Type Flags

The flags are stored in LSB order.

Multiple Payloads Present (bit 0)

Specifies, if set, that the Data Packet contains multiple payloads. Whenever this flag is set, there will be data from multiple digital media stream samples in the Data Packet.

Sequence Type (bits 1-2)

Specifies the number of bits used to code the Sequence field. The values are defined in the following table.

Value type

Description

00

The Sequence field does not exist.

01

The Sequence field is coded using a BYTE.

10

The Sequence field is coded using a WORD.

11

The Sequence field is coded using a DWORD.

The value of field should be set to 00.

Padding Length Type (bits 3-4)

Specifies the number of bits used to code the Padding Length field. The values are defined in the following table.

Value type

Description

00

The Padding Length field does not exist.

01

The Padding Length field is coded using a BYTE.

10

The Padding Length field is coded using a WORD.

11

The Padding Length field is coded using a DWORD.

Packet Length Type (bits 5-6)

Specifies the number of bits used to code the Packet Length field. The values are defined in the following table.

Value type

Description

00

The Packet Length field does not exist.

01

The Packet Length field is coded using a BYTE.

10

The Packet Length field is coded using a WORD.

11

The Packet Length field is coded using a DWORD.

The value of field should be set to 00 when creating content.

Error Correction Present (bit 7)

Specifies, if set, that this Data Packet starts with error correction information. If not set, the structure of the Data Packet starts with the payload data as described above. If it is set, the Data Packet starts with the Error Correction Data structure, as shown in section 5.2.1 and this bit in the Length Type Flags field following error correction data in the Data Packet is not used and shall be ignored.

Property Flags

The flags are stored in LSB order.


Replicated Data Length Type (bits 0-1)

Specifies the number of bits used to code the Replicated Data Length field. The following values are defined:

Value type

Description

00

The Replicated Data Length field does not exist.

01

The Replicated Data Length field is coded using a BYTE.

10

The Replicated Data Length field is coded using a WORD.

11

The Replicated Data Length field is coded using a DWORD.

The value of this field should be set to 01.

Offset Into Media Object Length Type (bits 2-3)

Specifies the number of bits used to code the Offset Into Media Object Length field. The following values are defined:

Value type

Description

00

The Offset Into Media Object Length field does not exist.

01

The Offset Into Media Object Length field is coded using a BYTE.

10

The Offset Into Media Object Length field is coded using a WORD.

11

The Offset Into Media Object Length field is coded using a DWORD.

The value of this field should be set to 11.

Note that for compressed payloads (see sections 5.2.3.2 and 5.2.3.4) this field takes on a different meaning; instead—it is a presentation time.

Media Object Number Length Type (bits 4-5)

Specifies the number of bits used to code the Media Object Number Length field. The following values are defined:

Value type

Description

00

The Media Object Number Length field does not exist.

01

The Media Object Number Length field is coded using a BYTE.

10

The Media Object Number Length field is coded using a WORD.

11

The Media Object Number Length field is coded using a DWORD.

The value of this field shall be set to 01.

Stream Number Length Type (bits 6-7)

Specifies the number of bits used to code the Stream Number Length field. The value of this field shall be set to 01 to indicate that the Stream Number Length field is coded in a BYTE.

Packet Length

This field specifies the length of the data packet. This field exists only if the value of the Packet Length Type field is not 00. Whenever present, the Packet Length field can be coded using either a BYTE, a WORD, or a DWORD. This is specified by the value of the Packet Length Type field.

Sequence

This field is reserved for future use, and should be ignored. This field exists if and only if the value of the Sequence Type field is not 00. Whenever present, the Sequence field can be coded using either a BYTE, WORD or a DWORD. This is specified by the value of the Sequence Type field.

Padding Length

This field specifies the length of the padding at the end of a data packet. This field exists only if the value of the Padding Length Type field is not 00. Whenever present, the Padding Length field can be coded using either a BYTE, WORD, or DWORD and should contain the correct padding length. This is specified by the value of the Padding Length Type field.
In the multiple-payload case, where the amount of padding can be inferred by the packet length and the size of the final payload, this value can be zero even if there is some padding in the packet. For more details, see section 8.2.15.

Send Time

Specifies the send time of the Data Packet. The Send Time field must be coded using a DWORD and is specified in millisecond units.

Duration

Specifies the duration of the Data Packet. The Duration field is coded using a WORD and is specified in millisecond units.



5.2.3 Payload data

The actual digital media data follows the payload parsing information. This data can contain one or several payloads of data, depending on the value of the Multiple Payloads Present flag in the structure described in the previous section. If the Multiple Payloads Present flag is set to 1, the actual data is composed of multiple payloads, as described in section 5.2.3.3.



5.2.3.1 Single payload

Payload data in a Data Packet with a unique payload has the following structure.


Field name

Field type

Size (bits)

Payload

See below



Payload


Field name

Field type

Size (bits)

Stream Number

BYTE

8

Media Object Number

BYTE, WORD, or DWORD

0, 8, 16, 32

Offset Into Media Object

BYTE, WORD, or DWORD

0, 8, 16, 32

Replicated Data Length

BYTE, WORD, or DWORD

0, 8, 16, 32

Replicated Data

BYTE

varies

Payload Data

BYTE

varies


The fields are defined as follows:


Stream Number

Specifies the stream number of the stream this data payload belongs to as well as whether the payload belongs to a media object that is a key frame.

Field name

Field type

Size (bits)

Stream Number and Key Frame Bit

BYTE

8

Stream Number


7 (LSB)

Key Frame Bit


1


Valid values for the low seven bits range from 1 to 127.

Media Object Number

Specifies the number of the media object this data payload belongs to. This field shall not be present if the Media Object Number Length Type field of the payload parsing information structure is set to 00. Whenever present, the Media Object Number field can be coded using either a BYTE, a WORD, or a DWORD. This is specified by the value of the Media Object Number Length Type field. For content created according to this specification, this field is coded using a BYTE.

Offset Into Media Object

Specifies the byte offset in the media object this data payload belongs to. This field shall not be present if the Offset Into Media Object Length Type field of the payload parsing information structure is set to 00. Whenever present, the Offset Into Media Object field can be coded using either a BYTE, a WORD, or a DWORD. This is specified by the value of the Offset Into Media Object Length Type field. For content created according to this specification, this field is coded using a DWORD.

Replicated Data Length

Specifies the size, in bytes, of the Replicated Data field. This field shall not be present if the Replicated Data Length Type field of the payload parsing information structure is set to 00. Whenever present, the Replicated Data Length field can be coded using either a BYTE, a WORD, or a DWORD. This is specified by the value of the Replicated Data Length Type field. For content created according to this specification, this field is coded using a BYTE. If the value of this field is set to 1, the payload should be interpreted as a compressed payload, as described in section 5.2.3.2. Otherwise, valid values are 0 or values greater than or equal to 8.

Replicated Data

Specifies an array of replicated data. The number of bytes in this array is specified by the Replicated Data Length field. This data will be identical in value for all payloads for the same Media Object. Whenever present, this data always starts with a DWORD that contains the size, in bytes, of the Media Object this payload belongs to, immediately followed by a DWORD that contains the presentation time, in milliseconds, of the Media Object this payload belongs to. Following those two DWORDs is optional extension data for media samples. For details on how to use this data, see section 7.3.1.

Payload Data

Specifies an array containing the actual data for the payload. The number of bytes in this array can be calculated from the overall Packet Length field, and is equal to the Packet Length minus the packet header length, minus the payload header length (including Replicated Data), minus the Padding Length.


5.2.3.2 Single payload, compressed payload data

This section shows the compressed payload interpretation of a single payload, as determined when the Replicated Data Length field of a single payload has a value of 1. A compressed payload contains one or more sub-payloads.


Compressed payloads can allow some space in the data packets to be saved. They can be used to represent a group of payloads only when all of the following conditions are met:

  1. All payloads are for the same stream.

  2. Either all payloads need to be marked as a key frame, or (more commonly) none of the frames needs to be marked as a key frame.

  3. Each payload represents an entire media object (rather than a fragment thereof).

  4. No payload has more than 256 bytes of data.

  5. No payload has more than the standard 8 bytes of replicated data.

  6. The values of the Media Object Number field in the Paylod Data stuctures of the payloads are consecutive.

  7. The presentation times of the payloads are spaced in constant intervals.


Each of the sub-payloads should be treated as an independent payload.


Payload

A Payload is described as follows:

Field name

Field type

Size (bits)

Stream Number

BYTE

8

Media Object Number

BYTE, WORD or DWORD

0, 8, 16, 32

Presentation Time

BYTE, WORD or DWORD

0, 8, 16, 32

Replicated Data Length

BYTE, WORD or DWORD

0, 8, 16, 32

Presentation Time Delta

BYTE

8

Sub-Payload Data

BYTE

varies


The fields are defined as follows:

Stream Number

Specifies the stream number of the stream that this data payload belongs to as well as whether the payload belongs to a media object that is a key frame.

Field name

Field type

Size (bits)

Stream Number and Key Frame Bit

BYTE

8

Stream Number


7 (LSB)

Key Frame Bit


1


Valid values for the low seven bits range from 1 to 127.

Media Object Number

Specifies the number of the media object that the first sub-payload belongs to. The media object number of each subsequent sub-payload is the Media Object Number field plus the sub-payload number. This field shall not be present if the Media Object Number Length Type field of the payload parsing information structure is set to 00. Whenever present, the Media Object Number field can be coded using either a BYTE, WORD or a DWORD. This is specified by the value of the Media Object Number Length Type field. For content created according to this specification, this field is coded using a BYTE.

Presentation Time

Specifies the presentation time, in milliseconds, of the media object that the first sub-payload belongs to. This field must be present; the Offset Into Media Object Length Type field of the payload parsing information structure must not be set to 00. The Presentation Time field can be coded using either a BYTE, WORD or a DWORD. This is specified by the value of the Offset Into Media Object Length Type field. For content created according to this specification, this field is coded using a DWORD.

Note that this field is used to express the
Offset Into Media Object value for non-compressed payloads; however, for compressed payloads it is used to express the Presentation Time value.

Replicated Data Length

Specifies the size, in bytes, of the Replicated Data field. This field must be present; the Replicated Data Length Type field of the payload parsing information structure must not be set to 00. Whenever present, the Replicated Data Length field can be coded using either a BYTE, WORD or a DWORD. This is specified by the value of the Replicated Data Length Type field. For content created according to this specification, this field is coded using a BYTE. The Replicated Data Length field must contain the value 1 or the payload should be interpreted as a normal, non-compressed payload.

Presentation Time Delta

Specifies the presentation time delta, in milliseconds, to be applied to sub-payloads after the first. The presentation time of a media object in a sub-payload shall be interpreted as the Presentation Time field plus the Presentation Time Delta multiplied by the sub-payload number. This value is ignored if there is only one sub-payload.

Sub-Payload Data

Specifies an array containing the sub-payloads. The number of bytes in this array can be calculated from the overall Packet Length field.

Contains one or more sub-payloads, described as follows. Note that the number of sub-payloads is not explicitly specified; the last sub-payload should be detected by the end of the sub-payload data matching the end of the Sub-Payload Data, as indicated by the Payload Data Length field.


Field name

Field type

Size (bits)

Sub-Payload #0 Data Length

BYTE

8

Sub-Payload #0 Data

BYTE

varies

Sub-Payload #1 Data Length

BYTE

8

Sub-Payload #1 Data

BYTE

varies


varies

Each sub-payload should be interpreted as an independent payload, with properties described above.



5.2.3.3 Multiple payloads

Payload data in a Data Packet with multiple payloads has the following structure.


Field name

Field type

Size (bits)

Payload Flags

BYTE

8

Number of Payloads


6 (LSB)

Payload Length Type


2

Payloads

See below



The fields are defined as follows:


Payload Flags

The flags are stored in LSB order.


Number of Payloads (bits 0-5)

Specifies the number of payloads contained in the Payloads field. This field must not contain the value 0.

Payload Length Type (bits 6-7)

Specifies the number of bits used to code the Payload Length field contained in each of the payloads of this packet. The values are defined in the following table.

Value type

Description

01

The Payload Length field is coded using a BYTE.

10

The Payload Length field is coded using a WORD.

11

The Payload Length field is coded using a DWORD.

The value of this field should be set to 10.

Payloads

This field contains an array of payloads. The number of entries in this array is specified by the Number of Payloads field. The Payload is commonly described as follows; however, if the Replicated Data Length field contains a value of 1, the payload should be interpreted as described in section 5.2.3.4:


Field name

Field type

Size (bits)

Stream Number

BYTE

8

Media Object Number

BYTE, WORD or DWORD

0, 8, 16, 32

Offset Into Media Object

BYTE, WORD or DWORD

0, 8, 16, 32

Replicated Data Length

BYTE, WORD or DWORD

0, 8, 16, 32

Replicated Data

BYTE

varies

Payload Length

BYTE, WORD or DWORD

8, 16, 32

Payload Data

BYTE

varies


The Payload fields are defined as follows:

Stream Number

Specifies the stream number of the stream this data payload belongs to as well as whether the payload belongs to a media object that is a key frame.

Field name

Field type

Size (bits)

Stream Number and Key Frame Bit

BYTE

8

Stream Number


7 (LSB)

Key Frame Bit


1


Valid values for the low seven bits range from 1 to 127.

Media Object Number

Specifies the number of the media object this data payload belongs to. This field shall not be present if the Media Object Number Length Type field of the payload parsing information structure is set to 00. Whenever present, the Media Object Number field can be coded using either a BYTE, a WORD, or a DWORD. This is specified by the value of the Media Object Number Length Type field. For content created according to this specification, this field is coded using a BYTE.

Offset Into Media Object

Specifies the byte offset in the media object this data payload belongs to. This field shall not be present if the Offset Into Media Object Length Type field of the payload parsing information structure is set to 00. Whenever present, the Offset Into Media Object field can be coded using either a BYTE, a WORD, or a DWORD. This is specified by the value of the Offset Into Media Object Length Type field. For content created according to this specification, this field is coded using a DWORD.

Replicated Data Length

Specifies the size, in bytes, of the Replicated Data field. This field shall not be present if the Replicated Data Length Type field of the payload parsing information structure is set to 00. Whenever present, the Replicated Data Length field can be coded using either a BYTE, a WORD, or a DWORD. This is specified by the value of the Replicated Data Length Type field. For content created according to this specification, this field is coded using a BYTE. If the value of this field is set to 1, the payload should be interpreted as a compressed payload, as described in section 5.2.3.4. Otherwise, valid values are 0 or values greater than or equal to 8.

Replicated Data

Specifies an array of replicated data. The number of bytes in this array is specified by the Replicated Data Length field. This data will be identical in value for all payloads for the same Media Object. Whenever present, this data always starts with a DWORD that contains the size, in bytes, of the Media Object this payload belongs to, immediately followed by a DWORD that contains the presentation time, in milliseconds, of the Media Object this payload belongs to. Following those two DWORDs is optional extension data for digital media samples. For details on how to use this data, see section 7.3.1.

Payload Length

Specifies the number of bytes in the Payload Data array. The value of this field must not be 0. The Payload Length field can be coded using either a BYTE, a WORD, or a DWORD. This is specified by the value of the Payload Length Type field. For content created according to this specification, this field is coded using a WORD.

Payload Data

Specifies an array containing the actual data for the payload.



5.2.3.4 Multiple payloads, compressed payload data

The following describes the structure of a compressed payload in a multiple payload packet, as determined when the Replicated Data Length field of a payload has a value of 1. A compressed payload contains one or more sub-payloads.


Compressed payloads can allow some space in the data packets to be saved. They can be used to represent a group of payloads only when all of the following conditions are met:

  1. All payloads are for the same stream.

  2. None of the payloads needs to be marked as a key frame.

  3. Each payload represents an entire media object (rather than a fragment thereof).

  4. No payload has more than 256 bytes of data.

  5. No payload has more than the standard 8 bytes of replicated data.

  6. The values of the Media Object Number field in the Paylod Data stuctures of the payloads are consecutive.

  7. The presentation times of the payloads are spaced in constant intervals.


Each of the sub-payloads should be treated as an independent payload.



Field Name

Field Type

Size (bits)

Payload Flags

BYTE

8

Number of Payloads


6 (LSB)

Payload Length Type


2

Compressed Payloads

See below



The fields are defined as follows:


Payload Flags

The flags are stored in LSB order.


Number of Payloads (bits 0-5)

Specifies the number of payloads contained in the Payloads field. This field must not contain the value 0.

Payload Length Type (bits 6-7)

Specifies the number of bits used to code the Payload Length field contained in each of the payloads of this packet. The values are defined in the following table.

Value type

Description

01

The Payload Length field is coded using a BYTE.

10

The Payload Length field is coded using a WORD.

11

The Payload Length field is coded using a DWORD.

The value of this field should be set to 10.

Compressed Payloads


Field name

Field type

Size (bits)

Stream Number

BYTE

8

Media Object Number

BYTE, WORD or DWORD

0, 8, 16, 32

Presentation Time

BYTE, WORD or DWORD

0, 8, 16, 32

Replicated Data Length

BYTE, WORD or DWORD

0, 8, 16, 32

Presentation Time Delta

BYTE

8

Payload Length

BYTE, WORD or DWORD

8, 16, 32

Sub-Payload Data

BYTE

varies


The fields are defined as follows:

Stream Number

Specifies the stream number of the stream this data payload belongs to as well as whether the payload belongs to a media object that is a key frame.

Field name

Field type

Size (bits)

Stream Number and Key frame Bit

BYTE

8

Stream Number


7 (LSB)

Key frame Bit


1


Valid values for the low seven bits range from 1 to 127.

Media Object Number

Specifies the number of the media object that the first sub-payload belongs to. The media object number of each subsequent sub-payload is the Media Object Number field plus the sub-payload number. This field shall not be present if the Media Object Number Length Type field of the payload parsing information structure is set to 00. Whenever present, the Media Object Number field can be coded using either a BYTE, WORD or a DWORD. This is specified by the value of the Media Object Number Length Type field. For content created according to this specification, this field is coded using a BYTE.

Presentation Time

Specifies the presentation time, in milliseconds, of the media object that the first sub-payload belongs to. This field must be present; the Offset Into Media Object Length Type field of the payload parsing information structure must not be set to 00. The Presentation Time field can be coded using either a BYTE, WORD or a DWORD. This is specified by the value of the Offset Into Media Object Length Type field. For content created according to this specification, this field is coded using a DWORD.

Note that this field is used to express the Offset Into Media Object value for non-compressed payloads; however, for compressed payloads it is used to express the Presentation Time value.

Replicated Data Length

Specifies the size, in bytes, of the Replicated Data field. This field must be present; the Replicated Data Length Type field of the payload parsing information structure must not be set to 00. Whenever present, the Replicated Data Length field can be coded using either a BYTE, WORD or a DWORD. This is specified by the value of the Replicated Data Length Type field. For content created according to this specification, this field is coded using a BYTE. The Replicated Data Length field must contain the value 1, or else the payload should be interpreted as a normal, non-compressed payload.

Presentation Time Delta

Specifies the presentation time delta, in milliseconds, to be applied to sub-payloads after the first. The presentation time of a media object in a sub-payload shall be interpreted as the Presentation Time field plus the Presentation Time Delta multiplied by the sub-payload number. This value is ignored if there is only one sub-payload.

Payload Length

Specifies the number of bytes in the Sub-Payload Data array. The value of this field must not be 0. The Payload Length field can be coded using either a BYTE, a WORD, or a DWORD. This is specified by the value of the Payload Length Type field. For content created according to this specification, this field is coded using a WORD.



Sub-Payload Data

Specifies an array containing the sub-payloads.

Contains one or more sub-payloads, described as follows. Note that the number of sub-payloads is not explicitly specified; the last sub-payload should be detected by the end of the sub-payload data matching the end of the Sub-Payload Data, as indicated by the Payload Length field.


Field name

Field type

Size (bits)

Sub-Payload #0 Data Length

BYTE

8

Sub-Payload #0 Data

BYTE

varies

Sub-Payload #1 Data Length

BYTE

8

Sub-Payload #1 Data

BYTE

varies


varies

Each sub-payload should be interpreted as an independent payload, with properties described above.



5.2.4 Padding data

Following the payload data, an ASF Data Packet may contain padding data. Padding data in a Data Packet has the following structure.


Field name

Field type

Size (bits)

Padding Data

BYTE

varies


The fields are defined as follows:


Padding Data

Specifies an array of bytes containing padding data. The size of this array is specified by the Padding Length field, when present in the payload parsing information structure. If the Padding Length field is not present, the Padding Data array is empty. When present, these bytes should be set to 0.