4. Objects in the ASF Header Extension Object

This section describes objects that, if present, must be embedded in the Header Extension Object as described in section 2.3. Custom ASF objects with user-defined meanings can be added to the Header Extension Object in addition to the objects in this list, but there is no guarantee of interoperability between implementations for those objects.

Note that objects defined in section 3 may appear in the Header Extension Object, so reading implementations should be able to understand those objects from within this object as well. However, a writing implementation should not, in general, place objects from section 3 into the Header Extension Object, except when it wants to hide these objects from earlier reading implementations. For a discussion of when this is appropriate, see section 8.2.1.


4.1 Extended Stream Properties Object (optional, 1 per media stream)

The Extended Stream Properties Object defines additional optional properties and characteristics of a digital media stream that are not described in the Stream Properties Object.

Typically, the basic Stream Properties Object is present in the Header Object, and the Extended Stream Properties Object is present in the Header Extension Object. Sometimes, however, the Stream Properties Object for a stream may be embedded inside the Extended Stream Properties Object for that stream. This approach facilitates the creation of backward-compatible content and is appropriate for some of the scenarios discussed in section 8.

This object has an optional provision to include application-specific or implementation-specific data attached to the payloads of each digital media sample stored within a Data Packet. This data can be looked at as digital media sample properties and is stored in the Replicated Data field of a payload header. The Payload Extension Systems fields of the Extended Stream Properties Object describes what this data is and is necessary for that data to be parsed, if present.

The Extended Stream Properties Object is represented using the following structure.

Field name

Field type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

Start Time

QWORD

64

End Time

QWORD

64

Data Bitrate

DWORD

32

Buffer Size

DWORD

32

Initial Buffer Fullness

DWORD

32

Alternate Data Bitrate

DWORD

32

Alternate Buffer Size

DWORD

32

Alternate Initial Buffer Fullness

DWORD

32

Maximum Object Size

DWORD

32

Flags

DWORD

32

Reliable Flag


1 (LSB)

Seekable Flag


1

No Cleanpoints Flag


1

Resend Live Cleanpoints Flag


1

Reserved Flags


28

Stream Number

WORD

16

Stream Language ID Index

WORD

16

Average Time Per Frame

QWORD

64

Stream Name Count

WORD

16

Payload Extension System Count

WORD

16

Stream Names

See below

varies

Payload Extension Systems

See below

varies

Stream Properties Object

See below

varies

The fields are defined as follows:

Object ID

Specifies the GUID for the Extended Stream Properties Object. The value of this field shall be set to ASF_Extended_Stream_Properties_Object.

Object Size

Specifies the size, in bytes, of the Extended Stream Properties Object. Valid values are at least 88 bytes. If there is a Stream Properties Object embedded in this object, then the size of the Stream Properties Object must be included in this value.

Start Time

Specifies the presentation time of the first object, indicating where this digital media stream starts within the context of the timeline of the ASF file as a whole. This time value corresponds to presentation times as they appear in the data packets (adjusted by the preroll). This field is given in units of milliseconds and can optionally be set to 0, in which case it will be ignored.

End Time

Specifies the presentation time of the last object plus the duration of play, indicating where this digital media stream ends within the context of the timeline of the ASF file as a whole. This time value corresponds to presentation times as they appear in the data packets (adjusted by the preroll). This field is given in units of milliseconds and can optionally be set to 0, in which case it will be ignored.

Data Bitrate

Specifies the leak rate R, in bits per second, of a leaky bucket that contains the data portion of the stream without overflowing, excluding all ASF Data Packet overhead. The size of the leaky bucket is specified by the value of the Buffer Size field. This field must be non-zero. For more information about leaky buckets, see section 7.1.

Buffer Size

Specifies the size B, in milliseconds, of the leaky bucket used in the Data Bitrate definition.

Initial Buffer Fullness

Specifies the initial fullness, in milliseconds, of the leaky bucket used in the Data Bitrate definition. This is the fullness of the buffer at the instant before the first bit in the stream is dumped into the bucket. Typically, this value is set to 0. This value shall not exceed the value in the Buffer Size field.

