|Microsoft DirectX 9.0|
The GetOutputSizeInfo method retrieves the buffer requirements for a specified output stream.
HRESULT GetOutputSizeInfo( DWORD dwOutputStreamIndex, DWORD *pcbSize, DWORD *pcbAlignment );
Zero-based index of an output stream on the DMO.
[out] Pointer to a variable that receives the minimum size of an output buffer for this stream, in bytes.
[out] Pointer to a variable that receives the required buffer alignment, in bytes. If the output 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 set for each of the 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. However, if a stream is optional, and the application will not use the stream, you do not have to set the media type for the stream.
A buffer is aligned if the buffer's start address is a multiple of *pcbAlignment. Depending on the architecture of the microprocessor, it is faster to read and write to an aligned buffer than to an unaligned buffer. On some microprocessors, reading and writing to an unaligned buffer is not supported and can cause the program to crash. Zero is not a valid alignment.