IMediaObject::GetInputSizeInfo (Windows CE 5.0)
This method retrieves the buffer requirements for a specified input stream.
HRESULT GetInputSizeInfo(DWORDdwInputStreamIndex,DWORD* pcbSize,DWORD* pcbMaxLookahead,DWORD* pcbAlignment);
Parameters
- dwInputStreamIndex
Zero-based index of an input stream on the DMO. - pcbSize
[out] Pointer to a variable that receives the minimum size of an input buffer for this stream, in bytes. - pcbMaxLookahead
[out] Pointer to a variable that receives the maximum amount of data that the DMO will hold for a lookahead, in bytes. If the DMO does not perform a lookahead on the stream, the value is zero. - pcbAlignment
[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.
Return Values
Returns an HRESULT value. Possible values include the following.
Value | Description |
---|---|
S_OK | Success |
DMO_E_INVALIDSTREAMINDEX | Invalid stream index |
DMO_E_TYPE_NOT_SET | Media type was not set |
Remarks
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 a 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.
Requirements
OS Versions: Windows CE .NET 4.1 and later.
Header: Dmo.h.
Link Library: Dmoguid.lib.
See Also
IMediaObject | IMediaObject::SetInputType | IMediaObject::SetOutputType | IMediaObject::GetInputStreamInfo | MoFreeMediaType | DMO_E_INVALIDSTREAMINDEX | DMO_E_TYPE_NOT_SET | DMO_INPUT_STREAMF_HOLDS_BUFFERS | DMO_MEDIA_TYPE
Send Feedback on this topic to the authors