Alternate Data Bitrate

Specifies the leak rate RAlt, in bits per second, of a leaky bucket that contains the data portion of the stream without overflowing, excluding all ASF Data Packet overhead. The size of the leaky bucket is specified by the value of the Alternate Buffer Size field. This value is relevant in most scenarios where the bit rate is not exactly constant, but it is especially useful for streams that have highly variable bit rates. This field can optionally be set to the same value as the Data Bitrate field.

Alternate Buffer Size

Specifies the size BAlt, in milliseconds, of the leaky bucket used in the Alternate Data Bitrate definition. This value is relevant in most scenarios where the bit rate is not exactly constant, but it is especially useful for streams that have highly variable bit rates. This field can optionally be set to the same value as the Buffer Size field.

Alternate Initial Buffer Fullness

Specifies the initial fullness, in milliseconds, of the leaky bucket used in the Alternate Data Bitrate definition. This is the fullness of the buffer at the instant before the first bit in the stream is dumped into the bucket. Typically, this value is set to 0. This value shall not exceed the value of the Alternate Buffer Size field.

Maximum Object Size

Specifies the maximum size of the largest sample stored in the data packets for a stream. A value of 0 means “unknown”.

Flags

The flags are stored in LSB order.

Reliable Flag

Specifies, if set, that this digital media stream, if sent over a network, must be carried over a reliable data communications transport mechanism. This should be set for streams that cannot recover after a lost media object.

Seekable Flag

This flag should be set only if the stream is seekable, either by using an index object or by estimating according to bit rate (as can sometimes be done with audio). This flag pertains to this stream only rather than to the entire file.

No Cleanpoint Flag

Specifies, if set, that the stream does not contain any cleanpoints. A cleanpoint is any point at which playback could begin without having seen the previous media objects. For streams that use key frames, the key frames would be the cleanpoints.

Resend Live Cleanpoints Flag

Specifies, if set, that when a stream is joined in mid-transmission, all information from the most recent cleanpoint up to the current time should be sent before normal streaming begins at the current time. The default behavior (when this flag is not set) is to send only the data starting at the current time. This flag should only be set for streams that are coming from a “live” source.

Reserved Flags

Specifies reserved flags. Shall be set to 0.

AverageTime Per Frame

Specifies the average time duration, measured in 100-nanosecond units, of each frame. This number should be rounded to the nearest integer. This field can optionally be set to 0 if the average time per frame is unknown or unimportant. It is recommended that this field be set for video.

Stream Number

Specifies the number of this stream. 0 is an invalid stream number (that is, other Header Objects use stream number 0 to refer to the entire file as a whole rather than to a specific media stream within the file). Valid values are between 1 and 127.

Stream Language ID Index

Specifies the language, if any, which the content of the stream uses or assumes. Refer to the Language List Object description for the details concerning how the Stream Language ID Index and Language ID Index fields should be used. Note that this is an index into the languages listed in the Language List Object rather than a language identifier.

Stream Name Count

Specifies how many Stream Names are present. Each stream name instance is potentially localized into a specific language. The Language ID Index field indicates the language in which the Stream Name has been written in Unicode characters. This shall be set to 0 if there are no Stream Names, in which case the Stream Names field should be omitted.

Payload Extension System Count

Specifies how many Payload Extension Systems there are for this stream. This shall be set to 0 if there are no Payload Extension Systems, in which case the Payload Extension Systems field should be omitted.

Stream Names

The structure of each Stream Name entry is shown in the following table.

Field name

Field type

Size (bits)

Language ID Index

WORD

16

Stream Name Length

WORD

16

Stream Name

WCHAR

varies


where the Stream Name Length field indicates the number of valid bytes that are found within the Stream Name field.

Payload Extension Systems

