Microsoft DirectX 8.1 (C++) |
The CreateSample method creates a stream sample and optionally specifies the sample buffer.
Syntax
HRESULT CreateSample(
long lSampleSize,
BYTE *pbBuffer,
DWORD dwFlags,
IUnknown *pUnkOuter,
IAMMediaTypeSample **ppAMMediaTypeSample
);
Parameters
lSampleSize
[in] Size of the sample.
pbBuffer
[in] [optional] Pointer to an array of bytes that contains the sample data, or NULL.
dwFlags
[in] Reserved.
pUnkOuter
[in] [optional] Pointer to the interface of an object that aggregates the stream sample.
ppAMMediaTypeSample
[in] Address of an IAMMediaTypeSample interface pointer that receives a pointer to the created sample.
Return Value
Returns one of the following values.
Return code | Description |
E_OUTOFMEMORY | Insufficient memory. |
E_POINTER | NULL pointer argument. |
S_OK | Success. |
Remarks
If pUnkOuter is non-NULL, the new stream sample is aggregated into the specified object. Filters that receive the sample can then query it for interfaces supported by the aggregating object.
See Also