IWMHeaderInfo interface

The IWMHeaderInfo interface sets and retrieves information in the header section of an ASF file. You can manipulate three types of header information by using the methods of this interface: metadata attributes, markers, and script commands.

Metadata attributes are name/value pairs that describe or relate to the contents of the file. Typical metadata attributes contain information about the artist, title, and performance details of the content. The Windows Media Format SDK includes a large selection of predefined metadata attributes that you can use in your files. See Attributes for a complete listing of predefined attributes. Additionally, you can create your own attributes.

The methods of IWMHeaderInfo that deal with metadata are somewhat limited. They cannot be used to create or access attributes containing more than 64 kilobytes of data. They are also limited to simple data types. Much more robust metadata support is provided through the IWMHeaderInfo3 interface, which should be used for all new files.

Markers enable you to name specific locations in the file for easy access. Typically, markers are used to create a table of contents for a file, such as a list of scenes in a video file.

Script commands are name/value pairs containing information that your reading application will respond to programmatically. There are no script commands that are directly supported by the reader or the synchronous reader, but there are a few standard script commands supported by Windows Media Player. For more information about script commands, see the Using Script Commands section of this documentation.

The IWMHeaderInfo interface is implemented by the metadata editor object, the writer object, the reader object, and the synchronous reader object. To obtain a pointer to an instance, call the QueryInterface method of any other interface in the desired object.

Members

The IWMHeaderInfo interface inherits from the IUnknown interface. IWMHeaderInfo also has these types of members:

Methods

The IWMHeaderInfo interface has these methods.

MethodDescription
AddMarker

Adds a marker, consisting of a name and a specific time, to the ASF file header.

AddScript

Adds a script, consisting of type and command strings, and a specific time, to the ASF file header.

GetAttributeByIndex

Returns a descriptive attribute that is stored in the ASF file header.

GetAttributeByName

Returns a descriptive attribute that is stored in the ASF file header.

GetAttributeCount

Returns the number of attributes defined in the ASF file header.

GetMarker

Returns the name and time of a marker.

GetMarkerCount

Returns the number of markers currently in the ASF file header.

GetScript

Returns the type and command strings, and time of a script.

GetScriptCount

Returns the number of scripts currently in the ASF file header.

RemoveMarker

Removes a marker from the ASF file header.

RemoveScript

Removes a script from the ASF file header.

SetAttribute

Sets a descriptive attribute that is stored in the ASF file header.

 

For information about which interfaces can be obtained by using the QueryInterface method of this interface, see the topic for the object on which this interface is implemented.

Remarks

Although the IWMHeaderInfo interface is accessible from four different objects, not all of the features are available in all cases. The following table summarizes the differences in implementation for the various objects.

Object Description
Metadata editorFull functionality is implemented.
WriterAll methods that alter header items (those whose names begin with Add, Set, or Remove) are supported only before the IWMWriter::BeginWriting method is called.

All marker methods return E_NOTIMPL.

Reader and synchronous readerAll methods that alter header items (those whose names begin with Add, Set, or Remove) return E_NOTIMPL.

 

For information about using the writer for metadata editing, see To Edit Metadata with the Writer.

See also

Attributes
Interfaces
IWMHeaderInfo2 Interface
IWMHeaderInfo3 Interface
Metadata Editor Object
Reader Object
Synchronous Reader Object
Writer Object

 

 

Community Additions

ADD
Show:
© 2014 Microsoft