Microsoft DirectX 9.0

IMediaStream::AllocateSample

Allocates a new stream sample object for the current media stream.

Syntax

HRESULT AllocateSample(
    DWORD dwFlags,
    IStreamSample **ppSample
  );

Parameters

dwFlags

[in] Flags. Must be zero.

ppSample

[out] Address of a pointer to the newly created stream sample's IStreamSample interface.

Return Values

Returns one of the following values.

Return code Description
E_OUTOFMEMORY There isn't enough memory available to create a stream sample.
E_POINTER A parameter is invalid.
S_OK Success.

Remarks

This method allocates the sample and its associated backing object or buffer. The backing object is either the DirectDraw surface for video or the IAudioData object for audio.

See Also