Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
Retrieves a container for a sample.
HRESULT GetBuffer( IMediaSample ** ppBuffer , REFERENCE_TIME * pStartTime , REFERENCE_TIME * pEndTime , DWORD dwFlags );
Parameters
Return Values
Returns an HRESULTvalue that depends on the implementation. HRESULTcan be one of the following standard constants, or other values not listed.
E_FAIL | Failure. |
E_POINTER | Null pointer argument. |
E_INVALIDARG | Invalid argument. |
E_NOTIMPL | Method isn't supported. |
S_OK or NOERROR | Success. |
Remarks
IMemAllocator::GetBufferis a locking, synchronous method to get the next free buffer. Upon return, the properties are invalid, but the buffer pointer and size are correct. This method succeeds only if memory has been committed. GetBufferreturns with an error value if it is blocked waiting for a buffer, and the IMemAllocator::Decommitmethod is called on another thread.
If the pStartTimeand pEndTimeparameters are not NULL, they specify the intended start and end time for the sample in stream time (reference clock time minus the stream time offset). The video renderer applies these parameters when using DirectDraw to schedule when to return a sample. If pStartTimeand pEndTimeare NULL the video renderer will not use DirectDraw.