IWMCodecPrivateData::GetPrivateData method (wmcodecdsp.h)

Retrieves the codec data for the video content based on the output type passed using the IWMCodecPrivateData::SetPartialOutputType method.

Syntax

HRESULT GetPrivateData(
  [out]     BYTE  *pbData,
  [in, out] ULONG *pcbData
);

Parameters

[out] pbData

Address of the buffer that receives the private data. If you set this to NULL, the size required to hold the private data will be returned in pcbData.

[in, out] pcbData

Pointer to the size of the private data in bytes. If pbData is NULL, the method will set this to the correct value.

Return value

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

Return code Description
S_OK
The method succeeded.

Remarks

If you are setting properties on the encoder object, you must finish that configuration before getting the private data. Changing properties invalidates any private data that was previously retrieved. If you change properties after getting the private data, retrieve it again and reset the output type.

You must call this method after providing the codec with the output media type (without the private data appended) by calling IWMCodecPrivateData::SetPartialOutputType.

After retrieving the private data, allocate a buffer the size of VIDEOINFOHEADER plus pcbData. Then copy the data from your partial output type to the beginning of the buffer and append the private data.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header wmcodecdsp.h

See also

IWMCodecPrivateData Interface