Payload extensions provide a way for content creators to specify kinds of data that will appear in the payload header for every payload from this stream. This system is used when stream properties must be conveyed at the media object level. The Replicated Data bytes in the payload header will contain these properties in the order in which the Payload Extension Systems appear in this object. A Payload Extension System must appear in the Extended Stream Properties Object for each type of per-media-object properties that will appear with the payloads for this stream. For more information, see section 7.3.

Payload extension systems are described in the following table.

Field name

Field type

Size (bits)

Extension System ID

GUID

128

Extension Data Size

WORD

16

Extension System Info Length

DWORD

32

Extension System Info

BYTE

varies


The fields are defined as follows:

Extension System ID

Specifies a unique identifier for the extension system. Five standard GUIDs are defined in section 10.13, although custom extension system types can be defined as well.

Extension Data Size

Specifies the fixed size of the extension data for this system that will appear in the replicated data alongside every payload for this stream. If this extension system uses variable-size data, then this should be set to 0xffff. Note, however, that replicated data length is limited to 255 bytes, which limits the total size of all extension systems for a particular stream.

Extension System Info Length

Specifies the length of the Extension System Info field. This field shall be set to 0 if there is no value in the Extension System Info field.

Extension System Info

Specifies additional information to describe this extension system (optional).

Stream Properties Object

Specifies an optional Stream Properties Object. For more information, see the beginning of this section.


4.2 Advanced Mutual Exclusion Object (optional, 0 to many)

The Advanced Mutual Exclusion Object identifies streams that have a mutual exclusion relationship to each other (in other words, only one of the streams within such a relationship can be streamed—the rest are ignored). There should be one instance of this object for each set of objects that contain a mutual exclusion relationship. The exclusion type is used so that implementations can allow user selection of common choices, such as language. This object must be used if any of the streams in the mutual exclusion relationship are hidden according to the manner described in section 8.2.2. For more details about scenarios in which you should use this object, see section 8.2.


The Advanced Mutual Exclusion Object is represented using the following structure.


Field name

Field type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

Exclusion Type

GUID

128

Stream Numbers Count

WORD

16

Stream Numbers

WORD

varies


The fields are defined as follows:

Object ID

Specifies the GUID for the Advanced Mutual Exclusion Object. The value of this field shall be set to ASF_Advanced_Mutual_Exclusion_Object.

Object Size

Specifies the size, in bytes, of the Advanced Mutual Exclusion Object. Valid values are at least 42 bytes.

Exclusion Type

Specifies the nature of the mutual exclusion relationship. Use one of the GUIDs defined in section 10.11.

Stream Numbers Count

Specifies the number of streams listed in the Stream Numbers field. This value should be at least 2.

Stream Numbers

Specifies the list of mutually exclusive stream numbers. Valid values are between 1 and 127.


4.3 Group Mutual Exclusion Object (optional, 0 to many)

The Group Mutual Exclusion Object is used to describe mutual exclusion relationships between groups of streams. This object is organized in terms of “records,” each containing one or more streams, where a stream in record N cannot coexist with a stream in record M for N != M (however, streams in the same record can coexist). This mutual exclusion object would be used typically for the purpose of language mutual exclusion, and a record would consist of all streams for a particular language.


The Group Mutual Exclusion Object is represented using the following structure.


Field name

Field type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

Exclusion Type

GUID

128

Record Count

WORD

16

Records

See below

varies


The fields are defined as follows:

Object ID

Specifies the GUID for the Group Mutual Exclusion Object. The value of this field shall be set to ASF_Group_Mutual_Exclusion_Object.

Object Size

Specifies the size, in bytes, of the Group Mutual Exclusion Object. Valid values are at least 42 bytes.

Exclusion Type

Specifies the nature of the mutual exclusion relationship. Use one of the GUIDs defined in section 10.11.

Record Count

Specifies the number of entries in the Records list. This value should be at least 2.

Records

The structure of each Record entry is shown in the following table.

Field name

Field type

Size (bits)

Stream Count

WORD

16

Stream Numbers

WORD

varies

The fields are defined as follows:

Stream Count

Specifies the number of streams in this record. Must be at least 1.

Stream Numbers

