Specifies the number of samples to allocate and the media type for the samples.
public:
HRESULT InitializeSampleAllocator(
DWORD cRequestedFrames,
IMFMediaType *pMediaType
)
cRequestedFrames
Type: DWORD
Number of samples to allocate.
pMediaType
Type: IMFMediaType *
Pointer to the IMFMediaType interface of a media type that describes the video format.
Type: HRESULT
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. |
| MF_E_INVALIDMEDIATYPE | Invalid media type. |
Refer to Media Foundation return codes.
Header: Declared in mfidl.h.
Library: Use mfuuid.lib.