IMFASFIndexer::CommitIndex method

Adds information about a new index to the ContentInfo object associated with ASF content. You must call this method before copying the index to the content so that the index will be readable by the indexer later.

Syntax


HRESULT CommitIndex(
  [in]  IMFASFContentInfo *pIContentInfo
);

Parameters

pIContentInfo [in]

Pointer to the IMFASFContentInfo interface of the ContentInfo object that describes the content.

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return codeDescription
S_OK

The method succeeded.

MF_E_INVALIDREQUEST

The caller made an invalid request. For more information, see Remarks.

 

Remarks

For the index to function properly, you must call this method after all ASF packets in the file have been passed to the indexer by using the IMFASFIndexer::GenerateIndexEntries method. After you call this method, you must retrieve the indexes by calling GetCompletedIndex and write them to the appropriate location in the file. Finally, you must generate a new ASF header by calling the IMFASFContentInfo::GenerateHeader method of the ASF ContentInfo object.

An application must use the CommitIndex method only when writing a new index otherwise CommitIndex may return MF_E_INVALIDREQUEST as a result. For example, MF_E_INVALIDREQUEST is returned if the application has flags other than MFASF_INDEXER_WRITE_NEW_INDEX set on the indexer object. CommitIndex can also return MFASF_INDEXER_WRITE_NEW_INDEX if the index entries have already been committed through an earlier CommitIndex call.

You cannot use this method in an index reading scenario. You can only use this method when writing indexes.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Wmcontainer.h

Library

Mfuuid.lib

See also

IMFASFIndexer
ASF Index Object
MFCreateASFIndexer

 

 

Community Additions

ADD
Show:
© 2015 Microsoft