Compartir a través de


IMediaObject::GetOutputSizeInfo (Windows CE 5.0)

Send Feedback

This method retrieves the buffer requirements for a specified output stream.

HRESULT GetOutputSizeInfo(DWORDdwOutputStreamIndex,DWORD* pcbSize,DWORD* pcbAlignment);

Parameters

  • dwOutputStreamIndex
    Zero-based index of an output stream on the DMO.
  • pcbSize
    [out] Pointer to a variable that receives the minimum size of an output buffer for this stream, in bytes.
  • pcbAlignment
    [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.

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 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.

Requirements

OS Versions: Windows CE .NET 4.1 and later.
Header: Dmo.h.
Link Library: Dmoguid.lib.

See Also

IMediaObject | IMediaObject::SetInputType | IMediaObject::SetOutputType | MoFreeMediaType | DMO_E_INVALIDSTREAMINDEX | DMO_E_TYPE_NOT_SET

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.