|Microsoft DirectX 9.0|
The GetInputSizeInfo method retrieves the buffer requirements for a specified input stream.
HRESULT GetInputSizeInfo( DWORD dwInputStreamIndex, DWORD* pcbSize, DWORD* pcbMaxLookahead, DWORD* pcbAlignment );
Zero-based index of an input stream on the DMO.
[out] Pointer to a variable that receives the minimum size of an input buffer for this stream, in bytes.
[out] Pointer to a variable that receives the maximum amount of data that the DMO will hold for
[out] Pointer to a variable that receives the required buffer alignment, in bytes. If the input stream has no alignment requirement, the value is 1.
Returns an HRESULT value. Possible values include those in the following table.
|DMO_E_INVALIDSTREAMINDEX||Invalid stream index.|
|DMO_E_TYPE_NOT_SET||Media type was not set.|
The buffer requirements may depend on the media types of the various streams. Before calling this method, set the media type of each stream by calling the IMediaObject::SetInputType and IMediaObject::SetOutputType methods. If the media types have not been set, this method might return an error.
If the DMO performs lookahead on the input stream, it returns the DMO_INPUT_STREAMF_HOLDS_BUFFERS flag in the IMediaObject::GetInputStreamInfo method. During processing, the DMO holds up to the number of bytes indicated by the pcbMaxLookahead parameter. The application must allocate enough buffers for the DMO to hold this much data.
A buffer is aligned if the buffer's start address is a multiple of *pcbAlignment. The alignment must be a power of two. Depending on the microprocessor, reads and writes to an aligned buffer might be faster than to an unaligned buffer. Also, some microprocessors do not support unaligned reads and writes.