Microsoft DirectX 8.1 (C++) |
Creates a CImageSample object.
Syntax
virtual CImageSample *CreateImageSample(
LPBYTE pData,
LONG Length
);
Parameters
pData
Pointer to the data buffer the sample looks after.
Length
Associated length of the buffer.
Return Value
Returns a new CImageSample sample object.
Remarks
This virtual member function creates the actual sample for the allocator. It is passed the data buffer and its length to store. When the sample is subsequently asked for the buffer (through IMediaSample::GetPointer), this is the pointer it will return. The primary reason for having this split out into a separate virtual member function is so that derived classes from CImageAllocator can also derive classes from CImageSample and have a place to create them.
This is a protected member function.
See Also