Specifies the stream numbers for this record. Valid values are between 1 and 127.


For an example regarding the use of the Group Mutual Exclusion Object, see section 7.2.


4.4 Stream Prioritization Object (optional, 0 or 1)

The Stream Prioritization Object indicates the author’s intentions as to which streams should or should not be dropped in response to varying network congestion situations. There may be special cases where this preferential order may be ignored (for example, the user hits the “mute” button). Generally it is expected that implementations will try to honor the author’s preference.


The priority of each stream is indicated by how early in the list that stream’s stream number is listed (in other words, the list is ordered in terms of decreasing priority).

The Mandatory flag field shall be set if the author wants that stream kept “regardless”. If this flag is not set, then that indicates that the stream should be dropped in response to network congestion situations. Non-mandatory streams must never be assigned a higher priority than mandatory streams.

The Stream Prioritization Object is represented using the following structure.


Field name

Field type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

Priority Records Count

WORD

16

Priority Records

See below

varies


The fields are defined as follows:

Object ID

Specifies the GUID for the Stream Prioritization Object. The value of this field shall be set to ASF_Stream_Prioritization_Object.

Object Size

Specifies the size, in bytes, of the Stream Prioritization Object. Valid values are at least 26 bytes.

Priority Records Count

Specifies the number of entries in the Priority Records list. This value should be at least 2.

Priority Records

Priority Records are listed in order of decreasing priority. The structure of each Priority Record entry is shown in the following table.

Field name

Field type

Size (bits)

Stream Number

WORD

16

Priority Flags

WORD

16

Mandatory Flag


1 (LSB)

Reserved Flags


15


The fields are defined as follows:

Stream Number

Specifies the stream number. Valid values are between 1 and 127.

Mandatory flag

Specifies, if set, that the stream is mandatory.

Reserved flags

Specifies reserved flags. Shall be set to 0.


For an example using the Stream Prioritization Object, see section 7.2.


4.5 Bandwidth Sharing Object (optional, 0 to many)

The Bandwidth Sharing Object indicates streams that share bandwidth in such a way that the maximum bandwidth of the set of streams is less than the sum of the maximum bandwidths of the individual streams. There should be one instance of this object for each set of objects that share bandwidth. Whether or not this object can be used meaningfully is content-dependent.


The Bandwidth Sharing Object is represented using the following structure.


Field name

Field type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

Sharing Type

GUID

128

Data Bitrate

DWORD

32

Buffer Size

DWORD

32

Stream Numbers Count

WORD

16

Stream Numbers

WORD

varies


The fields are defined as follows:

Object ID

Specifies the GUID for the Bandwidth Sharing Object. The value of this field shall be set to ASF_Bandwidth_Sharing_Object.

Object Size

Specifies the size, in bytes, of the Bandwidth Sharing Object. Valid values are at least 50 bytes.

Sharing Type

Specifies the type of sharing relationship for this object. Two types are predefined: ASF_Bandwidth_Sharing_Partial, in which any number of the streams in the relationship may be streaming data at any given time; and ASF_Bandwidth_Sharing_Exclusive, in which only one of the streams in the relationship may be streaming data at any given time. For these GUID values, see section 10.12.

Data Bitrate

Specifies the leak rate R, in bits per second, of a leaky bucket that contains the data portion of all of the streams, excluding all ASF Data Packet overhead, without overflowing. The size of the leaky bucket is specified by the value of the Buffer Size field. This value can be less than the sum of all of the data bit rates in the Extended Stream Properties Objects for the streams contained in this bandwidth-sharing relationship. For more information about leaky buckets, see section 7.1.

Buffer Size

Specifies the size B, in bits, of the leaky bucket used in the Data Bitrate definition. This value can be less than the sum of all of the buffer sizes in the Extended Stream Properties Objects for the streams contained in this bandwidth-sharing relationship.

Stream Numbers Count

Specifies the number of entries in the Stream Numbers list. This value should be at least 2.

Stream Numbers

