IMFASFSplitter::ParseData method

Sends packetized Advanced Systems Format (ASF) data to the ASF splitter for processing.


HRESULT ParseData(
  IMFMediaBuffer *pIBuffer,
  DWORD          cbBufferOffset,
  DWORD          cbLength



Pointer to the IMFMediaBuffer interface of a buffer object containing data to be parsed.


The offset into the data buffer where the splitter should begin parsing. This value is typically set to 0.


The length, in bytes, of the data to parse. This value is measured from the offset specified by cbBufferOffset. Set to 0 to process to the end of the buffer.

Return Value

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

Return code Description
The method succeeded.
The pIBuffer parameter is NULL.

The specified offset value in cbBufferOffset is greater than the length of the buffer.

The total value of cbBufferOffset and cbLength is greater than the length of the buffer.

The IMFASFSplitter::Initialize method was not called or the call failed.
The splitter cannot process more input at this time.


After using this method to parse data, you must call IMFASFSplitter::GetNextSample to retrieve parsed media samples.

If your ASF data contains variable-sized packets, you must set the MFASFSPLITTER_PACKET_BOUNDARY attribute on the buffers to indicate the sample boundaries, and the buffers cannot span multiple packets.

If the method returns ME_E_NOTACCEPTING, call GetNextSample to get the output samples, or call IMFASFSplitter::Flush to clear the splitter.

The splitter might hold a reference count on the input buffer. Therefore, do not write over the valid data in the buffer after calling this method.


Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header wmcontainer.h
Library Mfuuid.lib

See Also

ASF Splitter