Specifies the list of digital media stream numbers in a bandwidth sharing relationship. Valid values are between 1 and 127.

4.6 Language List Object (optional, only 1)

The Language List Object contains an array of Unicode-based language IDs. All other header objects refer to languages through zero-based positions in this array.


The Language List Object is represented using the following structure.


Field name

Field type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

Language ID Records Count

WORD

16

Language ID Records

See below

varies


The fields are defined as follows:

Object ID

Specifies the GUID for the Language List Object. The value of this field shall be set to ASF_Language_List_Object.

Object Size

Specifies the size, in bytes, of the Language List Object. Valid values are at least 26 bytes.

Language ID Records Count

Specifies the number of entries in the Language ID Records list.

Language ID Records

The structure of each Language ID Record entry is shown in the following table.

Field Name

Field Type

Size (bits)

Language ID Length

BYTE

8

Language ID

WCHAR

varies


The fields are defined as follows:

Language ID Length

Specifies the size, in bytes, of the Language ID field.

Language ID

Specifies the Language ID string, identifying a language supported in the file. It is strongly recommended that the strings stored in the Language List Object be compliant with RFC-1766 for specifying languages.


Note that other objects refer to the Language List Object by means of their own Language List ID Index fields. The value in the Language ID Index field explicitly provides an index into the Language ID Records structure in order to identify a specific language. The first entry into this structure has an index value of 0 (zero). Index values that are greater than the number of entries within the Language ID Records structure are interpreted as signifying the default language for the system (on the Windows operating system, this would correspond to the LCID returned by IMultiLanguage->GetRfc1766FromLcid(GetUserDefaultLCID() ).


The first entry (entry 0) in the Language List Object is the default language, and systems should exhibit a preference for that language when no other has been explicitly specified. Language applies both to objects that specify a language and to objects that do not have a provision for specifying language.


4.7 Metadata Object (optional, 0 or 1)

The Metadata Object permits authors to store stream-based metadata in a file.


This object supports the same types of metadata information as the Extended Content Description Object except that it also allows a stream number to be specified. For more information about what types of attributes belong in the Metadata Object, see section 7.4.


The Metadata Object is represented using the following structure.


Field name

Field type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

Description Records Count

WORD

16

Description Records

See below

varies


The fields are defined as follows:

Object ID

Specifies the GUID for the Metadata Object. The value of this field shall be set to ASF_Metadata_Object.

Object Size

Specifies the size, in bytes, of the Metadata Object. Valid values are larger than 26 bytes.

Description Records Count

Specifies the number of entries in the Description Records list.

Description Records

The structure of each Description Record entry is shown in the following table.

Field name

Field type

Size (bits)

Reserved (Must Be Zero)

WORD

16

Stream Number

WORD

16

Name Length

WORD

16

Data Type

WORD

16

Data Length

DWORD

32

Name

WCHAR

varies

Data

See below



The fields are defined as follows:

Reserved (Must Be Zero)

This field must contain the value 0.

Stream Number

Specifies whether the entry applies to a specific digital media stream or whether it applies to the whole file. A value of 0 in this field indicates that it applies to the whole file; otherwise, the entry applies only to the indicated stream number and must be between 1 and 127.

Name Length

Specifies the number of valid bytes stored in the Name field. Valid values are even numbers.

Data Type

Specifies the type of information being stored. The following values are recognized.

Value type

Description

0x0000

Unicode string. The data consists of a sequence of Unicode characters.

0x0001

BYTE array. The type of data is implementation-specific.

0x0002

BOOL. The data is 2 bytes long and should be interpreted as a 16-bit unsigned integer. Only 0x0000 or 0x0001 are permitted values.

0x0003

DWORD. The data is 4 bytes long and should be interpreted as a 32-bit unsigned integer.

0x0004

QWORD. The data is 8 bytes long and should be interpreted as a 64-bit unsigned integer.

0x0005

WORD. The data is 2 bytes long and should be interpreted as a 16-bit unsigned integer.

Data Length

Specifies the length in bytes of the Data field. Valid values are less than 65536.

Name

Specifies the name that uniquely identifies the attribute being described. Names are case-sensitive.

Data

Specifies the actual metadata being stored. The Data field should be interpreted according to the value stored in the Data Type field.


4.8 Metadata Library Object (optional, 0 or 1)

The Metadata Library Object lets authors store stream-based, language-attributed, multiply defined, and large metadata attributes in a file.


This object supports the same types of metadata as the Metadata Object, as well as attributes with language IDs, attributes that are defined more than once, large attributes, and attributes with the GUID data type For more information about what types of attributes belong in the Metadata Library Object, see section 7.4.


The ASF Metadata Library Object is represented using the following structure.


Field name

Field type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

Description Records Count

WORD

16

Description Records

See below

varies


The fields are defined as follows:

Object ID

Specifies the GUID for the Metadata Library Object. The value of this field shall be set to ASF_Metadata_Library_Object.

Object Size

Specifies the size, in bytes, of the Metadata Library Object. Valid values are at least 26 bytes.

Description Records Count

Specifies the number of entries in the Description Records list.

Description Records

The structure of each Description Record entry is shown in the following table.

Field name

Field type

Size (bits)

Language List Index

WORD

16

Stream Number

WORD

16

Name Length

WORD

16

Data Type

WORD

16

Data Length

DWORD

32

Name

WCHAR

varies

Data

See below

varies


The fields are defined as follows:

Language List Index

Specifies the index into the Language List Object that identifies the language of this attribute. If there is no Language List Object present, this field must be zero.

Stream Number

Specifies whether the entry applies to a specific digital media stream or whether it applies to the whole file. A value of 0 in this field indicates that it applies to the whole file; otherwise, the entry applies only to the indicated stream number. Valid values are between 1 and 127.

Name Length

Specifies the number of valid bytes stored in the Name field. Valid values are even numbers.

Data Type

Specifies the type of information being stored. The following values are recognized.

Value type

Description

0x0000

Unicode string. The data consists of a sequence of Unicode characters.

0x0001

BYTE array. The type of the data is implementation-specific.

0x0002

BOOL. The data is 2 bytes long and should be interpreted as a 16-bit unsigned integer. Only 0x0000 or 0x0001 are permitted values.

0x0003

DWORD. The data is 4 bytes long and should be interpreted as a 32-bit unsigned integer.

0x0004

QWORD. The data is 8 bytes long and should be interpreted as a 64-bit unsigned integer.

0x0005

WORD. The data is 2 bytes long and should be interpreted as a 16-bit unsigned integer.

0x0006

GUID. The data is 16 bytes long and should be interpreted as a 128-bit GUID.

Data Length

Specifies the length, in bytes, of the Data field.

Name

Specifies the name that identifies the attribute being described.

Data

Specifies the actual metadata being stored. The Data field should be interpreted according to the value stored in the Data Type field.


4.9 Index Parameters Object (mandatory only if the Index Object is present in file, 0 or 1)

The Index Parameters Object supplies information about those streams that are actually indexed (there must be at least one stream in an index) by the Index Object and how they are being indexed. This object shall be present in the Header Object if there is an Index Object present in the file.


An Index Specifier is required for each stream that will be indexed by the Index Object. These specifiers must exactly match those in the Index Object.


The Index Parameters Object is represented using the following structure.


Field name

Field type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

Index Entry Time Interval

DWORD

32

Index Specifiers Count

WORD

16

Index Specifiers

See below

varies


The fields are defined as follows:

Object ID

Specifies the GUID for the Index Parameters Object. The value of this field shall be set to ASF_Index_Parameters_Object.

Object Size

Specifies the size, in bytes, of the Index Parameters Object. Valid values are at least 34 bytes.

Index Entry Time Interval

Specifies the time interval between index entries in milliseconds. This value cannot be 0.

Index Specifiers Count

Specifies the number of entries in the Index Specifiers list. Valid values are 1 and greater.

Index Specifiers

Index Specifiers are defined as follows:

Field name

Field type

Size (bits)

Stream Number

WORD

16

Index Type

WORD

16


The fields are defined as follows:

Stream Number

Specifies the stream number that the Index Specifiers refer to. Valid values are between 1 and 127.

Index Type

Specifies the type of index. Values are as follows: 1 = Nearest Past Data Packet, 2 = Nearest Past Media Object, and 3 = Nearest Past Cleanpoint. The Nearest Past Data Packet indexes point to the data packet whose presentation time is closest to the index entry time. The Nearest Past Object indexes point to the closest data packet containing an entire object or first fragment of an object. The Nearest Past Cleanpoint indexes point to the closest data packet containing an entire object (or first fragment of an object) that has the Cleanpoint Flag set. Nearest Past Cleanpoint is the most common type of index.


4.10 Media Object Index Parameters Object (mandatory only if media object index is present in file, 0 or 1)

The Media Object Index Parameters Object supplies information about those streams that actually indexed (there must be at least one stream in an index) by media objects. This object shall be present in the Header Object if there is a Media Object Index Object present in the file.


An Index Specifier is required for each stream that will be indexed by the Media Object Index Object. These specifiers must exactly match those in the Media Object Index Object.


The Media Object Index Parameters Object is represented using the following structure.


Field Name

Field Type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

Index Entry Count Interval

DWORD

32

Index Specifiers Count

WORD

16

Index Specifiers

See below

varies


The fields are defined as follows:

Object ID

Specifies the GUID for the Media Object Index Parameters Object. The value of this field shall be set to ASF_Media_Object_Index_Parameters_Object.

Object Size

Specifies the size, in bytes, of the Media Object Index Parameters Object. Valid values are at least 34 bytes.

Index Entry Count Interval

Specifies the interval between each index entry by the number of media objects. This value cannot be 0.

Index Specifiers Count

Specifies the number of entries in the Index Specifiers list. Valid values are 1 and greater.

Index Specifiers

The structure of each Index Specifier entry is shown in the following table.

Field name

Field type

Size (bits)

Stream Number

WORD

16

Index Type

WORD

16


The fields are defined as follows:

Stream Number

Specifies the stream number that the Index Specifiers refer to. Valid values are between 1 and 127.

Index Type

Specifies the type of index. Values are defined as follows: 1 = Nearest Past Data Packet, 2 = Nearest Past Media Object, 3 = Nearest Past Cleanpoint, 0xff = Frame Number Offset. For a video stream, the Nearest Past Media Object and Nearest Past Data Packet indexes point to the closest data packet containing an entire video frame or first fragment of a video frame; Nearest Past Cleanpoint indexes point to the closest data packet containing an entire video frame (or first fragment of a video frame) that is a key frame; and Frame Number Offset indicates how many more frames need to be read for the given stream, starting with the first frame in the packet pointed to by the index entry, in order to get to the requested frame. Nearest Past Media Object is the most common value. Because ASF payloads do not contain the full frame number, there is often a Frame Number Offset index alongside one of the other types of indexes to allow the user to identify the exact frame being seeked to.

4.11 Timecode Index Parameters Object (mandatory only if TIMECODE index is present in file, 0 or 1)

The Timecode Index Parameters Object supplies information about those streams that are actually indexed (there must be at least one stream in an index) by timecodes. All streams referred to in the Timecode Index Parameters Object must have timecode Payload Extension Systems associated with them in the Extended Stream Properties Object (for more details, see section 7.30). This object shall be present in the Header Object if there is a Timecode Index Object present in the file.


An Index Specifier is required for each stream that will be indexed by the Timecode Index Object. These specifiers must exactly match those in the Timecode Index Object.


The Timecode Index Parameters Object is represented using the following structure.


Field name

Field type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

Index Entry Count Interval

DWORD

32

Index Specifiers Count

WORD

16

Index Specifiers

See below

varies


The fields are defined as follows:

Object ID

Specifies the GUID for the Timecode Index Parameters Object. The value of this field shall be set to ASF_Timecode_Index_Parameters_Object.

Object Size

Specifies the size, in bytes, of the Timecode Index Parameters Object. Valid values are at least 34 bytes.

Index Entry Count Interval

This value is ignored for the Timecode Index Parameters Object.

Index Specifiers Count

Specifies the number of entries in the Index Specifiers list. Valid values are 1 and greater.

Index Specifiers

The structure of each Index Specifier entry is shown in the following table.

Field name

Field type

Size (bits)

Stream Number

WORD

16

Index Type

WORD

16


The fields are defined as follows:

Stream Number

Specifies the stream number that the Index Specifiers refer to. Valid values are between 1 and 127.

Index Type

Specifies the type of index. Values are defined as follows: 2 = Nearest Past Media Object, 3 = Nearest Past Cleanpoint (1 is not a valid value). For a video stream, The Nearest Past Media Object indexes point to the closest data packet containing an entire video frame or the first fragment of a video frame, and the Nearest Past Cleanpoint indexes point to the closest data packet containing an entire video frame (or first fragment of a video frame) that is a key frame. Nearest Past Media Object is the most common value.


4.12 Compatibility Object (optional, only 1)

The Compatibility Object is reserved for future use. It is represented using the following structure.

Field Name

Field Type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

Profile

BYTE

8

Mode

BYTE

8


Object ID

Specifies the GUID for the Compatibility Object. The value of this field shall be set to ASF_Compatibility_Object.

Object Size

Specifies the size, in bytes, of the Compatibility Object. Valid values are at least 28 bytes.

Profile

This field is reserved and should be set to 2.

Mode

This field is reserved and should be set to 1.


4.13 Advanced Content Encryption Object (optional, 0 or 1)

The Advanced Content Encryption Object lets authors protect content by using Next Generation Windows Media Digital Rights Management for Network Devices. It is represented using the following structure.


Field Name

Field Type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

Content Encryption Records Count

WORD

16

Content Encryption Records

See Text

Varies


Object ID

Specifies the GUID for the Advanced Content Encryption Object. This field shall be set to ASF_Advanced_Content_Encryption_Object.

Object Size

Specifies the size of the Advanced Content Encryption Object. This includes the sum of 26 bytes plus the length of the content encryption records.

Content Encryption Records Count

Specifies the number of content encryption records that are contained in this object.

Content Encryption Records

Content Encryption Records are described as follows:

Field Name

Field Type

Size (bits)

System ID

GUID

128

System Version

DWORD

32

Encrypted Object Record Count

WORD

16

Encrypted Object Records

See text

varies

Data Size

DWORD

32

Data

BYTE

varies

System ID

Specifies the unique identifier for the content encryption system. The possible GUIDs are defined in section 10.6.

System Version

Specifies the version of the content encryption system.

Encrypted Object Record Count

Specifies the number of encrypted object records that follow.

Encrypted Object Records

Encrypted Object Records indicate what objects (for example, streams) in the ASF file a particular Content Encryption Record is associated with. Encrypted Object Records are described as follows:


Field Name

Field Type

Size (bits)

Encrypted Object ID Type

WORD

16

Encrypted Object ID Length

WORD

16

Encrypted Object ID

See Text

Varies

Encrypted Object ID Type

Specifies the type of data stored in the Encrypted Object ID field. The following values are recognized.

Value type

Description

0x0001

WORD. This value indicates that the Encrypted Object ID is an ASF stream number. The Object ID Length should be set to 0x0002 when this value type is set.


Encrypted Object ID Length

Specifies the size, in bytes, of the Encrypted Object ID field.

Encrypted Object ID

Specifies the ID of the encrypted object. The length of this field is determined by the value of the Encrypted Object ID Length field. When the Encrypted Object ID Type is set to 0x0001, this field specifies the ASF stream number that the Content Encryption Record is associated with. A value of 0 in this field indicates that it applies to the whole file; otherwise, the entry applies only to the indicated stream number.

Data Size

Specifies the size, in bytes, of the Data field.

Data

The content protection data for this Content Encryption Record.